f89dea58055408f9674db907a5ac30240c648fe0
Mapterhorn (mapterhorn.com, Protomaps-affiliated) publishes pre-built Terrarium-encoded terrain as PMTiles: a global planet.pmtiles (z0-12) plus ~450 regional chunks (z13+). Same pmtiles extract --bbox=... mechanism offline.pmtiles already uses, just against their files — confirmed live against their real manifest and the documented Interlaken example. Replaces fetching every individual tile ourselves (even after this session's earlier concurrency fix, still tens of minutes for a real region) with 1-3 extract calls plus a merge when the bbox spans more than one chunk: seconds, not minutes. Removes CONCURRENT_TILE_FETCHES, write_terrarium_mbtiles, tile_range, lng/lat_to_tile_x/y, fetch_terrarium_tile, and the sqlite3 gem entirely — none of it is needed once the tiles arrive pre-packaged. dem.js's point-elevation lookup (shadow.js's terrain-shadow overlay) hardcoded a 256px PNG tile assumption that Mapterhorn's 512px WebP tiles would have silently broken — now reads the actually-decoded tile's own size and mime type instead of assuming either.
MapTool
Table of Contents
A mapping application written in Ruby with Sinatra.
The project’s shape is still open — this is the initial scaffold.
Status
Early scaffold. The web application serves a vector map (MapLibre GL JS), with an online style and an optional offline style backed by a local PMTiles file, an animated RainViewer radar overlay, GPX upload/display (points and tracks, organized in folders), and a live position marker from a local GNSS receiver via gpsd.
Requirements
-
Ruby (see
.ruby-version) and Bundler
Getting started
bundle install
bundle exec puma -C config/puma.rb
Then open http://127.0.0.1:4567 in a browser.
Languages
JavaScript
48.7%
Ruby
43.6%
CSS
6%
HTML
1.2%
Dockerfile
0.5%