Skip to content

task/WG-703: create and provide nightly public archive (pmtiles + geojson) for published DS maps - #300

Open
nathanfranklin wants to merge 26 commits into
mainfrom
task/WG-703-public-designsafe-pmtiles
Open

task/WG-703: create and provide nightly public archive (pmtiles + geojson) for published DS maps#300
nathanfranklin wants to merge 26 commits into
mainfrom
task/WG-703-public-designsafe-pmtiles

Conversation

@nathanfranklin

@nathanfranklin nathanfranklin commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Overview:

This PR provides a pmtile containing all public maps associated with published DesignSafe projects.

Nightly, generate a single combined PMTiles archive of all public Hazmapper map data belonging to published DesignSafe projects for this deployment*, write it to a shared public asset area served by nginx, and expose an unauthenticated route that returns a manifest (archive URL + metadata). Consumer is WG-671 (Recon Portal).

Live example viewers (Leaflet + MapLibre), showing an example archive with clickable popups that link back to Hazmapper and DesignSafe:

If you want the visual, add a clickable thumbnail under those links:

Related Jira tickets:

Testing Steps:

  1. Manual creation:
docker exec -it geoapi_workers python -c "from geoapi.tasks.published_ds_maps import generate_published_ds_maps_pmtiles as t; t.apply()"

then curl http://localhost:8000/designsafe/published-maps/pmtiles.
3. Evaluating pmtiles from prod deployment: see https://nathanfranklin.github.io/published-ds-maps-examples/

Notes

- Floor tippecanoe's guessed max zoom so sparse/global vector data still
  produces renderable tiles (and simplify geojson_to_pmtiles to its used args)
- Include vector-asset features in the no_asset_vector feature query
- List the containing directory when importing so only existing companion
  shapefile files are fetched (avoids noisy 404s)
- Serve .pmtiles assets with byte-range support and CORS preflight in nginx
- Add a decode-and-inspect test plus a point+polygon fixture
tippecanoe drops features at low zoom by default, leaving a scattered point
layer nearly empty at the world view. Add --drop-rate=1 so every feature is
kept at every zoom (--drop-densest-as-needed still caps oversized tiles), plus
a worker test asserting >900 of the 1000 points survive at each zoom.
Base automatically changed from task/WG-321-fix-importing-for-geojson-shapefiles to main July 30, 2026 18:41
@nathanfranklin nathanfranklin changed the title Create and provide nightly public pmtiles archive for published DS maps task/WG-703: create and provide nightly public pmtiles archive for published DS maps Jul 31, 2026
@nathanfranklin nathanfranklin changed the title task/WG-703: create and provide nightly public pmtiles archive for published DS maps task/WG-703: create and provide nightly public archive (pmtiles + geojson) for published DS maps Jul 31, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to allow public in auth check or have different location like in Core-Portal-Deployments PR

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could just handle in /auth-check and then add http read support for pmtiles in this block

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't handle in /auth-check as lots of requests would be passed on to our geoapi backend. so just adding a location block. a919dc9

 Conflicts fixed in:
	geoapi/services/tippecanoe.py
	geoapi/tests/api_tests/test_vectors_service.py
	geoapi/tests/services/test_tippecanoe_service.py
@nathanfranklin

Copy link
Copy Markdown
Collaborator Author

Also need to provide one workaround for a large raster in map associated with https://www.designsafe-ci.org/data/browser/public/designsafe.storage.published/PRJ-6361/

@nathanfranklin

Copy link
Copy Markdown
Collaborator Author

Also need to provide one workaround for a large raster in map associated with https://www.designsafe-ci.org/data/browser/public/designsafe.storage.published/PRJ-6361/

fixed with cae117c

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