GeoparquetLoader
srai.loaders.GeoparquetLoader ¶
Bases: Loader
GeoparquetLoader.
Geoparquet [1] loader is a wrapper for a geopandas.read_parquet
function
and allows for an automatic index setting and additional geometry clipping.
References
load ¶
load(
file_path: Union[Path, str],
index_column: Optional[str] = None,
columns: Optional[list[str]] = None,
area: Optional[gpd.GeoDataFrame] = None,
) -> gpd.GeoDataFrame
Load a geoparquet file.
PARAMETER | DESCRIPTION |
---|---|
file_path
|
parquet file path.
TYPE:
|
index_column
|
Column that will be used as an index. If not provided, automatic indexing will be applied by default. Defaults to None.
TYPE:
|
columns
|
List of columns to load. If not provided, all will be loaded. Defaults to None.
TYPE:
|
area
|
Mask to clip loaded data. If not provided, unaltered data will be returned. Defaults to None.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
ValueError
|
If provided index column doesn't exists in list of loaded columns. |
RETURNS | DESCRIPTION |
---|---|
GeoDataFrame
|
gpd.GeoDataFrame: Loaded geoparquet file as a GeoDataFrame. |