Geo.WKT (Geo v3.4.3) View Source
Converts to and from WKT and EWKT
Examples
iex> {:ok, point} = Geo.WKT.decode("POINT(30 -90)")
Geo.Point[coordinates: {30, -90}, srid: nil]
iex> Geo.WKT.encode!(point)
"POINT(30 -90)"
iex> 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 WKT string and returns a Geo.geometry struct or list of Geo.geometry.
Takes a Geometry and returns a WKT string.
Takes a Geometry and returns a WKT string.
Link to this section Functions
Specs
decode(binary()) :: {:ok, Geo.geometry()} | {:error, Exception.t()}
Takes a WKT string and returns a Geo.geometry struct or list of Geo.geometry.
Specs
decode!(binary()) :: Geo.geometry()
Takes a WKT string and returns a Geo.geometry struct or list of Geo.geometry.
Specs
encode(Geo.geometry()) :: {:ok, binary()} | {:error, Exception.t()}
Takes a Geometry and returns a WKT string.
Specs
encode!(Geo.geometry()) :: binary()
Takes a Geometry and returns a WKT string.