rostgis
rostgis · Experimental PostGIS-compatible spatial extension written in Rust.
Overview
PostgreSQL · 13, 14, 15, 16, 17
Usage
Sources:
- Official getting-started guide
- Exported SQL functions
- Current geometry implementation
- Upstream GiST failure report
rostgis version 0.1.0 is an experimental Rust/pgrx spatial extension that imitates a small part of the PostGIS naming surface. Use it only in an isolated development database: it is not a compatible replacement for PostGIS and its SQL object names can conflict with PostGIS objects.
Core Workflow
The source parser handles basic POINT, LINESTRING, and single-ring POLYGON WKT. Common exported names include ST_MakePoint, ST_GeomFromText, ST_AsText, ST_AsGeoJSON, ST_X, ST_Y, ST_SRID, ST_SetSRID, ST_Distance, ST_Area, ST_Length, ST_Perimeter, and ST_Equals.
Incomplete Semantics
Several exported names are placeholders or approximations:
ST_GeomFromWKBalways reports that WKB parsing is not implemented, whileST_AsWKBprefixes WKT text rather than producing WKB.ST_MakePointZdiscards Z andST_Zreturns NULL.ST_Distancecalculates only point-to-point distance and returns zero for other geometry pairs.ST_IntersectsandST_Containsuse bounding-box tests rather than exact geometry predicates.
Do not use these functions for correctness-sensitive spatial analysis.
Index and Upgrade Boundary
Although the repository contains GiST support code and examples, its own issue report records that index creation fails because of pgrx/CBOR serialization. Do not claim or depend on working GiST indexes for this release. The extension control file requires superuser installation and is not relocatable. Treat stored custom geometry values as tied to the exact experimental build, and export data before upgrading or removing it.