komoot / photon

an open source geocoder for openstreetmap data
Apache License 2.0
1.96k stars 284 forks source link

incomplete reverse geocoding results #199

Open zheffie opened 9 years ago

zheffie commented 9 years ago

It seems that the result of photon's reverse geocoding is incomplete compared to nominatim. Consider below:

http://photon.komoot.de/reverse?lat=51.2034950256348&lon=4.5686016082763

{"features":[{"properties":{"osm_key":"highway","extent":[4.5702038,51.2030266,4.570565,51.2029519],"state":"Flanders","osm_id":4818922,"osm_type":"W","postcode":"2520","osm_value":"motorway","city":"Ranst","country":"Belgium"},"type":"Feature","geometry":{"type":"Point","coordinates":[4.5702038,51.2030266]}}],"type":"FeatureCollection"}

http://nominatim.openstreetmaps.org/reverse.php?lat=51.2034950256348&lon=4.5686016082763

{"place_id":"118343347","licence":"Data © OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"way","osm_id":"273828044","lat":"51.2042868","lon":"4.5654602","display_name":"E34;E313, Ranst, Antwerp, Flanders, 2520, Belgium","address":{"road":"E34;E313","city_district":"Ranst","town":"Ranst","county":"Antwerp","state":"Flanders","postcode":"2520","country":"Belgium","country_code":"be"}}

Note that the photon result does not include the road name "E313/E34".

Why is this, and can it be fixed?

christophlingg commented 9 years ago

in this case photon does not consider tags like destination:int_ref or nat_ref

karussell commented 9 years ago

I think if no 'name' tag is present the 'ref' or 'int_ref' should be used. E.g. also http://photon.komoot.de/reverse?lat=50.8948941&lon=12.9471627

lonvia commented 9 years ago

How would you expect the data to be imported? Should 'ref' become a field of its own and the frontend would do the replacement when no name is present or should be nominatim exporter put the ref into the name field when no name can be found? The first solution would just influence the output, the second one would also make the name searchable. The latter should be considered with care because refs can really mess up the search results (e.g. easily confused with house numbers).

karussell commented 9 years ago

Thanks @lonvia for this hint :) Then indeed the first option sounds better

karussell commented 8 years ago

Name seems to be absent also for buildings: http://photon.komoot.de/reverse?lon=-1.81602098644987&lat=52.5487429714954

lonvia commented 8 years ago

This building has no name. I would suggest to fallback to the housenumber (and street) when creating output.