Skip to main content

Module spatial

Module spatial 

Expand description

The PostGIS geometry vocabulary shared by the parser (which validates what a schema may write) and the migrate emitter (which renders the Postgres type modifier). Keeping the closed set here rather than in either crate means the two can never drift into accepting and emitting different spellings.

See docs/design/extensions.md §6b and cratestack#842.

Functions§

canonical_geometry_subtype
Normalises a schema-written geometry subtype to its canonical PostGIS casing, or None if it isn’t a recognised subtype.
geometry_subtype_names
Every accepted subtype spelling, for building “expected one of: …” diagnostics. Ordered base-major so the common 2D names lead.