Satellite ground and real building footprints
- The ground is Esri World Imagery: ~1 m/pixel tiles around the city zone, the factory and 300 m either side of the drive between them, coarser tiles for the whole region. Tiles are hosted with the game (public/imagery, scripts/fetch-imagery.mjs), stream in near the camera, are cached by the service worker as visited, and replace the drawn roads and land areas - ~141,500 Microsoft building footprints (ODbL) join OSM's ~4,000 in a compact delta-encoded file (public/data/buildings.bin, built by scripts/build-buildings.mjs). Heights are estimated from footprint area and land use, with industrial halls outside the ring road. Buildings are built in 500 m blocks as the camera approaches - Caddy compresses the buildings file and caches map data for a week; the build targets ES2022 for top-level await - Tests for decoding, factory clearance, machine reachability and tile placement Imagery attribution: Esri, Maxar, Earthstar Geographics, and the GIS User Community. Commercial use requires a suitable Esri licence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,20 @@
|
||||
# or ":80" for plain HTTP behind another proxy or for a local test.
|
||||
{$SITE_ADDRESS::80} {
|
||||
root * /srv
|
||||
encode zstd gzip
|
||||
# The defaults cover text and JSON; the binary buildings file compresses to about 60% too.
|
||||
encode {
|
||||
zstd
|
||||
gzip
|
||||
match {
|
||||
# Repeated values for the same header are OR-ed.
|
||||
header Content-Type text/*
|
||||
header Content-Type application/json*
|
||||
header Content-Type application/javascript*
|
||||
header Content-Type application/manifest+json*
|
||||
header Content-Type image/svg+xml*
|
||||
header Content-Type application/octet-stream*
|
||||
}
|
||||
}
|
||||
|
||||
# Hashed build files never change; the page, service worker and manifest must always be revalidated
|
||||
# so installed copies pick up new versions.
|
||||
@@ -10,6 +23,9 @@
|
||||
header @hashed Cache-Control "public, max-age=31536000, immutable"
|
||||
@fresh path / /index.html /sw.js /manifest.webmanifest
|
||||
header @fresh Cache-Control "no-cache"
|
||||
# Map data and satellite tiles only change with a new map build.
|
||||
@mapdata path /imagery/* /data/*
|
||||
header @mapdata Cache-Control "public, max-age=604800"
|
||||
@manifest path /manifest.webmanifest
|
||||
header @manifest Content-Type "application/manifest+json"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user