- classmethod Regions.from_geodataframe(df, *, name=None, source=None, overlap=None)
df (geopandas.GeoDataFrame) – GeoDataFrame to be transformed to a Regions class.
name (str, optional) – name of the Regions. If None uses
source (str, optional) – Source of the shapefile. If None uses
overlap (bool, default: None) – Indicates if (some of) the regions overlap. If None uses
df.attrs.get("overlap"). If True
mask_3Dwill ensure overlapping regions are correctly assigned to grid points while
maskwill error (because overlapping regions cannot be represented by a 2D mask).
If False assumes non-overlapping regions. Grid points will silently be assigned to the region with the higher number (this may change in a future version).
There is (currently) no automatic detection of overlapping regions.