The geocoding service provided by openrouteservice is a Pelias geocoder running within our infrastructure.
Dear ORS community,
I am new to python and have long been using GIS in transportation and fully commend the work you are doing. I am not sure if this right forum for my question (happy to be redirected).
I am working on a health supply chain project in Africa, my first step is geocoding the my locations.
I found the https://openrouteservice-py.readthedocs.io/en/latest/ site and followed the instructions for pelias_search
my code in Py3.6 testing using Jupyther Notebook
for node in locationlist:
openrouteservice.geocode.pelias_search(client,str(node),rect_min_x=2, rect_min_y=1, rect_max_x=14, rect_max_y=14,country=“CMR”,dry_run=‘true’)
I get back a result
The issue is that get mutiple countries not only for Cameroon. On pelias instructions it says to constrain to the country it says " country ( list of strings ) – Constrain query by country. Accepts alpha-2 or alpha-3 digit ISO-3166 country codes. I have tried multiple ways (used all three codes, as str, as list,etc…) to fill this required however the response states “Invalid Parameter: country”. If you have guidance on how to resolve this issue as I would like to constrain the geocoding to one country.
Thanks in Advance,
Andrew
Hi,
yes, you’re right, it’s a bug! The parameter should be boundary.country
, instead it’s country
right now:
I’ll fix quickly and you should be able to download v1.1.7 in a few hours.
Thanks for the bug report
Nils
ok, done, should be available in pip:
pip install --upgrade openrouteservice
Thanks mate appreciated !! I will upgrade and test it now.
Andrew