Skip to main content

deck.gl-raster v0.9

· 8 min read

This blog post was human written.

deck.gl-raster enables GPU-accelerated Cloud-Optimized GeoTIFF (COG) and Zarr visualization in deck.gl.

This release fixes antimeridian handling, widens our GeoTIFF support, adds several new examples, and adds interactive "explainers" for understanding how the library works under the hood.

Antimeridian handling​

We now correctly render images that span the antimeridian in Web Mercator view. Here, an image of Fiji correctly renders (the pink vertical line is the antimeridian).

A lot of work went on under the hood to make this happen. We modified parts of the algorithm to calculate the projection (#711, #721); we now only require a forward projection and not also an inverse projection. This made it easier to handle antimeridian-crossing images in (#716 and #721).

We have a new interactive explainer that details how the rendering process works.

New examples​

We have two new sections on the examples page: "experimental" examples and "explainer" examples.

"Experimental" examples are LLM/Claude-written examples where I haven't had time to manually verify and optimize their source code. So they may not use the best code, but they work and show off various capabilities. Experimental examples may be promoted to "primary" examples in the future.

"Explainer" examples depict how internals of deck.gl-raster work, and may be useful for any curious at a deeper level.

Custom projections (preview)​

deck.gl is currently working on support for arbitrary viewing projections, and they plan to release it as part of deck.gl's next release, v10.

The custom projections example here in deck.gl-raster gives a preview of what will be capable in production code once deck.gl v10 is released.

See #694 and #695 for more information.

Draping rasters over terrain​

We have a new example for rendering a raster layer over a 3d terrain surface. This uses the deck.gl TerrainExtension to match the raster layers to the terrain surface.

See #720 and #731 for more information.

USGS topographic maps​

This example renders images from the USGS Historical Topographic Map Collection.

It shows how to use the deck.gl ClipExtension to avoid rendering parts of the image (in this case, the map collar around the map itself).

GeoArrow overlay​

One of the selling points of deck.gl-raster is that you can interleave any other deck.gl layers on the same map.

This example uses GeoArrow layers from deck.gl-geoarrow to render millions of points alongside a global basemap loaded from a COG.

Loading tiles via a server​

While deck.gl-raster is most commonly used with client-side loading, where the frontend fetches from COG or Zarr files directly, it isn't a requirement.

At the core, if you use the RasterTileLayer directly, deck.gl-raster only requires three things:

  1. A description of where tiles exist: what Coordinate Reference System, how many tiles, and are there multiple resolutions?
  2. A function callback for how to load data for each tile
  3. A function callback for how to render data from each tile

The new server-side-loading example loads tiles from titiler but then renders them through deck.gl-raster's GPU enabled render pipeline.

Explainers​

GPU-powered reprojection explainer​

This explainer is a set of interactive slides to explain how our GPU-based reprojection works.

Multi-resolution data explainer​

This explainer is an interactive demo to explain how rendering works with multiple resolutions of data for the same scene, such as in the Sentinel-2 example.

Antimeridian explainer​

This explainer is a set of interactive slides to explain how rendering works around the antimeridian on Web Mercator-based maps.

Wider GeoTIFF support​

We've improved our support for various types of GeoTIFF files:

  • We now support band-separate GeoTIFFs in the default loading pipeline (#635, @thatbudakguy)
  • We now support rendering 16-bit images in Firefox (#773). Previously they wouldn't render because Firefox doesn't support that extension to WebGL2 (#648).
  • We now support decoding big-endian GeoTIFFs (#687 @james-willis, #705)
  • We fixed an issue with loading JPEG metadata for JPEG-encoded GeoTIFFs (#769)
  • We now correctly use any available alpha band in the default rendering pipeline, rather than assuming the 4th band is an alpha band (#732).

MultiCOGLayer improvements​

  • We've fixed rendering of edge tiles, ensuring no black regions render for images with edge padding (#755, #753)
  • There's a new resampling prop to choose linear or nearest pixel resampling (#775; from @willjnz's #640)

Reliability and performance​

  • Faster performance for selecting which tiles should be rendered (#689)
  • Common EPSG codes (4326, 3857, UTM) no longer require a network request to resolve (#760).
  • We fixed a memory leak where GPU textures weren't freed on layer removal (#728)
  • We now abort loading GeoTIFF metadata when the GeoTIFF url changes (#770, @charlieforward9)
  • When a decoder worker fails, it now errors instead of hanging (#771, @charlieforward9)
  • Previously, if we were fetching multiple tiles and cancelled one of them, the others would sometimes fail to load. That should now be fixed (#709).

Upgrade notes​

  • CutlineBbox was removed. Use deck.gl's ClipExtension instead (#739)
  • CachedTags and .cachedTags were renamed (#769)
  • PROJECTION_REGISTRY now stores promises (#760)

Thanks to various contributors​

Including: @willjnz, @james-willis, @orshih6, @thatbudakguy, @charlieforward9, @earlybard.