Visualise cogs geoparquet post force push#65
Conversation
3235a29 to
035d00f
Compare
|
This example shows how to visualise many COGs using a client-side mosaic https://github.com/developmentseed/deck.gl-raster/tree/main/examples/naip-mosaic |
035d00f to
dcd6f14
Compare
|
We have 7 datasets:
I am no longer changing to write in arrow. ACA Reef is the last one to plan. It is 500MB. Should the pipeline write to PMTiles or is there another way? |
|
@nf-s @alexgleith visualising COGs is working well. Here is the DEP Seagrass data straight from S3 (no band or arrow changes needed): This covers 5/7 of the datasets. I need to debug why ACE COG is not displaying (it can't be loaded into QGIS either). The remaining 2 are vector/parquet.
What do you think? |
This is a big file, right, but only has small regions of data. You sure it doesn't work in QGIS? |
|
ACE for one year is only 100MB. The examples show >1GB COGs loading. I will figure out what else could be blocking it. |
|
Regarding ACA, I vote for:
I think we already have the code to make them, and they're most performant... shame about duplication, but let's do it anyway... THoughts @nf-s? |
|
@nf-s Related to the above, I would have to add a PMTiles URL field to the dataset run (just like the geometries runs already have). |
There was a problem hiding this comment.
Pull request overview
Adds dataset-run map visualization support for GeoParquet/STAC-GeoParquet (PMTiles + COG mosaics), including schema + DB plumbing for a PMTiles URL.
Changes:
- Add Deck.gl + GeoTIFF/COG rendering and Parquet (Arrow/WASM) parsing dependencies to the web app.
- Introduce a new
DatasetRunMapclient UI for visualizing PMTiles (GeoParquet) and COG mosaics (STAC-GeoParquet). - Add
dataPmtilesUrlto dataset-run schemas, DB table, API query selection, and a Drizzle migration.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Locks new visualization/parquet parsing dependencies and their transitive graph. |
| packages/schemas/src/crud.ts | Extends dataset-run response schema with dataPmtilesUrl. |
| apps/web/package.json | Adds Deck.gl, deck.gl-geotiff, apache-arrow, parquet-wasm dependencies. |
| apps/web/next.config.mjs | Enables webpack top-level await + async WASM to support parquet/geotiff deps. |
| apps/web/app/console/dataset/run/[datasetRunId]/client.tsx | Renders the new dataset-run map in the dataset run detail page. |
| apps/web/app/console/dataset/_components/dataset-run-map.tsx | New map component: PMTiles rendering + STAC-Geoparquet → COG mosaic visualization. |
| apps/server/src/schemas/db.ts | Adds data_pmtiles_url column to dataset_run. |
| apps/server/src/routes/datasetRun.ts | Includes dataPmtilesUrl in dataset-run query column selection. |
| apps/server/drizzle/meta/_journal.json | Registers the new migration entry. |
| apps/server/drizzle/0034_lowly_wolf_cub.sql | Adds the data_pmtiles_url column via SQL migration. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… COG viz from STAC-Geoparquet
…ighlight selected polygon om click.
…er. Both PMTiles layers working.
… proxy route to load DEA COGs.
…igration. Clean up test variables (prod datasets). Fix pnpm-lock.yaml since rebasing off main (fixes lint).
4ef946e to
6275fbd
Compare
nf-s
left a comment
There was a problem hiding this comment.
Looks great, thanks Will!
Do you have plan for making the symbology and legends configurable? As currently they seem to be hard coded. I think these should be attached to the dataset model (or perhaps even the dataset run, not sure)
Also, can you please remove uses of as any or other typecasting unless its really needed?
|
@nf-s thank you. Right now I have hardcoded the colour maps for the known datasets but have helpful fallbacks so any dataset will visualise. @alexgleith what do you think? How much customisation is wanted? I will clean up the types. |
I think if we can capture the configuration into the dataset model, that's probably a good idea. Just needs to be as simple as possible... it would be better if there wasn't a huge form with every option. Just something minimal, somehow... |
|
Ok I can add this as a field to the dataset table. Then when users add a new dataset with this info, the UI will be straight forward. We need:
PMTiles could just have a label and a color. There are no categories for the datasets we currently have. I will make this visualisation field nullable and the styling logic have nice fallbacks (if null or errors). I will keep just showing the last year of data but letting users know the available years. |
|
I have updated the map to be styled from the dataset table. The user can update and see these in the UI. Here are the styles I will add to the prod datasets, once the DB is migrated. Any new dataset falls back to a safe default style if this field is null. GMW v3 and v4 DEP Seagrass ACE DEP Mangrove ACA Reef VIDA Buildings |


Replaces
After force push to
main