onstove.VectorLayer.mask#

VectorLayer.mask(mask_layer: VectorLayer, output_path: str = None, keep_geom_type=False)[source]#

Wrapper for the geopandas.GeoDataFrame.clip method.

Clip points, lines, or polygon geometries to the mask extent.

Parameters:
mask_layer: VectorLayer

A VectorLayer object.

output_path: str, optional

A folder path where to save the output dataset. If not defined then the clipped dataset is not saved.

keep_geom_type: bool, default False

Determines whether single geometries are split in case of intersection during masking.