[Photon] Reverse Geocoding with query filters
It can be usefull to search precise data from osm when we do reverse geocoding.
For example it can help to search only osm places (locality, city) from a location (latitude, longitude)
Ok, I undersand your position. Actually it is the only way to use reverse geocoding with photon and have specific result types.
I will see if I have time to propose a PR for osm_tag on the Photon repository.
Hello @jbelien,
My PR has just been merged in Photon master branch.
Can I implement geocoding and reverse with osm tags here or should I wait a tagged version in photon ?
https://github.com/komoot/photon/pull/742 has just been merged in Photon master branch.
Awesome work! 👍
Can I implement geocoding and reverse with osm tags here or should I wait a tagged version in photon ?
Of course, you can definitely already update this PR (or close this PR and open a new one if you prefer).
I just added osm tag feature for both geocode and reverse queries.
You can easily combine multiple osm tag filters like this :
$provider = new Geocoder\Provider\Photon\Photon($httpClient, 'https://your-photon-root-url');
$reverseQuery = \Geocoder\Query\GeocodeQuery::create('Paris')
->withData('osm_tag', ['tourism', ':!museum'])
->withLimit(5);
// Here we get 5 tourism results in Paris which are not museums
$results = $provider->reverseQuery($reverseQuery);
If it is ok for you I think we can safely release it as the feature has been released on Photon here https://github.com/komoot/photon/releases/tag/0.4.3