Hello. I hope you are doing well. I encountered some problems with using Nominatim API and I need your help. I hope you kindly help me. The issues are the following. Now I have almost 50000 records related to Country, State and City data of the United States. Using this data, I should get all polygon data of these regions and store the polygon data to my local database. So I used Nominatim API repeatedly for getting all polygon data but there are some problems. After calling Nominatim API 20 times, I can't get any result from Nominatim API. Could you kindly let me know the reason of this issue? Also, I would be very happy if you kindly let me know how to implement this issue. On the other hand, I should make a CRON job for updating all polygon data for all regions in the United States. So I would be happy if you kindly let me know the best way how to implement this CRON job, too. Looking forward to hearing from you. Thank you. |
Make sure you adhere to the usage guidelines https://operations.osmfoundation.org/policies/nominatim/ You should probably install your own server or use a third party (usually paid) service. 500.000 API requests to fill your database seems like a lot. |
Agree with @mtmail, get an OSM data file and load it into a PostGIS database and then you can extract all the polygons you want in a batch job rather than having to rely on a third-party, donation-funded free service. How can I get an OSM data file for all my records?
(11 Aug '23, 15:44)
shinydev
You can download a world-wide data file from planet.openstreetmap.org or one that covers e.g. just the US from download.geofabrik.de. After that you'll be using the free osm2pgsql utility to load the data into a PostGIS database from where you can then use standard SQL statements to select/export various polygons on different administrative levels.
(11 Aug '23, 15:59)
Frederik Ramm ♦
Could you kindly let me know if there is a way for using MySQL, not PostgreSQL?
(11 Aug '23, 16:14)
shinydev
|