Clip points, lines, or polygon geometries to the mask extent.
Both layers must be in the same Coordinate Reference System (CRS).
The gdf will be clipped to the full extent of the clip object.
If there are multiple polygons in mask, data from gdf will be
clipped to the total boundary of all polygons in mask.
Vector layer (point, line, polygon) to be clipped to mask.
Polygon vector layer used to clip gdf.
The mask’s geometry is dissolved into one geometric feature
and intersected with gdf.
If True, return only geometries of original type in case of intersection
resulting in multiple geometry types or GeometryCollections.
If False, return all resulting geometries (potentially mixed-types).
Vector data (points, lines, polygons) from gdf clipped to
polygon boundary from mask.
Clip points (global cities) with a polygon (the South American continent):
>>> world = geopandas.read_file(
>>> south_america = world[world['continent'] == "South America"]
>>> capitals = geopandas.read_file(
>>> sa_capitals = geopandas.clip(capitals, south_america)