regionmask.Region_cls

class regionmask.Region_cls(number, name, abbrev, outline, centroid=None)

a single Region, used as member of ‘Regions_cls’

Attributes

polygon shapely Polygon or MultiPolygon of the region
coords numpy array of the region
number (int) Number of this region.
name (string) Long name of this region.
abbrev (string) Abbreviation of this region.
centroid (1x2 ndarray) Center of mass of this region.
__init__(number, name, abbrev, outline, centroid=None)
Parameters:

number : int

Number of this region.

name : string

Long name of this region.

abbrev : string

Abbreviation of this region.

outline : Nx2 float array of vertices, Polygon or MultiPolygon

Coordinates/ outline of the region as shapely Polygon/ MultiPolygon or list.

centroid : 1x2 iterable, optional.

Center of mass of this region. If not provided is calculated by as (Multi)Polygon.centroid

Methods

__init__(number, name, abbrev, outline[, …])
Parameters:

Attributes

coords numpy array of the region
polygon shapely Polygon or MultiPolygon of the region