symerio / pgeocode

Postal code geocoding and distance calculation
https://pgeocode.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
231 stars 57 forks source link

Add support for 'full' GeoName databases #75

Closed ghost closed 11 months ago

ghost commented 1 year ago

GeoNames databases include some countries with their full postcode, all of which have the pattern "_full.csv" in their name. This commit allows users to take advantage of these databases by adding '_full' to the country:

> import pgeocode
> nomi = pgeocode.Nominatim('gb_full')
> nomi.query_postal_code('BS8 1QU')
postal_code                   BS8 1QU
country_code                       GB
place_name                    Bristol
state_name                    England
state_code                        ENG
county_name                   Bristol
county_code                       NaN
community_name    City of Bristol (B)
community_code              E06000023
latitude                      51.4571
longitude                     -2.6073
accuracy                            6
Name: 0, dtype: object
paddyroddy commented 1 year ago

This is a very useful feature 🙏

cimadure commented 11 months ago

Wonderfull !! Many thanks

rennyS commented 8 months ago

im unable to use a predownloaded dataset for this, I cant access the URL for geonames website because of my work proxy ( wanting to test some things for proof of concept )