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
2
votes
0 answers

Bulk calculation using geopy.distance

I have two lists of locations as csv files (mlloc and cfloc) in the same format with the following headers: index|formatted_address|latitude|longitude|postcode|input_string|number_of_results|status I wish to measure the distance between each…
2
votes
1 answer

ValueError: Must be a coordinate pair or Point

i want to pass my latitude and langitude values to my flask route but everytime i am getting this error: ValueError: Must be a coordinate pair or Point however i have tried this and its working fine: from flask import Flask, render_template from…
vatsalay
  • 469
  • 1
  • 9
  • 21
2
votes
0 answers

Geopy geopy.distance ignoring altitude specification?

I'm trying to calculate distance between 2 locations. Each location has lat, lon, altitude. When calculating distance using Geopy it doesn't seem to consider the altitude: slight changes in lat, lot influence the result, small/huge change in…
cs_student
  • 31
  • 3
2
votes
0 answers

How to find all the points within a certain radius using google maps api

I have a list of locations in my database stored as lng and lat. The django views is returning the longitude and latitude and latitude of the user location.I would like to return all the locations in the database within 10km of a users location.…
Opp
  • 520
  • 1
  • 8
  • 21
2
votes
2 answers

I've installed geopy but it says ImportError: No module named geopy

I've installed geopy with pip install geopy I've checked on my command line, and it's there. BUT whenever I try to use it, either in Anaconda, PyCharm or Jupiter Notebooks, I get: ImportError: No module named geopy I've had similar problems in the…
Spartakus
  • 41
  • 4
2
votes
2 answers

Geocoding by Roadway Name Intersections

I'm trying to obtain coordinates for road intersections similar to how you can type '1100 N & 300 W' in Google Maps, but given a table with tens of thousands of pairs. Does anyone know of a geolocation module that supports that type of search? I'm…
trphelps15
  • 21
  • 3
2
votes
1 answer

Failed geolocalization with Geopy, Nominatim: TypeError: 'NoneType' object is not subscriptable

I am trying to use module Geopy, function Nominatim to geolocalize a list of addresses (contained inside a CSV file). Here is my code: import pandas as pd from geopy.geocoders import Nominatim df = pd.read_csv('incidenti genova 3.csv',…
Tms91
  • 3,456
  • 6
  • 40
  • 74
2
votes
2 answers

Unable to import geopy into Jupyter even after pip installation

I'm trying to install geopy to use in Jupyter, but I keep getting the following error when I try to import it. import geopy ModuleNotFoundErrorTraceback (most recent call last) in 1 import pandas as pd …
kenansaleh
  • 31
  • 1
  • 3
2
votes
1 answer

Pandas use the value from previous row in a geopy distance

I am trying to compute geo-distance based on the coordinates from the previous row. Is there a way to compute without adding extra columns to the data-frame? Sample code: import pandas import geopy.distance d = {'id_col':['A','B','C','D'], …
mirk
  • 442
  • 4
  • 13
2
votes
1 answer

Can't loop the distance between two locations. TypeError: 'numpy.float64' object is not iterable

I have a csv file with locations: I have written a program that measures the distance between two locations. As I have many locations, I created a loop to iterate over the locations above. import pandas as pd import numpy as np from pandas import…
Abdulaziz Al Jumaia
  • 436
  • 2
  • 5
  • 22
2
votes
0 answers

Geopy: OSError: [Errno 101] Network is unreachable

I'm using Geopy library to convert a list of English name locations to latitude and longitude. However, halfway through the execution, the program raised an error: OSError: [Errno 101] Network is unreachable. I was wondering if there's related to my…
demid
  • 348
  • 5
  • 16
2
votes
1 answer

why does my geolocation it is not working?

The duty of my function is to calculate the distance from my business to any address (at the end (print fucntion) I put an example of an address)). I don´t know why it is not working, it says something about traceback error. The first part of my…
2
votes
1 answer

MacOS High OSierra 10.13.6, Python3.7, GeocoderServiceError: [SSL: CERTIFICATE_VERIFY_FAILED]

I recently installed python 3.7 on macOS High OSierra and spent ages trying to get it working. That question is here. Currently I am having problems with the below code and wondered if anyone can help. import geopy geocoder =…
az_aza
  • 61
  • 1
  • 5
2
votes
1 answer

Attempting to generate a regular geographic grid using python - lat/lng exceeds limits

I want to retrieve all lat/lon coordinate pairs of a regular grid across the US. I've sourced the following code from an earlier stacked question: import shapely.geometry import pyproj #…
user3200950
  • 73
  • 1
  • 1
  • 9
2
votes
1 answer

Python, geopy kill time limit

I read more thousand coordinates from a file, for that I want to get the related country. I tried to kill the time limit, but it doesn't work yet, it stops after 150-160 coordinates. Can I handle this? #!/usr/bin/python # -*- coding: utf-8…