photon icon indicating copy to clipboard operation
photon copied to clipboard

Polygon not returned as Search Result

Open nafis042 opened this issue 6 years ago • 5 comments

Whenever I search a query it always returns as point but not polygon or linestring. I can see the osm_type="R", but in geometry field always shows type="point". how can I get these polygon as geometry?

nafis042 avatar Oct 13 '17 15:10 nafis042

The polygon seems not to be saved in ES, according to https://github.com/komoot/photon/blob/master/src/main/java/de/komoot/photon/PhotonDoc.java. Nominatim seems to "know" the polygon: https://github.com/openstreetmap/Nominatim/blob/master/sql/tables.sql So it should be possible to store in ES and deliver it by the service.

Is this not done for a special reason, or did just no one needed the feature?

dve avatar Apr 19 '18 08:04 dve

Photon only exports the centroid and the bounding box of the geometry from Nominatim. Any polygon or way geometries are lost. Adding full geometries would increase the database size quite a bit.

lonvia avatar Apr 25 '18 21:04 lonvia

is it possible to config Photon to load geometries in ES too?

ducdigital avatar May 09 '18 08:05 ducdigital

Adding full geometries would increase the database size quite a bit.

Perhaps it'd make sense for an option to exist during importation so the user can decide on whether to import it or not.

kurko avatar May 23 '18 14:05 kurko

I sent the geocoded coordinate to nominatim to get the polygon. This combo worked quite well for me (since the nominatim is very picky for the input address format)

GeorgeKontsevik avatar Nov 18 '23 11:11 GeorgeKontsevik