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

Why is Geopy Distance.Distance wrong?

From GeoDjango Point Field, I get the following points: object1.point = "POINT(-113.4741271000000040 53.4235217000000020)" object2.point = "POINT(-113.5013688000000229 53.5343457999999970)" Then I calculate the distance using geopy: from geopy…
pmah
  • 157
  • 1
  • 2
  • 8
7
votes
3 answers

Geopy: calculating GPS heading / bearing

First time poster here. I am doing some data analyses on collected GPS data for a bridge inspection ROV octorotor. We have the octorotor running on ROS using a 3D scanning LIDAR, stereo vision, INS, and some other neat tech. I'm currently using a…
ruffsl
  • 1,423
  • 2
  • 12
  • 16
6
votes
2 answers

Convert between coordinate systems with GeoDjango

I'm trying to add coordinate information to my database, adding django.contrib.gis support to my app. I'm writing a south data migration that takes the addresses from the database, and asks Google for the coordinates (so far I think my best bet is…
Lacrymology
  • 2,269
  • 2
  • 20
  • 28
6
votes
1 answer

How to get center location from polygon geometry with geopy

I'm trying to get a location for each neighborhood in my city. I want a single lat/log pair for each neighborhood so I can then use that with folium. The local government provides open data in the form of a GEO JSON, but it contains perimeter, area,…
Matias Salimbene
  • 510
  • 6
  • 19
6
votes
2 answers

Pandas :How to split the tuple data in column and create multiple columns

I have created a column with country name, and lattitude and longitude values in a single column. now i want the latitude value and longitude values in a different column. code used to create the column. df['Country_cord'] =…
6
votes
2 answers

Calculate distance between latitude and longitude in dataframe

I have 4 columns in my dataframe containing the following data: Start_latitude
Start_longitude
Stop_latitude
Stop_longitude
I need to compute distance between the latitude longitude pair and create a new column with the distance…
Harikrishna
  • 1,100
  • 5
  • 13
  • 30
6
votes
2 answers

Geocoding using Geopy and Python

I am trying to Geocode a CSV file that contains the name of the location and a parsed out address which includes Address number, Street name, city, zip, country. I want to use GEOPY and ArcGIS Geocodes through Geopy.I wanted to create a code that…
Gonzalo68
  • 431
  • 4
  • 11
  • 22
6
votes
1 answer

How to use geopy vicenty distance over dataframe columns?

I have a dataframe with location column which contains lat,long location as follows deviceid location 1102ADb75 [12.9404578177, 77.5548244743] How to get the distance between consecutive rows using…
wololo
  • 345
  • 2
  • 12
6
votes
2 answers

Python Pandas 'apply' returns series; can't convert to dataframe

OK, I'm at half-wit's end. I'm geocoding a dataframe with geopy. I've written a simple function to take an input - country name - and return the latitude and longitude. I use apply to run the function and it returns a Pandas series object. I can't…
Harvey
  • 617
  • 8
  • 18
6
votes
4 answers

Find out if lat/lon coordinates fall inside a US State

Using Python, is there a function, library, or other way to check to see if a certain lat/lon coordinate pair fall within a defined geographical boundary such as a US state? Example: Does 32.781065, -96.797117 fall within Texas?
Matt Keller
  • 337
  • 4
  • 13
5
votes
1 answer

Django & Geopy : all distance listed for each post : how to associated one distance to one post

Django -- Geopy I am looking for how to define a distance between two points. The first one is related to the post itself and does not change for each post. It indicates the position of the post. The second would be linked to the user's position. I…
Louis
  • 360
  • 2
  • 12
5
votes
2 answers

geopy.exc.GeocoderInsufficientPrivileges: HTTP Error 403: Forbidden

Im trying to use geopy to get the lat/long but it throws a http 403 forbidden error. from geopy.geocoders import Nominatim geolocator = Nominatim() addr = '350 5th Ave, New York, NY 10118' location = geolocator.geocode(addr) print location It was…
user1050619
  • 19,822
  • 85
  • 237
  • 413
5
votes
2 answers

Bearing between two points

Ive been using the geopy package , which does a great job, however some of the results i get are inconsistant or come with a relatively large displacement, i suspect that the problem resides with my bearing calculation: def…
242Eld
  • 225
  • 2
  • 5
  • 13
5
votes
2 answers

How do I convert vincenty distance to float in pandas dataframe

I have problem to analyse vincenty distance because the format is object and have km metrics in there, I want to analyse further. I want to convert vincenty distance to float format Here's the data customer_id lat_free long_free lat_device …
Nabih Bawazir
  • 6,381
  • 7
  • 37
  • 70
5
votes
1 answer

Best way to pass repeated parameter to a Numpy vectorized function

So, continuing from the discussion @TheBlackCat and I were having in this answer, I would like to know the best way to pass arguments to a Numpy vectorized function. The function in question is defined thus: vect_dist_funct = np.vectorize(lambda p1,…
Kartik
  • 8,347
  • 39
  • 73
1
2
3
33 34