NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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.

asked 11 Aug '23, 15:01

shinydev's gravatar image

shinydev
11112
accept rate: 0%


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.

permanent link

answered 11 Aug '23, 15:07

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

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.

permanent link

answered 11 Aug '23, 15:16

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×689
×118

question asked: 11 Aug '23, 15:01

question was seen: 946 times

last updated: 11 Aug '23, 16:14

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum