Package Exports
- @developmentseed/deck.gl-raster
Readme
@developmentseed/deck.gl-raster
GPU-accelerated COG and Zarr visualization in deck.gl
Features
- π High-performance raster visualization using WebGL
- πΊοΈ Support for Cloud Optimized GeoTIFF (COG)
- π Support for Zarr format
- π¨ Customizable rendering and color mapping
- π¦ Modern ESM package for JavaScript and TypeScript
Installation
npm install @developmentseed/deck.gl-rasterUsage
import { RasterLayer } from '@developmentseed/deck.gl-raster';
import { Deck } from '@deck.gl/core';
const layer = new RasterLayer({
id: 'raster-layer',
data: 'https://example.com/data.tif',
bounds: [-122.5, 37.7, -122.3, 37.9],
});
new Deck({
initialViewState: {
longitude: -122.4,
latitude: 37.8,
zoom: 11,
},
controller: true,
layers: [layer],
});Development
# Install dependencies
npm install
# Build the library
npm run build
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Lint code
npm run lint
# Format code
npm run format
# Type check
npm run typecheckAPI Reference
RasterLayer
A deck.gl layer for rendering raster data from GeoTIFF and Zarr sources.
Props
data(string | URL): URL to the raster data sourcebounds([number, number, number, number]): Bounding box as [minLon, minLat, maxLon, maxLat]
License
MIT Β© Development Seed