EdwardBetts / osm-wikidata

Match OSM entities with Wikidata items
http://osm.wikidata.link/
GNU General Public License v3.0
108 stars 20 forks source link

Shouldn't look at the members of a river relation if the relation already has the wikidata #90

Open amandasaurus opened 7 years ago

amandasaurus commented 7 years ago

Consider the River Dodder: https://osm.wikidata.link/Q2055328 The waterway relation in OSM has wikidata tags, but each of the individual ways that make it up also have the name=Dodder. This tool is suggesting the ways as possible match ups.

I don't think it should do this. If there is a river with the wikidata tag, then it shouldn't look at/suggest the compenent ways.

(I'm not sure those OSM ways should have the name tag if they are part of the relation...)

EdwardBetts commented 7 years ago

Good catch. The matcher is not good with rivers because osm2pgsql doesn't support unclosed relations. I'll remove rivers from the match results.

amandasaurus commented 7 years ago

If you import with --slim you'll get planet_osm_rels which will have all the relations. it's a bit messy to query, but you can do it.

ivanbranco commented 2 years ago

Hi, the issue is still valid. Maybe since 2017 something changed and now can be fixed?

tuukka commented 2 years ago

At least both the new flex output mode as well as the old pgsql output mode of osm2pgsql now support Lua callbacks to customise how relations are handled:

kjonosm commented 1 year ago

Hi, the issue is still valid. Maybe with all the updates in osm2pgsql lately something changed and now can be fixed?