Skip to main content

Module spatial_ctor

Module spatial_ctor 

Source
Expand description

Spatial geometry constructors that appear in value position (INSERT VALUES, WHERE equality) and synthesise a GeoJSON string literal directly rather than resolving as registered scalar functions.

All constructors produce a SqlValue::String holding GeoJSON in the exact shape the spatial read path parses (extract_geometry → sonic_rs::from_str::<Geometry>), so an INSERTed geometry round-trips through a subsequent SELECT of the GEOMETRY column.