Skip to main content

Module wkt

Module wkt 

Source
Expand description

Well-Known Text (WKT) serialization and parsing for Geometry types.

Standard interchange format used by PostGIS, ArcadeDB (Spatial4J), and most GIS tools. Format examples:

  • POINT(lng lat)
  • LINESTRING(lng1 lat1, lng2 lat2)
  • POLYGON((lng1 lat1, lng2 lat2, ...), (hole1...))
  • MULTIPOINT((lng1 lat1), (lng2 lat2))
  • GEOMETRYCOLLECTION(POINT(...), LINESTRING(...))

Functionsยง

geometry_from_wkt
Parse a WKT string into a Geometry.
geometry_to_wkt
Serialize a Geometry to WKT string.