osm-americana / openstreetmap-americana

A quintessentially American map style
https://americanamap.org
Creative Commons Zero v1.0 Universal
182 stars 59 forks source link

Add hill-shading to expose terrain #780

Open adamfranco opened 1 year ago

adamfranco commented 1 year ago

Much of America (and the world's) most rugged terrain also has the fewest map features. Adding hillshade (aka "hill shade") lets the terrain speak for itself and give context to the peaks, valleys, and ridges that define our landscape.

In addition to continent-scale mountain-range topography, hillshade also helps to highlight why cities might have weird blank gaps in them.

For example, Los Angeles without hillshade just has some large gaps. Why are there the blank areas without even parks? https://zelonewolf.github.io/openstreetmap-americana/#map=12.01/34.15464/-118.32441 image

When terrain and topography is highlighted by hillshade (even without contour lines which add visual noise) it becomes much more obvious to the map viewer why roads and developed areas bend around a spot: https://www.openstreetmap.org/#map=13/34.1471/-118.3514&layers=Y image

There may be a number of techniques that could allow adding hillshades, from translucent raster PNGs served by a separate service, to hillshades dynamically generated in Maplibre from a digital elevation map (DEM).

Ideas to consider:

Other discussions:

Resources:

claysmalley commented 1 year ago

341 was an experiment with 3D terrain, which would satisfy the same purpose, but in a more resource-intensive way. In the long-term future I think the option to switch between 3D terrain and hillshaded 2D would be preferable.

ZeLonewolf commented 1 year ago

An additional terrain source noted on Slack is: https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png

ZeLonewolf commented 2 weeks ago

OSM US is working on a hillshade layer, see osmus/tileservice#16

1ec5 commented 2 weeks ago

FYI, the OSMUS hillshade layer in progress is a raster tileset in JPEG format, so it won’t be quite as versatile as a raster DEM tileset,[^dem] but the client would be able to render it without as much CPU usage. The styling limitations should be fine as long as the layer is muted enough, but there’s probably a natural tension between what an outdoors-focused style and a transportation-focused style would want in terms of terrain exaggeration. The other limitation is that the shading has a fixed light source, unless raster DEM.

[^dem]: A raster DEM layer is still a 2D terrain layer, not a 3D terrain layer.

ZeLonewolf commented 2 weeks ago

I was thinking that this could be something that only appears in parts of the map where there isn't much else. In other words, only show where it's really rugged, if that's technically feasible. It may not look right for our purpose but worth exploring.

1ec5 commented 2 weeks ago

That’s what decreasing the exaggeration would do in a raster DEM layer. We could also vary the exaggeration by zoom level. With a JPEG layer, we could tune the opacity and vary it by zoom level, but there isn’t any mechanism for varying the opacity from region to region.