clip

eolab.georastertools.processing.vector.clip(geoms: GeoDataFrame | Path | str, raster: Path | str, output: Path | str | None = None, driver: str = 'GeoJSON') GeoDataFrame[source]

Clip the geometries to the raster bounds. Clipping is supposed to be a little bit faster than intersect

Parameters:
  • geoms (str or Path or gpd.GeoDataFrame) – Filename of the vector data (if str) or GeoDataFrame

  • raster (str or Path) – Raster image

  • output (str or Path, optional, default=None) – File where to save the clipped geoms If None, nothing written to disk (only in memory)

  • driver (str, optional, default=GeoJSON) – Driver to write the output

Returns:

The clipped geometries

Return type:

gpd.GeoDataFrame