gdf.pc.crop() or PointCloud.crop()#
- GeometryPointCloudBase.crop(bbox=None, mode='intersects', *, inplace=False, crop_geom=None, **kwargs)#
Crop vector to a bounding box, without modifying geometric features.
- Overloads:
bbox (RasterBase |
DataArray| VectorBase |GeoDataFrame|tuple[float,float,float,float]), mode (Literal['intersects','within']) ='intersects', *, inplace (Literal[False]) =False, crop_geom (Any) =None, **kwargs (Any) →VectorBaseType|GeoDataFramebbox (RasterBase |
DataArray| VectorBase |GeoDataFrame|tuple[float,float,float,float]), mode (Literal['intersects','within']) ='intersects', *, inplace (Literal[True]), crop_geom (Any) =None, **kwargs (Any) →Nonebbox (RasterBase |
DataArray| VectorBase |GeoDataFrame|tuple[float,float,float,float]), mode (Literal['intersects','within']) ='intersects', *, inplace (bool) =False, crop_geom (Any) =None, **kwargs (Any) →VectorBaseType|GeoDataFrame|None
Equivalent to selecting geometries intersecting or contained within a bounding box. To cut each feature with another geometry or bounding box, use
clip().Match-reference: a reference raster or vector can be passed to match bounds during cropping.
- Parameters:
bbox (geoutils.raster.base.RasterBase |
DataArray|VectorBase|GeoDataFrame|tuple[float,float,float,float]) – Bounding box or georeferenced reference object defining the selected extent.mode (
Literal['intersects','within']) –"intersects"keeps every geometry touching the extent."within"keeps only geometries entirely inside it.inplace (
bool) – Whether to replace this vector’s selected rows. Dask-backed vectors cannot be changed in place.crop_geom (
Any) – Deprecated alias ofbbox.kwargs (
Any) – Deprecatedclipargument. Use clip() for exact clipping.
- Returns:
A vector or dataframe containing unchanged selected geometries, or None when
inplace=True.