pgeocode.GeoDistance
- class pgeocode.GeoDistance(country: str = 'fr', errors: str = 'ignore')[source]
Distance calculation from a city name or a postal code
- Parameters:
data_path (str) – path to the dataset
error (str, default='ignore') – how to handle not found elements. One of ‘ignore’ (return NaNs), ‘error’ (raise an exception), ‘nearest’ (find from nearest valid points)
Methods
__init__
([country, errors])query_location
(name[, top_k, ...])Get location information from a place name
query_postal_code
(x, y)Get distance (in km) between postal codes