Opened 5 years ago

Last modified 5 years ago

#5270 new enhancement

Search on addr:city

Reported by: jel@… Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version:
Keywords: Cc:


In some countries (e.g. Denmark), zipcode districts have not been mapped. Instead, all address nodes have been tagged with addr:zipcode and addr:city.

When searching, it should be possible to find addresses based on this.

E.g. a search for "vestre strandvej 19, tjæreborg" should find node 342365050. It currently does not. Instead, it is found when searching for "vestre strandvej 19, sønderby", even though it is located in Tjæreborg, not Sønderby, and it is tagged with addr:city=Tjæreborg.

Change History (3)

comment:1 Changed 5 years ago by woodpeck

Small fix - addresses have been tagged with addr:postal_code not addr:zipcode.

comment:2 Changed 5 years ago by jel@…

Sorry, my bad.

The address node in question has indeed been tagged with addr:postcode, which is correct according to

Still, it should be found by addr:city regardless of postcode/zipcode.

I know that streets and boundaries can be tagged with postal_code=*, but that is not used in all countries, and certainly not in Denmark.

comment:3 Changed 5 years ago by ToeBee

I've run into similar problems in the US where locations far outside of the city limits still have a mailing address that includes the city name. I eventually found out that nominatim is using an addr:city value from the street, not from individual address objects. If none is present, it assigns one based on admin boundaries and place=* nodes.

However if you explicitly put an addr:city tag on the road, it will force nominatim to find this address. Arguably this is "tagging for the renderer" as I think Nominatim should really take the addr:city tag on address objects into account. From what I understand, there are some performance issues with this.

So for example, I added an addr:city tag to way 13226787 which now causes Nominatim to correctly find 3706 Cottonwood Circle, Manhattan, KS but it cannot find the house that is around the corner on the other street: 6001 Stony Brook Drive, Manhattan, KS because I didn't add an addr:city tag to Stony Brook Drive so Nominatim assigned it a value of "Riley" which means if you search for 6001 Stony Brook Drive, Riley, KS it will find the address.

Note: See TracTickets for help on using tickets.