spatial
ModuleGeometries: arrays to WKT for PostGIS, and the hex EWKB PostGIS returns (or WKT) back to coordinate arrays.
Contents
use utopia_database::adapter::postgres::spatial::array_to_wkt;Rust
pub fn array_to_wkt(geometry: &Array) -> Result<String>POINT(x y), LINESTRING(...) or
POLYGON((...), ...).
use utopia_database::adapter::postgres::spatial::decode_linestring;Rust
pub fn decode_linestring(wkb: &[u8]) -> Result<Value>(Postgres): [[x, y], ...].
use utopia_database::adapter::postgres::spatial::decode_point;Rust
pub fn decode_point(wkb: &[u8]) -> Result<Value>(Postgres): [x, y] from WKT or hex EWKB.
use utopia_database::adapter::postgres::spatial::decode_polygon;Rust
pub fn decode_polygon(wkb: &[u8]) -> Result<Value>(Postgres): [[[x, y], ...], ...].
use utopia_database::adapter::postgres::spatial::type_from_wkt;Rust
pub fn type_from_wkt(wkt: &[u8]) -> Result<Vec<u8>>The lowercase type before (.