geovista.crs
#
Coordinate reference system (CRS) utility functions.
Notes#
Added in version 0.1.0.
Module Contents#
Functions#
|
Get the |
|
Retrieve the longitude of natural origin of the CRS. |
|
Determine whether the provided mesh has a CRS serialized as WKT attached. |
|
Determine if the mesh is a planar projection. |
|
Replace the longitude of natural origin in the |
|
Attach serialized |
Attributes#
Type alias for a Coordinate Reference System. |
|
WGS84 / Plate Carree (Equidistant Cylindrical). |
|
Geographic WGS84. |
- geovista.crs.from_wkt(mesh)[source]#
Get the
CRS
associated with the mesh.- Parameters:
- Returns:
CRS
The Coordinate Reference System.
Notes
Added in version 0.1.0.
- geovista.crs.get_central_meridian(crs)[source]#
Retrieve the longitude of natural origin of the CRS.
THe natural origin is also known as the central meridian.
- Parameters:
- crs
CRS
The Coordinate Reference System.
- crs
- Returns:
float
The central meridian, or
None
if the crs has no such parameter.
Notes
Added in version 0.1.0.
- geovista.crs.has_wkt(mesh)[source]#
Determine whether the provided mesh has a CRS serialized as WKT attached.
- Parameters:
- Returns:
Notes
Added in version 0.4.0.
- geovista.crs.projected(mesh)[source]#
Determine if the mesh is a planar projection.
Simple heuristic approach achieved by attempting to inspect the associated
CRS
of the mesh. If the meshCRS
is unavailable then the weaker contract of inspecting the mesh geometry is used to detect for a flat plane.Notes
Added in version 0.1.0.
- geovista.crs.set_central_meridian(crs, meridian)[source]#
Replace the longitude of natural origin in the
CRS
.The natural origin is also known as the central meridian.
Note that, the crs is immutable, therefore a new instance will be returned with the specified central meridian.
- Parameters:
- Returns:
Notes
Added in version 0.1.0.
- geovista.crs.to_wkt(mesh, crs)[source]#
Attach serialized
CRS
as Well-Known-Text (WKT) to the mesh.The serialized OGC WKT is attached to the
field_data
of the mesh in-place.- Parameters:
Notes
Added in version 0.2.0.
- geovista.crs.CRSLike: TypeAlias = int | str | dict | CRS#
Type alias for a Coordinate Reference System.
- geovista.crs.PlateCarree#
WGS84 / Plate Carree (Equidistant Cylindrical).
- geovista.crs.WGS84#
Geographic WGS84.