This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Alternative query string don’t properly work

0

Try this query http://nominatim.openstreetmap.org/search?format=json&postalcode=45400&city=Fleury+les+aubrais&country=fr No result !

Now, without postalcode : http://nominatim.openstreetmap.org/search?format=json&city=Fleury+les+aubrais&country=fr 1 Good result (with postal code returned witch is 45400 !!)

In fact, the query parameter "postalcode" don't work ;(

asked 09 Jan '13, 20:55

fred727's gravatar image

fred727
1111
accept rate: 0%

edited 09 Jan '13, 21:33

scai's gravatar image

scai ♦
33.3k21309459


One Answer:

1

This seems to be a bug in Nominatim

Original answer:

Try "postcode" not "postalcode". That returns something for me that looks plausibly JSON!

answered 09 Jan '13, 21:04

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 19 Jan '13, 14:00

Sanderd17's gravatar image

Sanderd17
1.1k51637

1

The wiki also mentioned postalcode instead of postcode. I fixed it.

(09 Jan '13, 21:36) scai ♦
3

"postcode" is not a recognized parameter. The documentation speaks about "postalcode" only.

Replace "postcode" by anything else ('foo', 'bar', etc..) and you will see that the result will be the same !

I realy think there is a bug whith "postalcode" parameter. Is there a place tu submit bugs ?

(16 Jan '13, 08:52) fred727

There is - it's "trac" for the "nominatim" component. And yes, the second bug on that list at the time of writing is "Handle or ignore postal code", so it's already been logged.

(16 Jan '13, 10:35) SomeoneElse ♦
1

@scai : you do a mistake. The good parameter is postalcode not postcode. Try this query : http://nominatim.openstreetmap.org/search?format=json&postcode=31330&city=Merville&country=fr "postcode" is specified with value 31330 but an other result with postal code "59660" is returned

The "good" query (with "postalcode" parameter) don't work http://nominatim.openstreetmap.org/search?format=json&postalcode=31330&city=Merville&country=fr

Thank you SomeoneElse for the link to the bug list ;)

(16 Jan '13, 20:09) fred727
1

fred727: it seems like you are right.

(17 Jan '13, 07:34) scai ♦

@scai : The wiki is buggy now... Why don't you fix it to poastALcode ?

(19 Jan '13, 18:22) fred727
1

@fred727 I already did several days ago.

(20 Jan '13, 10:38) scai ♦
showing 5 of 7 show 2 more comments

Source code available on GitHub .