lair.geo.CRS#
- class lair.geo.CRS(crs)[source]#
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) – The CRS: another
CRS, an EPSG code (4326), an"EPSG:..."string, a cartopy, pyproj or rasterio CRS, or anythingpyproj.CRS.from_user_inputreads (a PROJ string, WKT).- Variables:
crs (pyproj.CRS) – Pyproj CRS object
See also
write_rio_crsWrites a CRS to xarray data.
Examples
>>> from lair.geo import CRS >>> CRS("EPSG:4326").epsg 4326 >>> CRS(4326).to_pyproj().name 'WGS 84'
Attributes
Get the EPSG code of the CRS. |
|
Get the PROJ4 string of the CRS. |
|
Get the units of the CRS. |
|
Get the WKT string of the CRS. |
Methods
Convert to cartopy CRS. |
|
Convert to pyproj CRS. |
|
Convert to rasterio CRS. |