Skip to main content

Multi-band COG support

· 3 min read
Kyle Barron
Cloud Engineer

deck.gl-raster now supports rendering multi-band Cloud-Optimized GeoTIFFs (COGs), commonly found for satellite imagery data like Landsat or Sentinel-2, all without a server. See hosted example.

Multi-band COG support

Many COGs are distributed as a collection of multiple inter-related files, where they all represent the same scene with the same spatial extent. For example, Sentinel-2 or Landsat images are distributed in this type of COG layout.

We have a new MultiCOGLayer to support rendering this type of COG source. This layer is intended to be used whenever multiple separate COG files represent one single composite image. If you want to render multiple image sources as a mosaic, use the MosaicLayer.

The MultiCOGLayer abstracts many technical implementation details away from the end user. When the source has bands at different resolutions, it will automatically resample across mixed band resolutions — all on the GPU.

For example, consider rendering a Sentinel-2 vegetation composite with the near-infrared, short-wave infrared, and red bands. The short-wave band's finest pixel resolution is 20 meters while the other bands have a finest pixel resolution of 10 meters. The MultiCOGLayer will automatically upsample the short-wave infrared band up to 10m so that the three can be rendered together at full resolution.

We have a new example application to visualize various selected Sentinel-2 scenes, directly from the Sentinel-2 AWS Open Data bucket. Below are screenshots from this example application.

Torres del Paine, Chile: Infrared False Color composite

Sossusvlei, Namibia: Agriculture composite

Kamchatka, Russia: Vegetation composite

Mt Etna, Italy: SWIR composite

Nile Delta, Egypt: Agriculture composite

Fix "muted" colors

Previously we had unintentionally been "muting" colors. This is now fixed to default to rendering input colors as-is without any additional post-processing.

BeforeAfter

This was happening because deck.gl applied a default Material to renderings. This is useful for 3D visualizations, but in our case it makes more sense to turn the material off by default.

Support deck.gl v9.3

In order to support the recent deck.gl v9.3 release, we removed some previous workarounds around WebGL texture byte alignment. See #419 for more information.

Internal refactors for future Zarr & GeoZarr support

Previously, the internal "tile traversal" code, which tells deck.gl where to render each tile loaded from an image source, was tied to Cloud-Optimized GeoTIFFs and the Tile Matrix Set specification.

We performed some internal refactors to generalize this interface. We now have an initial functional prototype of GeoZarr rendering, which will be properly released soon.