graphhopper / geocoder-converter

Converts arbitrary geocoding responses to a GraphHopper response
https://graphhopper.com/api/1/docs/geocoding/#external-providers
Apache License 2.0
9 stars 11 forks source link

Leaving out the locale param seems to give different results than explicitly setting locale=en #69

Closed mlundblad closed 1 year ago

mlundblad commented 1 year ago

I'm not sure this is the correct report to report issues with the geocoding API.

According to the API docs: https://docs.graphhopper.com/#tag/Geocoding-API the locale param shall have the default value 'en', yet it seems these queries gives different results:

https://graphhopper.com/api/1/geocode?limit=20&locale=en&key=API_KEY&point=59.863704493020094%2C17.639317368224624&location_bias_scale=0.5&q=primeke

https://graphhopper.com/api/1/geocode?limit=20&key=API_KEY&point=59.863704493020094%2C17.639317368224624&location_bias_scale=0.5&q=primeke

The first query finds our office, while the latter doesn't.

karussell commented 1 year ago

It seems that something is wrong in the underlying geocoder:

https://photon.komoot.io/api/?q=primeke&lang=default&lat=59.863704493020094&lon=17.639317368224624

https://photon.komoot.io/api/?q=primeke&lang=en&lat=59.863704493020094&lon=17.639317368224624

mlundblad commented 1 year ago

Leaving out the lang param in the Photon query seems to give the same result as with lang=en:

https://photon.komoot.io/api/?q=primeke&lat=59.863704493020094&lon=17.639317368224624

karussell commented 1 year ago

Can you try with curl? With the browser it uses the Accept-Language header.

mlundblad commented 1 year ago

Yeah, that's right, with curl https://photon.komoot.io/api/?q=primeke&lat=59.863704493020094&lon=17.639317368224624 gives the same result as the one without locale using the GH geocoder interface (e.g. with one result for "Primekens Kopf" in Finnentrop.

karussell commented 1 year ago

Have created: https://github.com/komoot/photon/issues/746