0

I have used the code for finding the latitude and longitude from the given address:

     locator = Nominatim(user_agent="myGeocoder")  # holds the Geocoding service, Nominatim
     geocode = RateLimiter(locator.geocode, min_delay_seconds=0.00000000000000000000000000000000000000000000000000000000000000000000000000001)
    data['MBR_location'] = data['MBR_Full_Address'].apply(lambda x: geocode(x))
     data['Prov_location'] = data['Prov_Full_Address'].apply(lambda x: geocode(x))

But it takes so much time to produce the latitude and longitude. For example, in this way, it needs 3 hours for getting the latitude and longitude from only 10k ID. Is there any way to get the results faster way? Thanks in Advance!

krassowski
  • 13,598
  • 4
  • 60
  • 92
Sorif Hossain
  • 1,231
  • 1
  • 11
  • 18

1 Answers1

2

I guess it takes so long because you are using OSM's public Nominatim instance and the usage policy only allows one request per second. So either switch to a different Nominatim instance or install your own local Nominatim server.

scai
  • 20,297
  • 4
  • 56
  • 72
  • is there any way to get the latitude and longitude from the address without using Nominatim? – Sorif Hossain Apr 16 '21 at 11:16
  • Yes, you can use any other geocoding service. It doesn't have to be Nominatim. But such recommendations are out of scope for StackOverflow. – scai Apr 16 '21 at 11:27
  • is that service is paid or free? Could you kindly tell me any other free geocoding service? – Sorif Hossain Apr 16 '21 at 11:54
  • That service? Which service? I didn't mention any specific one. See https://stackoverflow.com/a/8180637/1340631 or https://gisgeography.com/geocoders/. And there are several more, I guess. – scai Apr 16 '21 at 12:02