rCarto / photon

:dart: R Interface to the Photon API / Interface entre R et l'API de photon
http://rgeomatic.hypotheses.org/?p=622
45 stars 8 forks source link

Geolocate within a specific place (city, country...) #8

Closed ccamara closed 4 years ago

ccamara commented 6 years ago

I would like to geolocate addresses from a particular city.

I have just recently used photon R package as a geolocation solution with certain degree of success. Unfortunately, some results are placed very far away from the place I am trying to geolocate, even if I use location bias:

`df = geocode(address, limit = 1,key = "highway", locbias = c(-0.8787, 41.6486))`

As far as I know Photon can accept keys and values, but don't know how to use it, further than what I did (If I am not wrong it will search only OSM's objects tagged as highway=*). Is there a way to tell phonon to search only OSM's objects tagged as highway=* AND are located within a city?

rCarto commented 4 years ago

Hi, The location bias does not seem to work very well. I could add the bbox filtering param (https://github.com/komoot/photon#filter-results-by-bounding-box).