A Main Road Is Not Always Paved
A proposal for map apps to show whether a road is paved or unpaved, as an extra signal on top of the road class colour, so the class (function and importance) is never lost.
- Core: two levels, Paved and Unpaved.
- Optional: an Off-road mark on Unpaved roads, where
smoothness,tracktypeor4wd_onlysay a city car cannot pass.
Serve the repo with a local web server (npm start, which runs python3 -m http.server 8765), then:
- http://localhost:8765/: the article.
- http://localhost:8765/demo/: the demo.
Write in article.md, then run npm run build (python3 scripts/build-article.py, needs pip install markdown): it writes index.html from article.md and the page design in article/template.html. FIGURE comments in the Markdown become figures; the chart reads research/stats/summary.csv and the photo credits research/examples/images/credits.json. Images are in article/img/. Do not edit index.html by hand.
demo/index.html, plain HTML, canvas and JavaScript: no build, no tile server.
- Sample spots: places where one road changes from paved to unpaved, cached in
data/(node scripts/fetch-spots.mjs). They are the same spots as the screenshots of today's apps. - Search anywhere: roads load live from Overpass from zoom 14.
- Styles:
js/styles.js, one small function each. Side by side view, five backgrounds, legend. - URL parameters:
spot,style(none= no surface signal),bg(all= every background, one style),z,lat,lon,compare=1,embed=1(one map for an iframe).
js/classify.js, a copy of the reference classifier in julcnx/osm-wiki. Tests: node --test test/classify.test.js.
node scripts/shots.mjs (headless Chrome) screenshots every spot x style x background x zoom for review. Changes and their reasons go in LOG.md.
Map data © OpenStreetMap contributors (ODbL). Terrain: AWS Terrain Tiles. Unpaved grain from OSM Carto (CC0).