Skip to content

Galiano Island #72

Description

@tombh

Tasks to compute Galiano Island's DSM as we've already done for the world, but, with the ability to render entire viewsheds instead of just longest lines.

DSM hillshade screenshots:
Image

The raw data is 87,616x78,341 (~7 billion) elevation samples at 25cm resolution. ~14GB uncompressed. Computationally this is trivial. The hurdle is in fact the sheer scale of storing all the viewsheds, a naive approach would likely reach 100TB.

Reducing the resolution to 1m (~20,000x20,000) and using some basic storage optimisations could get us to around 2TB.

Core

Fixes

Storing viewsheds

Displaying viewsheds

  • Setup https://galiano.alltheviews.world or similar.
  • Generate the visibility heatmap. This is exactly the same as we did for the world.
  • Reconstruct viewsheds in the webapp by querying the SQLite VM API which returns the binary viewshed data for a clicked point. This should be fast and hopefully feel almost instantaneous. Viewshed API server #73
  • Some UI features that help do some basic exploration of coverage. Viewshed API server #73 Ideas:
    • Clicking a second point hides the previously rendered viewshed.
    • SHIFT+CLICK adds a new potentially overlapping viewshed without hiding the previously displayed viewshed.
    • Colour picker to change the fill colour of individual viewsheds.
    • Slider to change the cutoff range of the viewshed. This might help simulate different radio devices.

Optional Optimisations

Storage

If 1m resolution is good enough then these aren't necessary

  • Use NODATA values or a simple polygon, even a basic rectangle would do, to cull all viewsheds outside the area of interest, namely the island itself.
  • Instead of reducing the resolution of the DSM, only store the viewshed with the greatest surface visibility within a given radius, say within 1m, which would compare the 16 neighbouring viewsheds.
  • Ideally we would store the entire viewshed dataset as a single binary file with a byte-offset index so we can host it on Cloudflare's R2 and query it with HTTP Range requests. Per TB this would be around 10 times cheaper than SQLite on a VM. But a VM for a 1m rendering of Galiano Island is just tens of dollars, so no need to worry at the moment.
  • This is certainly not for now, but it's worth bearing in mind that neighbouring viewsheds are often very similar. This may well map to the concept of keyframes in video codecs, so we'd only occasionally store full viewsheds whilst most would just be stored as the diff against a "key-viewshed".

Computation

Seeing as computation is not our bottleneck, these are low priority

  • Cull all lines of sight that fall entirely outside the area of interest. In the case of Galiano Island, whilst we are interested in all the points on the island, we are not interested in how far we can see out into the ocean.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions