OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
17 stars 1 forks source link

Render buildings in 3D #704

Open 1ec5 opened 4 months ago

1ec5 commented 4 months ago

Some mappers have begun mapping buildings in 3D according to the simple 3D buildings specification, such as in Little Rock, Arkansas. We should render these buildings in three dimensions (technically 2.5D). This would demonstrate the potential richness of OHM data compared to other historical GIS datasets.

The main renderer is using MapLibre GL JS, which already supports extruding building shapes as long as we have height data. The vector tiles would need to expose the following new features:

and the following new attributes, at a minimum:

Unfortunately, GL JS doesn’t support more complex shapes like slanted roofs, so we probably wouldn’t get much value out of exposing roof:shape=* just yet.

The Historic style would need to add a fill-extrusion layer based on these new features and attributes. The existing building fill layer would need to suppress any building outline feature that turns out to be redundant to building parts mapped within. It would be up to the vector tiles to indicate that a building outline feature is redundant. Ultimately, 3D rendering would benefit from a separate, more photorealistic style, so that the main Historic style can focus on the more abstract symbolization expected in 2D. However, even in 2D, it can be useful to give building footprints some volume.

Extrusions in GL JS probably won’t look right until we eliminate the Leaflet compatibility shim (#651), so that the rendered building can account for a viewing angle relative to the viewport center and an optional camera pitch. However, other standalone environments such as ohm-embed-1yr would be able to render these extruded fills without much client-side work.

1ec5 commented 1 month ago

This would demonstrate the potential richness of OHM data compared to other historical GIS datasets.

For example, OldMapsOnline has a 3D mode, but it only renders terrain in 3D. We could also do that based on MapLibre if we find a suitable elevation DEM source. But since we don’t show satellite imagery on the main map, it would be somewhat less engaging. Extruded buildings would help such a display come alive, so to speak.