Questions tagged [geopy]

geopy allows you to convert between partial place names and latitude/longitude coordinates by wrapping many different online API's and providing access through one standard interface.

geopy allows you to convert between partial place names and latitude/longitude coordinates by wrapping many different online API's and providing access through one standard interface. Additionally, it contains convenience functions for parsing lat/long coordinates and finding as-the-crow-flies distance between them.

geopy makes it easy for developers to locate the coordinates of addresses, cities, countries, and landmarks across the globe using third-party geocoders and other data sources.

geopy includes support for many geocoders such as Google Maps, Bing Maps, Nominatim, and GeoNames.

504 questions
5
votes
8 answers

speeding up processing 5 million rows of coordinate data

I have a csv file with two columns (latitude, longitude) that contains over 5 million rows of geolocation data. I need to identify the points which are not within 5 miles of any other point in the list, and output everything back into another CSV…
secondbreakfast
  • 4,194
  • 5
  • 47
  • 101
5
votes
1 answer

Geopy ValueError "Didn't find exactly one match" when geocoding

In Django, I have been trying to get a search field to geocode a location and spit out a list from my db sorted by distance. So far everything works except when I search for a location that Google returns multiple results form such as "ann arbor,…
bcoop713
  • 1,063
  • 5
  • 13
  • 24
4
votes
0 answers

geopy.exc.GeocoderServiceError: Non-successful status code 502

I use geopy to convet a coordinate into an address in order to get the name of the country and this is my code : def convert_latandlong_to_address(self): geolocator = Nominatim(user_agent="miz") location =…
Niloofar
  • 240
  • 1
  • 14
4
votes
2 answers

Is there any python package available to calculate shortest distance between coordinates only via sea route?

There are online APIs available to calculate Port to Port distances, but I would like to do it at free of cost. I have tried things mentioned in other similar questions Find path by sea from coastal point A to coastal point B but it did not serve my…
Bala
  • 111
  • 8
4
votes
2 answers

GeocoderUnavailable: HTTPSConnectionPool error for some addresses using geopy and Nominatim

I get errors for some addresses when geocoding with geopy (using Nominatim). I don't really see a pattern why an address gives an error and another does not, e.g. simply changing the house number can make the difference. When I make the API request…
BodoB
  • 414
  • 1
  • 3
  • 7
4
votes
1 answer

Find closest (lat/lon) observation from one pandas dataframe for each observation in a second dataframe

Problem summary: I have two dataframes. The first dataframe (df1) is relatively small (Nearly always less than 100 observations, typically less than 50), with a set of point identifiers and their lat/lon coordinates. The second dataframe (df2) is…
amquack
  • 837
  • 10
  • 24
4
votes
2 answers

Using geopy in a Dataframe to get distances

I am new to Geopy. I am working in this transportation company and need to get the total kilometers that a truck has operated. I have seen some answers here but they did not work for me. I have the following Dataframe from a GPS installed on the…
user1922364
  • 513
  • 2
  • 8
  • 19
4
votes
1 answer

Dividing Geographical region into equal sized grid and retrieving indexing position

I have GPS coordinates of human mobility in Beijing Area. I want to divide geographical space in to rectangular grid of for example 2 sq. km (delta), and access the indexing position of any point inside the grid. The cells need not be exactly equal…
Asif Khan
  • 1,228
  • 1
  • 11
  • 22
4
votes
1 answer

Python Google Maps Geocoding API

I am using Google's Geocoding API using Python Libraries (tried GeoPy 1.11.0). For a query such as "Utica" I'm getting a single response: {u'geometry': {u'location_type': u'APPROXIMATE', u'bounds': {u'northeast': {u'lat': 43.132269, u'lng':…
4
votes
1 answer

OSM get duration and directions from route A to B in Python

I am new to working with Maps and search algorithms. Currently I am using geopy package to get distances from Nominatim from geopy.geocoders import Nominatim from geopy.distance import vincenty nom = Nominatim() chicago =…
muazfaiz
  • 4,611
  • 14
  • 50
  • 88
4
votes
1 answer

Django - determining if geographic coordinates are inside of an circle

Does django have anything that will look at a geographic coordinate (decimal lat/long) and determine if is inside a circle with a certain radius (let's say 100 Km)? I have certain type of data, each has a lat/long and I would like to make a search…
avatar
  • 12,087
  • 17
  • 66
  • 82
4
votes
2 answers

Object has no attribute 'distance' - GeoDjango

I am referring to the answer in the question listed below as I am trying to run a query that gets the closest object to a given point in my django application. My django version is 1.9.2. How to return a record with the lowest distance from a point…
4
votes
2 answers

GeocoderServiceError for geopy

When I am using geopy to calculate the distances between 2 addresses based on their longitude and the latitude, it works fine on individual pair of data. But when there is more data, it always gives me this error: File…
Cherry Wu
  • 3,844
  • 9
  • 43
  • 63
4
votes
2 answers

Counting entries in a CSV file with python

my CSV contains information about individuals and their date of death and their area of death. I am also using geopy to locate this area. This part is working i think but I don't really want to have the individuals but I want the total bodycount per…
basedian
  • 307
  • 1
  • 5
  • 18
4
votes
5 answers

Most straightforward way to cache geocoding data

I am using geopy to get lat/long coordinates for a list of addresses. All the documentation points to limiting server queries by caching (many questions here, in fact), but few actually give practical solutions. What is the best way to accomplish…
cslstr
  • 175
  • 9
1 2
3
33 34