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.
513
questions
0
votes
0
answers
5
views
Used a random user_agent when using Geopy. What could be the consequences?
So, I realise this is a stupid question but hear me out. I wanted to find out the latitudes and longitudes from addresses in a dataframe.But when I ran the following cell, I got an error that asked me ...
0
votes
0
answers
32
views
Live Location using Python
I had to get live location using for an emergency service idea me and a group of friends had. I tried using geopy and geocoder but the location was far off from my actual one.
The code i tried is ...
1
vote
1
answer
38
views
Calculating Distance between 2 column coordinates
I am trying to create a distance matrix so am trying to calculate distances between coordinates across a column. I've tried to use the following but it keeps throwing me an error
**"ValueError: ...
1
vote
1
answer
48
views
Extract location information from latitude and longitude columns present in a cuDF dataframe?
I have a dataset in Pandas format, which I have converted to cuDF for faster processing of location extraction from the latitude and longitude columns present in the dataset. The CPU code that I have ...
0
votes
0
answers
19
views
geopy: 'The truth value of a Series is ambiguous.' using 'geodesic.distance' class
I'm defining the following function to help calculate the midpoint of three or more points on Earth using the Vincenty formulae. The refs variable is defined globally and I've imported the pandas, ...
0
votes
0
answers
15
views
Finding documentation and/or full list of possible return values for the type= attribute of raw location in Geopy?
I'm trying to classify addresses into their respective types. To do that, I'm running the address through Geopy to find the complete address, and then I am pulling the attribute 'type' from the raw ...
0
votes
0
answers
14
views
Error getting device's geolocalization using geopy and flask in a web app
I'm trying to make an app for my University. I have to get the student attendance and store the name, surname, student_id, date, time and localization in an sql table.
I tried some code lines but ...
0
votes
0
answers
49
views
Which library is more accurate in measuring geodesic distances in meters between points? (pyproj, geopy and haversine)
I calculated the distance in meters between 2 points using 3 different libraries in Python (pyproj, geopy, and haversine).
The results showed a major difference. How can I determine which result is ...
1
vote
1
answer
33
views
How to find centroids or geolocate ISO 3166 codes?
Is there a way to geolocate ISO 3166-1 alpha-3 codes (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) and get the centroid of the item ?
I would like to place a marker (a disk ...
0
votes
0
answers
30
views
separating python pandas data frame into increments
I am looking for a way to separate my Pandas dataframe into smaller increments. For some context I am making an ISS observer app, which aims to predict when there will be passes overhead of a person's ...
-1
votes
1
answer
55
views
Combine two variables into list as one in list
I'm trying to measure distance through geopy.
I have already gotten the latitude and longitude of the location with geopy but it's saved as individual variables. ie.
getloc = loc.geocode(a)
loclat ...
1
vote
2
answers
61
views
Parse DataFrame of postal addresses - remove country and unit number
I have a dataframe with a column of postal addresses (generated with geopy.geocoders GoogleV3 - I used it to parse my dataframe). The output of geolocator.geocode, however, has the country name - ...
0
votes
1
answer
46
views
Compare two sets of data frames (strings)
I have two pandas data frames: test_df and golden_df. There are poastal addresses in each of these frames. Basically, the test_df is user entered and may have several mistakes (missing street/pincode/...
0
votes
0
answers
24
views
I am trying to get xy location using adresseses from south africa in python and geopy
I am trying to use geopy to extract xy locotions from adresses based in south africa. I am getting the following error message
AttributeError: 'NoneType' object has no attribute 'latitude'
I tried ...
-1
votes
1
answer
64
views
Tracing latitude and longitude using Python library
Can anyone guide me with the best location tracker ,to trace latitude and longitude using Python library. I am volunteering for not-for-profit ( Wild Life rescue) and eagerly trying to trace the exact ...
1
vote
1
answer
85
views
Equivalent of R geosphere::distGeo in Python
I am translating R code to Python. I can't find a function to match the output of R function geosphere::distGeo in Python.
I have looked at a lot of answers here and it seems the Python equivalent is ...
0
votes
0
answers
162
views
Error using Nominatim API : HTTPSConnectionPool ... Max retries exceeded ... Failed to establish a new connection: [Errno 11001] getaddrinfo failed
I'm new to the Geopy library and the Nominatim library and I've encountred a problem.
I'm trying to get the latitude and longitude of an adress using the Nominatim API inside a Jupyter Notebook with a ...
1
vote
1
answer
111
views
Extract District from Coordinates Using Python
I have a collection of longitudes and latitudes, and I want to be able to extract the district of each of these coordinates using Python.
As of right now, I have developed the following function using ...
0
votes
1
answer
61
views
Geopy function only returning some cities?
I wrote a function using geopy to return the city from a set of coordinates containing latitude and longitude. However, the function only returned the city of about 10% of the entries. When I run the ...
0
votes
1
answer
100
views
How to store google search results in python as a json or dict to parse through for specific results?
I'm querying google for company information with the goal of obtaining the company's address or lat/lon. The ultimate goal is to plot the data in GIS. I realize there are services online that I can ...
0
votes
0
answers
105
views
Get physical address from a way containing nodes only
I'm new to geocoding stuff.
I have a list of addresses which I have to find the nearest residential buildings for. At first, I'm looking for basic data of these addresses using geopy.geocoders....
1
vote
0
answers
16
views
How can I use the geopy library to obtain a list or a consultation of all the cities of a country
I want to get a list of cities in Colombia to enter them into a database and I found the geopy library to do this, I don't know how to do it so I need help I have the following code but it tells me ...
0
votes
1
answer
186
views
calculate distance from address using geopandas
I have the python 3.7 code below. I'm using it to calculate the distance in miles between a point that I specify, the target_address, and a couple points that I have in a pandas dataframe. The code ...
1
vote
2
answers
164
views
How do I find closest locations for each location in a list from a dataframe of unique locations
What I have is a list of city + state locations like this:
import pandas as pd
city_state = [
['Austin, Texas', 30.264265060424805, -97.74750518798828],
['San Marcos, Texas', 29.882080, -97....
1
vote
0
answers
189
views
How to reverse geocode PySpark dataframe? I have VehicleID, eventdatetime, latitude, longitude, vehicle speed columns and over a million rows
I have VehicleID, eventdatetime, latitude, longitude, vehicle speed columns and over a million rows.
I need to fetch city, state, district for the same.
here is the working python code snippet for the ...
0
votes
0
answers
42
views
How to calculate the datetime by TLE and a coodinate?
I have a Sat's TLE data and a point in (lat, lon), how can I calculate the datetime when that Sat pass the point? I tried as below, but I got The CSS will reachreach (40.9666, 100.3) from current ...
0
votes
1
answer
49
views
How to get lat/lon from shape files?
I am a newbie to geospatial data. I was wondering if there are any ways to extract lat/lon points from a shape file or a csv file(MULLTILINE)
I have tried coding it using Geopy,Fiona etc to convert a ...
0
votes
1
answer
58
views
How to calculate the first point where a line intersects a circle radius on a map, efficiently?
I am using geopy to calculate the first point where a straight line intersects a circle on a map, this code works perfectly as expected but I believe is quite inefficient as it has to compute the lat/...
2
votes
1
answer
46
views
Geopandas gets creative when it can't find the street
I have noticed an interesting behavior when when working with Geopandas. When Geopandas is fed a street that it presumably cannot find, it will somehow substitute an existing street that seems to be ...
-2
votes
1
answer
75
views
Geopy Geocoders returns the correct results in one way, but not another
I'm trying to find the address of some universities. If I do this, everything is totally fine.
import pandas as pd
import numpy as np
import pandas as pd
from geopy.geocoders import Nominatim
...
0
votes
2
answers
109
views
Distance between points from two different datasets
I have two different datasets (samples below):
dataset 1
dataset 2
I am trying to find the minimum distance between each site in dataset 1 and dataset 2. So each location in dataset 1 would have a ...
0
votes
0
answers
174
views
ModuleNotFoundError: No module named 'Geopy'
I'm trying to install geopy and import it so that I can create a coordinate column for the data in my project. I installed it using pip, as you can see it's located in the python 3.11 environment ...
0
votes
1
answer
402
views
Calculating points along a line between two points using geopy
I am using geopy to map the location of a simulated object as it travels between two geographical points. I would like to be able to calculate the lat/lon of this object at any point in its ...
1
vote
0
answers
1k
views
GeocoderUnavailable: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain
I am currently trying to start working with geopy but I just can't get through a certification error:
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="autenticador")...
2
votes
1
answer
134
views
disabling tls certificate checking not working
I'm having issues in android (kivy) about ssl verification:
02-12 18:19:15.622 5082 5116 I python : geopy.exc.GeocoderUnavailable: HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443):...
1
vote
1
answer
594
views
Iterating through a dataframe to obtain location data from coordinates
I have a pandas dataframe that contains latitude and longitude and am trying to create a function to take the coordinates and determine what state each location is in. I am using geopy to obtain ...
1
vote
1
answer
128
views
Organizing latitude and longitude into separate columns using Pandas and Geopy to geocode a list of addresses
I have set up a geocoding procedure in Python to determine the coordinates of a list of addresses in a csv file. I have it all set up and geocoding, however, I am struggling to figure out how to put ...
0
votes
0
answers
133
views
Geopy Nominatim SSLCertVerificationError
I am trying to use Nominatim to do geocoding but get an SSL Error of:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)
The error ...
0
votes
2
answers
83
views
how can i solve error ''float' object is not iterable'
im new at python, and try to categorize places an df1 by distance to places in df2, but something gonna wrong
i have 2 dataframes whith coordinate of places
import pandas as pd
import geopy.distance
...
2
votes
1
answer
144
views
Why do the Pyproj and Haversine methods to calculate heading from two lat/lon points differ from what Google Earth displays?
I am trying to implement a short python function to calculate the heading between two points. In other words if I am at point one, what heading relative to true north would I need to take to get to ...
0
votes
1
answer
466
views
How to search strictly by city state in geocode python
I'm using geopy Nominatim to get latitude longitude for a given city state, but the problem is, it searches for everything in an address and not just the city state.
My implementation is something ...
0
votes
0
answers
32
views
How to run this python code and connect it to firebase?
I'm new to python and I want to run this using a for loop...
I have made a backend script using Geopy such that it checks for locations in the list I have...to check for the shortest distance for a ...
0
votes
1
answer
130
views
Endless execution with spark udf
I'm want to get the country with lat and long, so i used geopy and create a sample dataframe
data = [{"latitude": -23.558111, "longitude": -46.64439},
{"latitude":...
0
votes
1
answer
461
views
Struggling with geopy install. ModuleNotFoundError: No module named 'geopy.geocoders'
I ran pip install geopy and it seemed to install ok, but I couldn't run the following script.
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="ryan_data")
location = ...
1
vote
1
answer
515
views
Get address using Latitude and Longitude from two columns in DataFrame?
I have a dataframe with the longitude column and latitude column. When I try to get the address using geolocator.reverse() I get the error ValueError: Must be a coordinate pair or Point
I can't for ...
1
vote
1
answer
216
views
Getting address with geopy takes too long
In the context of a project, I have hydrated 1.6 million tweets, i.e retrieved the metadata associated with the tweets such as date of creation, and location.
My tweet dataset contains tweets from all ...
1
vote
0
answers
733
views
My geopy.geocoders is throwing error: SSL: CERTIFICATE_VERIFY_FAILED. How can I resolve this? [duplicate]
When I try to run this code.
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="ryan_data")
location = geolocator.geocode("175 5th Avenue NYC")
print(location....
0
votes
0
answers
112
views
how to convert latitude longitude to address data in jupyter
I have a latitude longitude csv file.
The csv file that I have is look like this below and this data has over 100,000.
destination_latitidue destination_latitude
37.514623 37.514623
37....
0
votes
1
answer
614
views
Geopy distance import not working. ModuleNotFoundError: No module named 'geopy'
I am working on a project and a sub task is to find the distance between two points. However, the geopy module isn't functioning.
I have pip installed the module: pip install geopy. However, when I ...
0
votes
1
answer
185
views
How to collect a list of latitude and longitude data for a location dataframe?
I recently started coding in Python. I'm importing a csv file containing around 848 unique locations across India, and would like to use the geopy module to add in latitude and longitude for each ...