Skip to content

Feat: Add parcel tile generation workflow and scripts#18

Merged
the-snesler merged 2 commits intomainfrom
feat/map-tiles
Mar 11, 2026
Merged

Feat: Add parcel tile generation workflow and scripts#18
the-snesler merged 2 commits intomainfrom
feat/map-tiles

Conversation

@the-snesler
Copy link
Copy Markdown
Member

@the-snesler the-snesler commented Mar 11, 2026

We want to be able to display parcels on our map. It doesn't make sense to calculate these dynamically in the backend because our dataset doesn't change often, and it'd be a huge DB query and CPU burn for every pageload. Instead we process them into a ~50mb .pmtiles file that we can host statically alongside the website, and fetch from that instead. It seems to work on my machine so far, but it's difficult to test the S3 component without running CI.

image
  • Introduced a GitHub Actions workflow for building PMTiles from parcel data.
  • Added SQL script to extract parcel geometries from DuckDB.
  • Created a Bash script to handle the generation of PMTiles using DuckDB and Tippecanoe.
  • Updated README with instructions for local builds and GitHub Actions usage.
  • Updated .gitignore to include generated map tiles.

- Introduced a GitHub Actions workflow for building PMTiles from parcel data.
- Added SQL script to extract parcel geometries from DuckDB.
- Created a Bash script to handle the generation of PMTiles using DuckDB and Tippecanoe.
- Updated README with instructions for local builds and GitHub Actions usage.
- Updated .gitignore to include generated map tiles.
@the-snesler the-snesler marked this pull request as ready for review March 11, 2026 00:58
@the-snesler the-snesler requested a review from Copilot March 11, 2026 00:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an offline “parcel tiles” pipeline that extracts parcel geometries from GCS via DuckDB, builds a PMTiles archive with tippecanoe, and publishes it via a scheduled GitHub Actions workflow for static hosting alongside the website.

Changes:

  • Added a DuckDB SQL extract to produce newline-delimited GeoJSON for parcels.
  • Added a Bash script to generate a parcels .pmtiles file via tippecanoe.
  • Added a weekly/manual GitHub Actions workflow to build and upload the PMTiles artifact to Cloudflare R2, plus README/.gitignore updates.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/generate_parcel_pmtiles.sh Orchestrates DuckDB extraction + tippecanoe PMTiles generation.
scripts/extract_parcels_geojson.sql Extracts/normalizes parcel geometries and emits NDJSON features.
.github/workflows/parcel-tiles.yml CI workflow to build, artifact, and upload PMTiles to R2 on a schedule.
README.md Documents local build steps and required CI secrets/variables.
.gitignore Ignores generated tile outputs under build/tiles/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 11, 2026

@the-snesler I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you.

* Initial plan

* Swap tippecanoe and DuckDB CLI installation step order

Co-authored-by: the-snesler <78718829+the-snesler@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: the-snesler <78718829+the-snesler@users.noreply.github.com>
@the-snesler the-snesler merged commit 0baf9e8 into main Mar 11, 2026
1 of 4 checks passed
@the-snesler the-snesler deleted the feat/map-tiles branch March 11, 2026 01:09
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.

3 participants