Skip to content

feat(extensions): add PostGIS raster and GDAL support - #123

Draft
f0rr0 wants to merge 2 commits into
mainfrom
f0rr0/postgis-gdal
Draft

feat(extensions): add PostGIS raster and GDAL support#123
f0rr0 wants to merge 2 commits into
mainfrom
f0rr0/postgis-gdal

Conversation

@f0rr0

@f0rr0 f0rr0 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • upgrade PostGIS to 3.6.4 and add the postgis_raster extension
  • add a pinned static GDAL 3.13.2 dependency for Linux, macOS, Windows, iOS, Android, and WASIX
  • package GDAL data, raster SQL/control files, runtime modules, legal metadata, SDK inventories, and release carriers
  • add GeoTIFF raster round-trip, geometry, restart, and extension-lifecycle smoke coverage
  • keep generated extension catalogs and release-semantic fingerprints synchronized

Why

The existing PostGIS product exposed the core geometry extension but did not ship the raster module or its GDAL dependency closure. That left raster APIs unavailable and made PostGIS support incomplete across the published runtime and SDK surfaces.

This follows the build shape demonstrated by electric-sql/postgres-pglite@956441b while preserving Oliphaunt's explicit source-pin, carrier, legal, and qualification contracts.

Implementation

  • builds GDAL statically with GTiff/VRT raster support and GeoJSON/Shapefile OGR support
  • links GDAL with GEOS, PROJ, SQLite, JSON-C, libxml2, and iconv without adding dynamic third-party runtime dependencies
  • emits separate desktop postgis-3 and postgis_raster-3 modules
  • combines and registers the core/raster static modules for mobile targets
  • adds a WASIX GDAL producer and compatibility shim, then packages core, raster, and dependency side modules
  • stages the required GDAL_DATA files in every relevant carrier
  • teaches the SDK/runtime inventories that Extension::Postgis owns both core and raster artifacts
  • fixes forced native extension rebuild handling and JS tool resolution from linked Git worktrees
  • hardens CI with Windows long-path source checkout, Bash 3.2-safe GDAL configuration, deterministic raster-object builds, and generated native-support-module verification

The smoke test creates postgis and postgis_raster, enables GDAL drivers, verifies GTiff read/write support, round-trips a 2x2 raster through ST_AsGDALRaster/ST_FromGDALRaster, and checks its pixel value and SRID.

Scope

This completes the published PostGIS product as core plus raster/GDAL. Separately installable companion products—PostGIS topology, SFCGAL, Tiger Geocoder, address standardizer, and protobuf support—remain intentionally disabled, consistent with the reference build. Optional GDAL plugins outside the declared GTiff/VRT and GeoJSON/Shapefile set are also not introduced.

Validation

  • tools/release/release-check.mjs: 1,588 passed, 15 host-specific skipped, 0 failed
  • cargo test -p xtask --locked: 41 passed
  • extension model check: passed
  • committed WASIX asset verification: passed
  • cargo fmt --all -- --check: passed
  • native Linux exact extension lifecycle: install, load, restart, backup, and restore passed
  • production WASIX PostGIS direct/restart loader smoke: passed
  • Rust/JS/React Native SDK contract and package-shape checks: passed

The skipped checks require macOS/PowerShell-specific host facilities and remain covered by their hosted CI jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant