Geo v2.1.0 Geo.WKT View Source

Converts to and from WKT and EWKT

point = Geo.WKT.decode("POINT(30 -90)")
Geo.Point[coordinates: {30, -90}, srid: nil]

Geo.WKT.encode(point)
"POINT(30 -90)"

point = Geo.WKT.decode("SRID=4326;POINT(30 -90)")
Geo.Point[coordinates: {30, -90}, srid: 4326]

Link to this section Summary

Functions

Takes a WKT string and returns a Geo.Geometry struct or list of Geo.Geometry

Takes a Geometry and returns a WKT string

Link to this section Functions

Link to this function decode(wkt) View Source
decode(binary()) :: Geo.geometry()

Takes a WKT string and returns a Geo.Geometry struct or list of Geo.Geometry

Link to this function encode(geom) View Source
encode(Geo.geometry()) :: binary()

Takes a Geometry and returns a WKT string