8000 Bug: Reverse using coordinates returns invalid zip code · Issue #582 · geopy/geopy · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug: Reverse using coordinates returns invalid zip code #582
Open
@jeliashi

Description

@jeliashi

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0