pyinterp.geometry.geographic.algorithms.to_wkt

Contents

pyinterp.geometry.geographic.algorithms.to_wkt#

pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.Point) → str#
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.LineString) → str
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.Ring) → str
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.Polygon) → str
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.MultiPoint) → str
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.MultiLineString) → str
pyinterp.geometry.geographic.algorithms.to_wkt(geometry: pyinterp.core.geometry.geographic.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((...))"