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
0
votes
1 answer

Using Geopy to convert list of addresses to GPS coordinates

I know how to use geopy to convert a single address to GPS coordinates, but am having trouble with my code which should read addresses line by line from a file and convert each one to GPS coordinates and print them out. from geopy.geocoders import…
Harrison
  • 5,095
  • 7
  • 40
  • 60
0
votes
0 answers

How to get apache to run python toolbox?

So I'm trying to use the geopy toolbox for a school project, but despite working when I run the program on my school's server (where my public_html file is located), I can't get Apache to recognize the toolbox. #! /usr/bin/python import…
Ludio
  • 1
0
votes
0 answers

Convert str( location ) to tuple of (Longitude,Latitude) in Python 3?

I'm doing some webscraping where I get a list of locations. I want to try and convert these to their respective longitude and latitude coordinates. I found geopy which looks like it does the right stuff. With or without geopy, how can I convert…
O.rka
  • 29,847
  • 68
  • 194
  • 309
0
votes
1 answer

Geopy to shapefile

Trying to use the latitude and longitude that is returned by geopy to create a shapefile. The shapefile creator part works line if I give it a set of numbers (44.977753, -93.2650108) but it will not work with the returned data lat_long. My thought…
jeffkrop
  • 147
  • 1
  • 1
  • 9
0
votes
1 answer

Distance calculation in Geopy

I am using Python 2.6.6 on Centos 6. I have a dataframe that I am bringing in from a pickle file. Then I'd like to calculate the distance between 2 points. I have tried to combine the lat and long for each point into a tuple and then used…
PR102012
  • 846
  • 2
  • 11
  • 30
0
votes
0 answers

Geospatial Analytics (lat long in shapefile)

This is a follow up question to Geospatial Analytics in Python The question is similar to https://gis.stackexchange.com/questions/84114/shapely-unable-to-tell-if-polygon-contains-point but reversing lat long seemed to have solved the issue, but it…
GreenThumb
  • 483
  • 1
  • 7
  • 25
0
votes
1 answer

Geopy in Django: JSONDecodeError

I have followed the tutorials in http://code.google.com/p/geopy/wiki/GettingStarted This works fine: g = geocoders.Google(resource='maps') I want to use json as the output format because I want to handle the results in javascript. BUT everytime I…
wenbert
  • 5,263
  • 8
  • 48
  • 77
0
votes
1 answer

geopy.distance.great_circle not recognized

When I try to import great_circle from geopy using from geopy.distance import great_circle I get an error telling me that great_circle can not be imported. I'm using enthought canopy for writing scripts. How can I fix this? All I really need is a…
user3600497
  • 1,621
  • 1
  • 18
  • 22
0
votes
1 answer

What metric does pgrouting use to calculate distances?

I was comparing distances between points using pgrouting and comparing it with Vincenty and great circle distances computed using geopy, but I'm finding that the min distance between two points is lower bounded by the pgrouting distances. This makes…
ell
  • 13
  • 3
0
votes
1 answer

Geopy Import Error

I have problems in using the Geopy package. I have installed it with pip and I'm using python 2.7.3. Geopy is correctly installed under /usr/local/lib/python2.7/dist-packages I've tried to run a file only importing the geopy.geocoders as…
Gimmi
  • 35
  • 2
  • 5
0
votes
1 answer

Python 3 - GeoPy and encoding

I'm using DictWriter to write a dictionary to a csv after some geolocation work. location = geolocator.reverse(coords) row["address"] = location.address writer.writerow(row) Which generates this: File…
Dissident Rage
  • 2,610
  • 1
  • 27
  • 33
0
votes
2 answers

Python - Using "Google AJAX Search" API's Local Search Objects

I've just started using Google's search API to find addresses and the distances between those addresses. I used geopy for this, but, I often had the problem of not getting the correct addresses for my queries. I decided to experiment, therefore,…
user330739
  • 455
  • 1
  • 6
  • 15
0
votes
1 answer

Trouble installing geopy with Python 3.2

I am trying to install a module on python 3.2 but am unable to. I am using Windows 7. I need to have the module installed only on Python 3.2, so solutions that work for other versions of Python won't be helpful to me (I had no problem installing…
Ravi Mehta
  • 485
  • 1
  • 6
  • 15
0
votes
3 answers

Need another set of eyes on my loops

Starting with a list of coordinates, I'm trying to create a new list with interpolated coordinates included. I'm missing something and it just appends the first and last coordinate over and over again. The problem is in the main function and has…
Will Luce
  • 1,781
  • 3
  • 20
  • 33
0
votes
0 answers

Confusion about exception handling in python

In the following script, a TypeError is occuring on my try block which doesn't allow the ValueError from the API to happen. How can I skip the execution of the line self.address, (self.lat, self.lng) = g.geocode(place) so as to only catch errors…
yayu
  • 7,758
  • 17
  • 54
  • 86