lair.geo.CRS#

class lair.geo.CRS(crs)[source]#

Bases: object

Coordinate Reference System (CRS) class.

This class is a wrapper around the pyproj.CRS class, with additional methods for converting to other CRS classes.

See https://pyproj4.github.io/pyproj/stable/crs_compatibility.html#cartopy for more information.

Note

osgeo, fiona, and pycrs conversions have not been implemented.

Parameters:

crs (Any)

crs#

Pyproj CRS object

Type:

pyproj.CRS

epsg#

EPSG code of the CRS

Type:

int | None

proj4#

PROJ4 string of the CRS

Type:

str

wkt#

WKT string of the CRS

Type:

str

property epsg: int | None#

Get the EPSG code of the CRS.

property proj4: str#

Get the PROJ4 string of the CRS.

property units: str#

Get the units of the CRS.

property wkt: str#

Get the WKT string of the CRS.

to_cartopy()[source]#

Convert to cartopy CRS.

Return type:

cartopy.crs.CRS

to_rasterio()[source]#

Convert to rasterio CRS.

Return type:

rasterio.CRS

to_pyproj()[source]#

Convert to pyproj CRS.

Return type:

pyproj.CRS