Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Search on addr:city #5268

Open
openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments
Open

Search on addr:city #5268

openstreetmap-trac opened this issue Jul 23, 2021 · 3 comments

Comments

@openstreetmap-trac
Copy link

Reporter: jel[at]elgaard.net
[Submitted to the original trac issue database at 3.55pm, Sunday, 18th January 2015]

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, tjreborg" should find node 342365050. It currently does not. Instead, it is found when searching for "vestre strandvej 19, snderby", even though it is located in Tjreborg, not Snderby, and it is tagged with addr:city=Tjreborg.

@openstreetmap-trac
Copy link
Author

Author: woodpeck
[Added to the original trac issue at 9.50am, Tuesday, 20th January 2015]

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

@openstreetmap-trac
Copy link
Author

Author: jel[at]elgaard.net
[Added to the original trac issue at 1.07pm, Tuesday, 20th January 2015]

Sorry, my bad.

The address node in question has indeed been tagged with addr:postcode, which is correct according to http://wiki.openstreetmap.org/wiki/Key:addr

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.

@openstreetmap-trac
Copy link
Author

Author: ToeBee
[Added to the original trac issue at 7.03pm, Monday, 16th November 2015]

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 [http://www.openstreetmap.org/way/13226787 way 13226787] which now causes Nominatim to correctly find [http://nominatim.openstreetmap.org/search.php?q=3706+Cottonwood+Circle%2C+Manhattan%2C+ks 3706 Cottonwood Circle, Manhattan, KS] but it cannot find the house that is around the corner on the other street: [http://nominatim.openstreetmap.org/search.php?q=6001+Stony+Brook+Drive%2C+Manhattan%2C+ks 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 [http://nominatim.openstreetmap.org/search.php?q=6001+Stony+Brook+Drive%2C+Riley%2C+ks 6001 Stony Brook Drive, Riley, KS] it will find the address.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant