osm-search / Nominatim

Open Source search based on OpenStreetMap data
https://nominatim.org
GNU General Public License v3.0
3k stars 710 forks source link

Display all results or none at all for disputed territories. #202

Open maning opened 9 years ago

maning commented 9 years ago

Scarborough Shoal is a disputed territory between China and the Philippines: http://en.wikipedia.org/wiki/Scarborough_Shoal

Nominatim result assigns it to Sansha City, Hainan, People's Republic of China: http://www.openstreetmap.org/search?query=Scarborough%20Shoal#map=11/15.1585/117.7653

We tag the boundary as disputed territory: http://www.openstreetmap.org/changeset/26925523

I believe the data is correct having properly tagged in an admin_level relation for both countries. Zambales, Philippines: http://www.openstreetmap.org/relation/1504691 Sansha City, China: http://www.openstreetmap.org/relation/2833102

I propose that either we display all the results or none at all (saying it is a disputed territory) to avoid confusion.

mtmail commented 9 years ago

The combination admin_level=disputed_territory is not supported and I can't see anybody else using it (http://taginfo.openstreetmap.org/keys/admin_level#values). Any value not 0-12 is a mistake and should be corrected. Nominatim will get confused although I don't know if the place will be deleted or simply treated as non-administrative.

To assign the place to another country you can try the is_in tag http://wiki.openstreetmap.org/wiki/Key:is_in

Still, as you say, there is probably not a single right answer where this island (with no population) belongs to (is administered by). As an outsider I would follow the Wikipedia page because they had research, discussions and edit wars already.

Can you check http://wiki.openstreetmap.org/wiki/Disputes and ask on OSM mailing lists first how territory disputes should be tagged? Otherwise we end up with non-supported tags and possibly edit wars. Lots of places in the world are disputed http://en.wikipedia.org/wiki/List_of_territorial_disputes.

metazool commented 9 years ago

I stumbled across this issue while researching the use of disputed-type tags for boundary relations.

I'd be really interested to find out more about common patterns for disputed territories or administrative areas with multiple claims. It may not be a problem OSM has often, but it will keep recurring and part of an amicable solution to edit wars has to be an equitable data model.

A boundary=disputed tag was suggested to be used along with admin_level in a recent DWG discussion but i see almost no evidence of that in the wild. I will research more in the data and I will try to remember to link back here if I learn anything useful. I would be really interested to share pictures

lonvia commented 5 years ago

Also in this topic: entities that have their own country code but are not independent countries, for example Hong Kong. See https://en.wikipedia.org/wiki/ISO_3166-1 for a list.

grinsted commented 4 years ago

I maintain a twitter bot that shows glacier change. It uses a nominatim reverse lookup to find place names for glaciers. Glaciers are often on disputed borders, and I regularly get complaints about the names it shows. Here's an example: https://twitter.com/dailyglacier/status/1201564987392741376

It would be helpful if the reverse lookup atleast gave me a disputed flag.

SomeoneElseOSM commented 4 years ago

@grinsted I'm not convinced that Nominatim (particularly one central Nominatim instance that doesn't know "with which worldview" you are asking) is best placed to return the information that you are looking for. I'd suggest exploring other options that concentrate on geographical features, proximate to other known items (e.g. mountain peaks) etc. Perhaps ask over at https://help.openstreetmap.org/ with a few more details about what you're trying to do? Best Regards, Andy (unconnected to Nominatim in any way but regularly answering this sort of query as part of OSM's Data Working Group).

sun-jiao commented 4 years ago

Scarborough Shoal is a disputed territory between China and the Philippines: http://en.wikipedia.org/wiki/Scarborough_Shoal

Nominatim result assigns it to Sansha City, Hainan, People's Republic of China: http://www.openstreetmap.org/search?query=Scarborough%20Shoal#map=11/15.1585/117.7653

We tag the boundary as disputed territory: http://www.openstreetmap.org/changeset/26925523

I believe the data is correct having properly tagged in an admin_level relation for both countries. Zambales, Philippines: http://www.openstreetmap.org/relation/1504691 Sansha City, China: http://www.openstreetmap.org/relation/2833102

I propose that either we display all the results or none at all (saying it is a disputed territory) to avoid confusion.

If you need a result that fits your local law, you can consider my new project https://github.com/sun-jiao/LocalizedGeocoder.

Only China supported currently.

mtmail commented 4 years ago

Only China supported currently.

Can you add any documentation? The current documentation doesn't really explain how it's setup, what it does, how one can use or change it.

As far as I see https://github.com/sun-jiao/LocalizedGeocoder/blob/master/app/src/main/java/sunjiao/nominatim/Nominatim.kt requests results from a hardcoded nominatim.openstreetmap.org server. Then https://github.com/sun-jiao/LocalizedGeocoder/blob/master/app/src/main/java/sunjiao/localizer/CNLocalizer.kt has hardcoded list of polygons and filters/changes the results based on the Chinese political view (that's the technical term, I'm not judging).

Thanks for putting the work under GPLv3 license, that makes it reusable by other projects.

sun-jiao commented 4 years ago

Only China supported currently.

Can you add any documentation? The current documentation doesn't really explain how it's setup, what it does, how one can use or change it.

As far as I see https://github.com/sun-jiao/LocalizedGeocoder/blob/master/app/src/main/java/sunjiao/nominatim/Nominatim.kt requests results from a hardcoded nominatim.openstreetmap.org server. Then https://github.com/sun-jiao/LocalizedGeocoder/blob/master/app/src/main/java/sunjiao/localizer/CNLocalizer.kt has hardcoded list of polygons and filters/changes the results based on the Chinese political view (that's the technical term, I'm not judging).

Thanks for putting the work under GPLv3 license, that makes it reusable by other projects.

Yeah, I will.

I just finished writing the code. And haven't write any documentation.

kenseii commented 3 years ago

Is there a best way of deleting these data in a local nominatim instance having their polygons? I am thinking of deleting from place and placex tables but im not sure it will be enough to not display those info.