Skip to main content

read_domain

read_domain(source, layer=None, *, crs=None)

Read the domain from a GIS layer; its polygons are merged into one.

Parameters

Name Type Description Default
source (str, path - like or GeoDataFrame) A GeoPackage or shapefile, or an object with geometry and crs attributes such as a GeoDataFrame (geopandas itself is not needed). required
layer str Layer name; required when the file has more than one layer. None
crs pyproj.CRS or str or int CRS of a layer that has none. A layer without CRS raises an error unless it is given; a layer with a different CRS raises an error too. None

Returns

Name Type Description
Areas One (multi)polygon with the CRS of the layer.

Raises

Name Type Description
InputError If the file or layer cannot be read, the layer has no CRS and none is given, a feature has no geometry or is not a polygon, or the layer is empty.