pyresample.future.geometry.area module
Definitions for uniform gridded areas.
- class pyresample.future.geometry.area.AreaDefinition(crs, shape, area_extent, attrs=None)
Bases:
AreaDefinitionUniformly-spaced grid of pixels on a coordinate referenced system.
- Parameters:
crs (
Union[str,int,dict,CRS]) – Dictionary of PROJ parameters or string of PROJ or WKT parameters. Can also be apyproj.crs.CRSobject.shape (
tuple[int,...]) – Shape of the geographic region. Currently only a 2-element tuple is supported. The first element should be the number of elements in the Y direction (rows) and the second in the X direction (columns). So the final tuple is (rows, columns).area_extent (
tuple[float,float,float,float]) – Area extent as a list (lower_left_x, lower_left_y, upper_right_x, upper_right_y)attrs (
Optional[dict]) –Arbitrary metadata related to the area. Some keys in this dictionary have special meaning and may be used for various logging or serialization processes. The primary special keys are:
- name: The identifying name for this area. This is equivalent
to ‘area_id’ in the legacy AreaDefinition class. It is used in YAML serialization if provided. Defaults to an empty string if not provided. Not providing this should not affect normal coordinate operations.
- description: A human-readable description of the area. This is
equivalent to ‘description’ in the legacy AreaDefinition class. It is used in YAML serialization if provided.
- area_id
Identifier for the area. This is a convenience for backwards compatibility and accesses the
.attrs['name']metadata. This will be set to an empty string if not provided.- Type:
str
- shape
Shape of the grid as (rows, columns).
- width
x dimension in number of pixels, aka number of grid columns
- Type:
int
- height
y dimension in number of pixels, aka number of grid rows
- Type:
int
- size
Number of points in grid
- Type:
int
- area_extent_ll
Area extent in lons lats as a tuple (lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat)
- Type:
tuple
- pixel_size_x
Pixel width in projection units
- Type:
float
- pixel_size_y
Pixel height in projection units
- Type:
float
- upper_left_extent
Coordinates (x, y) of upper left corner of upper left pixel in projection units
- Type:
tuple
- pixel_upper_left
Coordinates (x, y) of center of upper left pixel in projection units
- Type:
tuple
- pixel_offset_x
x offset between projection center and upper left corner of upper left pixel in units of pixels.
- Type:
float
- pixel_offset_y
y offset between projection center and upper left corner of upper left pixel in units of pixels.
- Type:
float
- crs
Coordinate reference system object similar to the PROJ parameters in proj_dict and proj_str. This is the preferred attribute to use when working with the pyproj library. Note, however, that this object is not thread-safe and should not be passed between threads.
- Type:
CRS
- attrs
Arbitrary metadata related to the area.
- Type:
dict
Initialize AreaDefinition.
- __init__(crs, shape, area_extent, attrs=None)
Initialize AreaDefinition.
- to_legacy()
Create a pyresample 1.x AreaDefinition object from this instance.
- Return type: