|
| 1 | +--- |
| 2 | +slug: v0-4-release |
| 3 | +title: deck.gl-raster v0.4 |
| 4 | +authors: |
| 5 | + - kylebarron |
| 6 | +tags: [release] |
| 7 | +--- |
| 8 | + |
| 9 | +deck.gl-raster is enabling GPU-accelerated [GeoTIFF][geotiff] and [Cloud-Optimized GeoTIFF][cogeo] (COG) visualization in [deck.gl]. |
| 10 | + |
| 11 | +[geotiff]: https://en.wikipedia.org/wiki/GeoTIFF |
| 12 | +[cogeo]: https://cogeo.org/ |
| 13 | +[deck.gl]: https://deck.gl/ |
| 14 | + |
| 15 | +Here's what's new in v0.4. |
| 16 | + |
| 17 | +<!-- truncate --> |
| 18 | + |
| 19 | +## Updated Example: NDVI filtering on demand |
| 20 | + |
| 21 | +Our [NAIP Mosaic example](https://developmentseed.org/deck.gl-raster/examples/naip-mosaic/) visualizes the [National Agriculture Imagery Program dataset] from [Microsoft Planetary Computer]. |
| 22 | + |
| 23 | +Since NAIP data contains a near-infrared band in addition to true-color red, green, and blue, we can render spectral indexes like [Normalized Difference Vegetation Index (NDVI)][ndvi]. |
| 24 | + |
| 25 | +[National Agriculture Imagery Program dataset]: https://planetarycomputer.microsoft.com/dataset/naip |
| 26 | +[Microsoft Planetary Computer]: https://planetarycomputer.microsoft.com/ |
| 27 | +[ndvi]: https://www.earthdata.nasa.gov/topics/land-surface/normalized-difference-vegetation-index-ndvi |
| 28 | + |
| 29 | +NDVI has a pretty simple formula: |
| 30 | + |
| 31 | +$$ |
| 32 | +NDVI = \frac{NIR - Red}{NIR + Red} |
| 33 | +$$ |
| 34 | + |
| 35 | +Since we have the raw values of the near-infrared and red bands in the browser, we can compute NDVI _on the GPU_ and then apply a colormap to convert the single value to an RGB color palette. |
| 36 | + |
| 37 | +We've updated the example to also enable _GPU-based filtering_. Drag the slider to control what values of NDVI are displayed. This updates extremely fast because it's all on the GPU. |
| 38 | + |
| 39 | +[](https://developmentseed.org/deck.gl-raster/examples/naip-mosaic/) |
| 40 | + |
| 41 | +## Render coarser image data while loading finer data |
| 42 | + |
| 43 | +Previously, when zooming in on a map, there would be a "blank" period: _after_ a parent, coarser image tile was no longer selected for display, but _before_ the child, finer image tile had successfully loaded over the network. |
| 44 | + |
| 45 | +_Now_, we support the deck.gl [`refinementStrategy`] prop. This gives the user control for refining which tiles are visible while waiting for all tiles to load. |
| 46 | + |
| 47 | +In this screenshot of the [NLCD Land Cover example](https://developmentseed.org/deck.gl-raster/examples/land-cover/), you can see the lower-resolution data is still rendered while waiting for the higher resolution data to load. (The red rectangular outlines are the boundaries of the COG tiles) |
| 48 | + |
| 49 | +[`refinementStrategy`]: https://deck.gl/docs/api-reference/geo-layers/tile-layer#refinementstrategy |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +## Fixed projection handling at high latitudes |
| 54 | + |
| 55 | +Previously there could be an incorrect latitude adjustment at high/low latitudes, especially for images stored in EPSG:4326 projection. |
| 56 | + |
| 57 | +| | | |
| 58 | +| ------ | -------------------------------------------------------- | |
| 59 | +| Before |  | |
| 60 | +| After |  | |
| 61 | + |
| 62 | +> Image credit [Max Jones](https://github.com/maxrjones) in [#41 (comment)](https://github.com/developmentseed/deck.gl-raster/issues/41#issuecomment-4060870467). |
| 63 | +
|
| 64 | +## Avoided crash when rendering of images beyond $\pm 85.05\degree$ latitude |
| 65 | + |
| 66 | +Previously, deck.gl-raster would crash if you tried to render images that extend past the valid Web Mercator latitude range of $\pm 85.05\degree$. It should now render correctly. (Though in the Web Mercator view, such images will be clamped to the valid latitude range.) |
| 67 | + |
| 68 | +This is mostly useful when viewing global imagery in EPSG:4326 projection, such as this screenshot of the [RGB GeoTIFF example](https://developmentseed.org/deck.gl-raster/examples/cog-basic/), selecting the image sample from [EOxCloudless](https://cloudless.eox.at/). |
| 69 | + |
| 70 | + |
0 commit comments