datacube.utils.geometry.CRS#

class datacube.utils.geometry.CRS(crs_spec)[source]#

Wrapper around pyproj.CRS for backwards compatibility.

Parameters

crs_str – string representation of a CRS, often an EPSG code like ‘EPSG:4326’

Raises

pyproj.exceptions.CRSError

__init__(crs_spec)[source]#
Parameters

crs_str – string representation of a CRS, often an EPSG code like ‘EPSG:4326’

Raises

pyproj.exceptions.CRSError

Methods

__init__(crs_spec)

param crs_str

string representation of a CRS, often an EPSG code like 'EPSG:4326'

to_epsg()

EPSG Code of the CRS or None

to_wkt([pretty, version])

WKT representation of the CRS

transformer_to_crs(other[, always_xy])

Returns a function that maps x, y -> x', y' where x, y are coordinates in this stored either as scalars or ndarray objects and x', y' are the same points in the other CRS.

Attributes

DEFAULT_WKT_VERSION

crs_str

DEPRECATED

dimensions

List of dimension names of the CRS.

epsg

Optional[int]

geographic

bool

inverse_flattening

proj

Access proj.CRS object that this wraps

projected

bool

semi_major_axis

semi_minor_axis

units

List of dimension units of the CRS.

valid_region

Return valid region of this CRS.

wkt

str

Attributes:

crs_str

DEPRECATED

dimensions

List of dimension names of the CRS.

proj

Access proj.CRS object that this wraps

units

List of dimension units of the CRS.

valid_region

Return valid region of this CRS.

Methods:

to_epsg()

EPSG Code of the CRS or None

to_wkt([pretty, version])

WKT representation of the CRS

transformer_to_crs(other[, always_xy])

Returns a function that maps x, y -> x', y' where x, y are coordinates in this stored either as scalars or ndarray objects and x', y' are the same points in the other CRS.

property crs_str: str#

DEPRECATED

Return type

str

property dimensions: Tuple[str, str]#

List of dimension names of the CRS. The ordering of the names is intended to reflect the numpy array axis order of the loaded raster.

Return type

Tuple[str, str]

property proj: pyproj.crs.crs.CRS#

Access proj.CRS object that this wraps

Return type

CRS

to_epsg()[source]#

EPSG Code of the CRS or None

Return type

Optional[int]

to_wkt(pretty=False, version=None)[source]#

WKT representation of the CRS

Return type

str

transformer_to_crs(other, always_xy=True)[source]#

Returns a function that maps x, y -> x’, y’ where x, y are coordinates in this stored either as scalars or ndarray objects and x’, y’ are the same points in the other CRS.

Return type

Callable[[Any, Any], Tuple[Any, Any]]

property units: Tuple[str, str]#

List of dimension units of the CRS. The ordering of the units is intended to reflect the numpy array axis order of the loaded raster.

Return type

Tuple[str, str]

property valid_region: Optional[datacube.utils.geometry._base.Geometry]#

Return valid region of this CRS.

Bounding box in Lon/Lat as a 4 point Polygon in EPSG:4326. None if not defined

Return type

Optional[Geometry]