This PR adds support for testing reverse geocoding results.
A test is considered a reverse geocoding test when the query field is missing while lat and lon are present. If neither of the three fields is given, the tests are now skipped. Reverse geocoding takes an additional parameter detail which describes what kind of entity is expected back. I've opted for a textual description here becuase I don't think there is much agreement between geocoding APIs how to express this. Nominatim has a zoom parameter, Photon only has filters that can to a certain extent be used for this. The idea is that detail uses the same values as the type parameter in the geocodejson specification.
Support for reverse is currently implemented for the Nominatim and Photon API.
This PR adds support for testing reverse geocoding results.
A test is considered a reverse geocoding test when the
query
field is missing whilelat
andlon
are present. If neither of the three fields is given, the tests are now skipped. Reverse geocoding takes an additional parameterdetail
which describes what kind of entity is expected back. I've opted for a textual description here becuase I don't think there is much agreement between geocoding APIs how to express this. Nominatim has a zoom parameter, Photon only has filters that can to a certain extent be used for this. The idea is thatdetail
uses the same values as thetype
parameter in the geocodejson specification.Support for reverse is currently implemented for the Nominatim and Photon API.
I've also added example tests. These are the form former curated city list from Photon, which I finally got rid of in https://github.com/komoot/photon/pull/457.