View Source Geo.WKT (Geo v4.0.1)
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]
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.
Functions
@spec decode(binary()) :: {:ok, Geo.geometry()} | {:error, Exception.t()}
Takes a WKT string and returns a Geo.geometry struct or list of Geo.geometry.
@spec decode!(binary()) :: Geo.geometry()
Takes a WKT string and returns a Geo.geometry struct or list of Geo.geometry.
@spec encode(Geo.geometry()) :: {:ok, binary()} | {:error, Exception.t()}
Takes a Geometry and returns a WKT string.
@spec encode!(Geo.geometry()) :: binary()
Takes a Geometry and returns a WKT string.