Skip to content

Handle tile boundaries for convolutional raster operations #507

@dzole0311

Description

@dzole0311

Summary from chat with @kylebarron:

Hillshade and similar raster operations need neighboring pixels to compute each output pixel. Current examples are mostly per-pixel transforms so handling tile edges are not a major issue. Hillshading is different since slope/aspect at tile edges requires elevation values from adjacent tiles. Without "padded reads" or some form of neighbor backfilling visible grid lines will appear at the internal COG tile boundaries.

Example with visible grid lines:

hillshade-example-2.mp4

Example branch: https://github.com/developmentseed/deck.gl-raster/tree/feat-hillshade-example

Useful sources from MapLibre:

Other useful resources:

Small note on the Tangram/Mapzen link, they seem useful mostly for terrain styling ideas but not necessarily for runtime tile-boundary handling. In the post there's a description on computing normals from heightmaps but also a note that the normal maps can be precomputed offline and served as separate tiles (which moves the neighborhood/edge handling/problem into the tile-generation pipeline).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions