:py:mod:`geovista.crs`
======================

.. py:module:: geovista.crs

.. autoapi-nested-parse::

   Coordinate reference system (CRS) utility functions.

   Notes
   -----
   .. versionadded:: 0.1.0

   ..
       !! processed by numpydoc !!


Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

   geovista.crs.from_wkt
   geovista.crs.get_central_meridian
   geovista.crs.has_wkt
   geovista.crs.projected
   geovista.crs.set_central_meridian
   geovista.crs.to_wkt



Attributes
~~~~~~~~~~

.. autoapisummary::

   geovista.crs.CRSLike
   geovista.crs.PlateCarree
   geovista.crs.WGS84


.. py:function:: from_wkt(mesh)

   
   Get the :class:`~pyproj.crs.CRS` associated with the mesh.


   :Parameters:

       **mesh** : :class:`~pyvista.PolyData`
           The mesh containing the :class:`~pyproj.crs.CRS` serialized as OGC
           Well-Known-Text (WKT).



   :Returns:

       :class:`~pyproj.crs.CRS`
           The Coordinate Reference System.








   .. rubric:: Notes

   .. versionadded:: 0.1.0



   ..
       !! processed by numpydoc !!

.. py:function:: get_central_meridian(crs)

   
   Retrieve the longitude of natural origin of the `CRS`.

   THe natural origin is also known as the central meridian.

   :Parameters:

       **crs** : :class:`~pyproj.crs.CRS`
           The Coordinate Reference System.



   :Returns:

       :class:`python:float`
           The central meridian, or ``None`` if the `crs` has no such parameter.








   .. rubric:: Notes

   .. versionadded:: 0.1.0



   ..
       !! processed by numpydoc !!

.. py:function:: has_wkt(mesh)

   
   Determine whether the provided mesh has a CRS serialized as WKT attached.


   :Parameters:

       **mesh** : :class:`~pyvista.PolyData`
           The mesh to be inspected for a serialized :class:`~pyproj.crs.CRS`.



   :Returns:

       :class:`python:bool`
           Whether the mesh has a :class:`~pyproj.crs.CRS` serialized as WKT attached.








   .. rubric:: Notes

   .. versionadded:: 0.4.0



   ..
       !! processed by numpydoc !!

.. py:function:: projected(mesh)

   
   Determine if the mesh is a planar projection.

   Simple heuristic approach achieved by attempting to inspect the associated
   :class:`~pyproj.crs.CRS` of the mesh. If the mesh :class:`~pyproj.crs.CRS` is
   unavailable then the weaker contract of inspecting the mesh geometry is
   used to detect for a flat plane.

   :Parameters:

       **mesh** : :class:`~pyvista.PolyData`
           The mesh to be inspected.



   :Returns:

       :class:`python:bool`
           Whether the mesh is projected.








   .. rubric:: Notes

   .. versionadded:: 0.1.0



   ..
       !! processed by numpydoc !!

.. py:function:: set_central_meridian(crs, meridian)

   
   Replace the longitude of natural origin in the :class:`~pyproj.crs.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:

       **crs** : :class:`~pyproj.crs.CRS`
           The Coordinate Reference System.

       **meridian** : :class:`python:float`
           The replacement central meridian.



   :Returns:

       :class:`~pyproj.crs.CRS` or :data:`python:None`
           The :class:`~pyproj.crs.CRS` with the specified central meridian, or ``None``
           if the :class:`~pyproj.crs.CRS` has no such parameter.








   .. rubric:: Notes

   .. versionadded:: 0.1.0



   ..
       !! processed by numpydoc !!

.. py:function:: to_wkt(mesh, crs)

   
   Attach serialized :class:`~pyproj.crs.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:

       **mesh** : :class:`~pyvista.PolyData`
           The mesh to contain the serialized OGC WKT.

       **crs** : :class:`~pyproj.crs.CRS`
           The Coordinate Reference System to be serialized.











   .. rubric:: Notes

   .. versionadded:: 0.2.0



   ..
       !! processed by numpydoc !!

.. py:data:: CRSLike
   :type:  TypeAlias
   :value: int | str | dict | CRS


   
   Type alias for a Coordinate Reference System.
















   ..
       !! processed by numpydoc !!

.. py:data:: PlateCarree

   
   WGS84 / Plate Carree (Equidistant Cylindrical).
















   ..
       !! processed by numpydoc !!

.. py:data:: WGS84

   
   Geographic WGS84.
















   ..
       !! processed by numpydoc !!

