pyinterp.geometry.cartesian.algorithms.to_wkt#
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.Point) str#
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.LineString) str
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.Ring) str
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.Polygon) str
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.MultiPoint) str
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.MultiLineString) str
- pyinterp.geometry.cartesian.algorithms.to_wkt(geometry: pyinterp.core.geometry.cartesian.MultiPolygon) str
Converts a geometry to Well-Known Text (WKT) representation.
WKT is a text markup language for representing vector geometry objects. It provides a human-readable format for geometry data interchange.
- Parameters:
geometry – The geometry to convert.
- Returns:
A string containing the WKT representation (e.g., “POINT(1 2)”).
Examples
>>> point = Point(1.0, 2.0) >>> wkt = to_wkt(point) >>> # Returns "POINT(1 2)"
>>> polygon = Polygon(...) >>> wkt = to_wkt(polygon) >>> # Returns "POLYGON((...))"