pixcdust.converters.shapefile

Shapefile converter.

Classes

Nc2ShpConverter

Converter from official SWOT Pixel Cloud Netcdf to Shapefile database

Module Contents

class pixcdust.converters.shapefile.Nc2ShpConverter(path_in: str | Iterable[str] | pathlib.Path | Iterable[pathlib.Path], variables: list[str] | None = None, area_of_interest: geopandas.GeoDataFrame | None = None, conditions: dict[str, dict[str, str | float]] | None = None)[source]

Bases: pixcdust.converters.core.Converter

Converter from official SWOT Pixel Cloud Netcdf to Shapefile database

Attributes:

path_in: List of path of files to convert. variables: Optionally only read these variables. area_of_interest: Optionally only read points in area_of_interest. conditions: Optionally pass conditions to filter variables. Example: { “sig0”:{‘operator’: “ge”, ‘threshold’: 20}, “classification”:{‘operator’: “ge”, ‘threshold’: 3}, }

database_from_nc(path_out: str | pathlib.Path, mode: str = 'w') None[source]

Convert the path_in files to path_out. Args:

path_out: Output path of the convertion. mode: Writing mode of the output. Must be ‘w’(write/append) or ‘o’(overwrite).