Open
Description
Summary
I'm getting the wrong postcode when I look up from coordinates
Simple repeatable report:
from geopy.geocoders import Nominatim
from_zip = Nominatim(user_agent="zip_code_lookup").geocode(77479, country_codes="US", exactly_one=True, addressdetails=True)
from_coords = Nominatim(user_agent="coordinate_lookup").reverse( "28.704411, -81.461527", exactly_one=True)
print(f"{from_zip}\n{from_coords}")
> Location(77479, Sugar Land, Fort Bend County, Texas, United States, (29.57213280453772, -95.62940092439024, 0.0))
> Location(Sweetwater Country Club, 4400, Oak Tree Court, Sweetwater Country Club, Orange County, Florida, 77479, United States, (28.70115895, -81.46442439727869, 0.0))
from_coords
should have a postcode 32712 but instead is 77479
The locations differ by over 10 degrees zonally so this isn't a precision issue
Versions
Python 3.11.8 (main, Feb 6 2024, 21:21:21) [Clang 15.0.0 (clang-1500.1.0.2.5)] on darwin
geopy==2.4.1
Metadata
Metadata
Assignees
Labels
No labels