Pulls features from an ArcGIS Online FeatureServer, merges + cleans them with mapshaper, and emits an XYZ pyramid of Mapbox vector tiles via tippecanoe, then syncs the directory to S3.
- Node 20.6+ (see
.nvmrc) tippecanoeonPATH(or use Docker)- AWS CLI v2 on
PATHwith credentials configured (or use Docker)
Set these in .env (read by Node's built-in --env-file):
| Var | Required | Notes |
|---|---|---|
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_DEFAULT_REGION |
yes | AWS CLI credentials |
AWS_BUCKET |
yes | Plain S3 URI prefix, e.g. s3://my-bucket/base/ |
MIN_ZOOM |
no | Tippecanoe -Z, default 9 |
MAX_ZOOM |
no | Tippecanoe -z, default 17 |
The ArcGIS API key and FeatureServer URL are hardcoded in index.js.
nvm use # switches to Node 20
npm install
npm start # full pipeline: fetch → merge → tile → upload
npm run upload # rebuild tiles from existing geojson/final/ and upload
npm run lint
npm run formatPer-page GeoJSON is cached under geojson/. Re-running npm start skips
already-fetched pages.
docker build -t vector-tile-generator .
docker run --rm --env-file .env -v "$HOME/.aws:/home/node/.aws:ro" vector-tile-generatorThe image is multi-stage: tippecanoe is compiled in a builder, the runtime is
node:20-bookworm-slim with awscli and the tippecanoe binary copied in.