acept.plz_shape
Module for accessing the PLZ shapes.
- Use this module to
get information about the PLZ areas.
calculate the centroid of the PLZ area for a given PLZ.
read the shape file containing the PLZ areas.
get the PLZ shape for a given PLZ.
Note
The path to the shape file is defined in accept.config.PLZ_PATH
Module Contents
Functions
|
Reads shape file defining the PLZ areas and returns it as a GeoDataFrame. |
|
Reads the PLZ shape file and returns the information of a given PLZ. |
|
Calculates the centroid of the PLZ area. |
- acept.plz_shape.read_plz_shapefile(plz_path: str = PLZ_PATH) geopandas.GeoDataFrame[source]
Reads shape file defining the PLZ areas and returns it as a GeoDataFrame.
- Parameters:
plz_path (str) – path to the shapefile defining the PLZ areas. Default:
accept.config.PLZ_PATH- Returns:
GeoDataFrame defining all PLZ areas in EPSG:4326
- Return type:
- acept.plz_shape.get_single_plz_shape(plz: str) geopandas.GeoDataFrame[source]
Reads the PLZ shape file and returns the information of a given PLZ.
- Parameters:
plz (str) – The PLZ to be searched.
- Returns:
GeoDataFrame containing the information of the given PLZ.
- Return type:
- acept.plz_shape.calculate_centroid_of_plz(plz: str) shapely.Point[source]
Calculates the centroid of the PLZ area.
- Parameters:
plz (str) – The PLZ to be searched.
- Returns:
The centroid of the PLZ area as a Point(lon, lat).
- Return type: