pyresample.future.geometry package
Submodules
pyresample.future.geometry.area module
Definitions for uniform gridded areas.
- class pyresample.future.geometry.area.AreaDefinition(crs: str | int | dict | CRS, shape: tuple[int, ...], area_extent: tuple[float, float, float, float], attrs: dict | None = None)
Bases:
AreaDefinition
Uniformly-spaced grid of pixels on a coordinate referenced system.
- Parameters:
crs – Dictionary of PROJ parameters or string of PROJ or WKT parameters. Can also be a
pyproj.crs.CRS
object.shape – 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 – Area extent as a list (lower_left_x, lower_left_y, upper_right_x, upper_right_y)
attrs –
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:
- shape
Shape of the grid as (rows, columns).
- area_extent_ll
Area extent in lons lats as a tuple (lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat)
- Type:
- upper_left_extent
Coordinates (x, y) of upper left corner of upper left pixel in projection units
- Type:
- pixel_offset_x
x offset between projection center and upper left corner of upper left pixel in units of pixels.
- Type:
- pixel_offset_y
y offset between projection center and upper left corner of upper left pixel in units of pixels.
- Type:
- 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
- to_legacy() AreaDefinition
Create a pyresample 1.x AreaDefinition object from this instance.
pyresample.future.geometry.swath module
Definitions for swath-based or non-uniform geometries.
- class pyresample.future.geometry.swath.SwathDefinition(lons, lats, crs=None, attrs=None)
Bases:
SwathDefinition
Swath defined by lons and lats.
- Parameters:
lons (numpy array)
lats (numpy array)
crs (pyproj.CRS,) – The CRS to use. longlat on WGS84 by default.
attrs (dict,) – A dictionary made to store metadata.
- concatenate(other)
Concatenate coordinate definitions.
Module contents
Definitions for geographic regions.