GraphHopper.com | Forum | GitHub | Maps | Blog

How to integrate Photon geocoder?


#1

For Nominatim and OpenCage, the graphhopper/geocoder-converter
provides converters to integrate them in GraphHopper.

Is there a converter to integrate Photon as well?


#2

Ah, really good question :slight_smile:

We are currently maintaining a branch of photon: https://github.com/karussell/photon/commits/gh to avoid the minor overhead of converting the JSON, but this is getting too time intense and I’ve really thought about a better solution maybe putting the converter into photon to avoid the extra round trip. This way I would be able to provide also the native photon format via format=geojson easily, which is currently just not possible.


#3

Yes, supporting pluggable result formatters in photon would have the additional benefit of allowing smoother API changes. Like getting closer to GeocodeJSON spec (e.g. renaming postcode to postalcode).

They could be choosen via format parameter or a format specific endpoint.