pixcdust.readers.gpkg¶
Converted Pixcdust GeoPackage Reader.
Classes¶
GeoPackage pixcdust database reader. |
Module Contents¶
- class pixcdust.readers.gpkg.GpkgReader(path: str | pathlib.Path, area_of_interest: geopandas.GeoDataFrame | None = None)[source]¶
Bases:
pixcdust.readers.base_reader.BaseReaderGeoPackage pixcdust database reader.
Read a database from a GeoPackage file . You can then request a xr.Dataset, pd.DataFrame or gpd.GeoDataFrame view of the database.
- Attributes:
path: Path to read. variables: Not supported. area_of_interest: Optionally only read points in area_of_interest. MULTI_FILE_SUPPORT: False, only support one file.
- property data: xarray.Dataset[source]¶
Return an xarray.Dataset view from the database loaded.
Equivalent to to_xarray.
- Returns:
Dataset read
- to_geodataframe() geopandas.GeoDataFrame[source]¶
Convert the database read to a gpd.GeoDataFrame. Only points in self.area_of_interest are included.
- Returns:
GeoDataFrame read.
- read_single_layer(layer: str) geopandas.GeoDataFrame[source]¶
Read and return a single layer of geopackage database.
Don’t load the read data into the class (can’t be then converted by the reader). Use read for more advanced usage.
- Args:
layer : name of the geodataframe layer to read. Must be in self.layers
- Returns:
Geodataframe containing data read from layer