regionmask._OneRegion¶
-
class
regionmask.
_OneRegion
(number, name, abbrev, outline, centroid=None)¶ a single Region, used as member of ‘Regions’
- Attributes
- numberint
Number of this region.
- namestring
Long name of this region.
- abbrevstring
Abbreviation of this region.
polygon
Polygon or MultiPolygonshapely Polygon or MultiPolygon of the region
coords
numpy arraynumpy array of the region
- centroid1x2 ndarray
Center of mass of this region. Position of the label on map plots.
-
__init__
(self, number, name, abbrev, outline, centroid=None)¶ - Parameters
- numberint
Number of this region.
- namestring
Long name of this region.
- abbrevstring
Abbreviation of this region.
- outlineNx2 array of vertices, Polygon or MultiPolygon
Coordinates/ outline of the region as shapely Polygon/ MultiPolygon or list.
- centroid1x2 iterable, optional.
Center of mass of this region. If not provided is calculated as (Multi)Polygon.centroid. Position of the label on map plots.
Methods
__init__
(self, number, name, abbrev, outline)- Parameters
Attributes
bounds of the regions ((Multi)Polygon.bounds (min_lon, min_lat, max_lon, max_lat)
numpy array of the region
shapely Polygon or MultiPolygon of the region