vectordata.GeoVectorData
Abstract class for datasets containing geospatial vector data.
Usage
vectordata.GeoVectorData(cache_dir=None)Attributes
| Name | Description |
|---|---|
| metadata | Metadata container for dataset attribution and licensing. |
| processed_path | Path to the processed data. |
| raw_path | Path to the raw downloaded data. |
metadata
Metadata container for dataset attribution and licensing.
metadata: DatasetMetadata
processed_path
Path to the processed data.
processed_path: Path
raw_path
Path to the raw downloaded data.
raw_path: Path
Methods
| Name | Description |
|---|---|
| __init__() | Initialize the dataset. |
| __repr__() | Return the technical string representation. |
| cleanup() | Remove cached dataset files, keeping the processed data by default. |
| get_data() | Return the processed data, preparing it if necessary. |
__init__()
Initialize the dataset.
Usage
__init__(cache_dir=None)Parameters
cache_dir: str or Path or None = None- The root directory where the dataset is stored. Defaults to the ‘FREEZEBASE_CACHE’ environment variable or the system cache directory (in that order).
__repr__()
Return the technical string representation.
Usage
__repr__()cleanup()
Remove cached dataset files, keeping the processed data by default.
Usage
cleanup(*, raw=True, processed=False)By default removes only the raw download to free cache space while keeping the processed GeoParquet. Pass processed=True to also remove the processed data (e.g. to wipe the dataset entirely), or raw=False, processed=True to remove only the processed data.
Overwrite this method if the raw or processed paths are directories (e.g., an extracted ZIP) instead of single files.
get_data()
Return the processed data, preparing it if necessary.
Usage
get_data(*, download=False)