Skip to content

Publish GeoServer layers as GeoPackage instead of shapefile#75

Merged
jirhiker merged 1 commit into
mainfrom
feature/geoserver-geopackage
Jun 25, 2026
Merged

Publish GeoServer layers as GeoPackage instead of shapefile#75
jirhiker merged 1 commit into
mainfrom
feature/geoserver-geopackage

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Switches the geoserver asset from a zipped ESRI Shapefile to a GeoPackage.

Changes

  • orchestration/assets/products.py: _geojson_to_shapefile_zip_geojson_to_geopackage — writes a single .gpkg (GPKG driver, layer = product id). Dropped the zipfile import.
  • orchestration/resources/geoserver.py: publish_shapefilepublish_geopackagePUT .../datastores/{id}/file.gpkg?configure=all with Content-Type: application/x-sqlite3.

Why

  • No 10-char field-name truncation (shapefile limit) — verified a 37-char field survives the round-trip.
  • Single file, no multi-component zip.
  • Native GeoServer GeoPackage datastore, no extension required.

The delete-first datastore reset is unchanged, so any store left from the shapefile backend is recreated cleanly on the next run.

Verified: definitions load (38 assets), flake8 clean, GPKG conversion round-trips a sample feature.

🤖 Generated with Claude Code

Convert each product's GeoJSON to a single .gpkg (GPKG driver) and upload
it to a native GeoServer GeoPackage datastore via PUT .../file.gpkg
(Content-Type application/x-sqlite3), replacing the zipped ESRI Shapefile
flow.

GeoPackage removes the shapefile's 10-char field-name truncation and the
multi-file zip; it needs no GeoServer extension. The delete-first datastore
reset still runs, so a store left from the old shapefile backend is
recreated cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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