Skip to content

refactor!: move DEFAULT_RANGE_READER to @developmentseed/deck.gl-raster - #837

Merged
kylebarron merged 2 commits into
mainfrom
kyle/default-range-reader-in-raster
Nov 5, 2026
Merged

kylebarron merged 2 commits into
mainfrom
kyle/default-range-reader-in-raster

Conversation

@kylebarron

@kylebarron kylebarron commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Note

This PR was written by Claude (Claude Code), not by @kylebarron.

Moves DEFAULT_RANGE_READER, the shared RangeReader that COG sources and layers read through by default (#809), from @developmentseed/deck.gl-geotiff to @developmentseed/deck.gl-raster. A Zarr range-reader adapter in deck.gl-zarr can then share the same reader, with its byte cache and batching window, without depending on deck.gl-geotiff. deck.gl-raster now depends on @developmentseed/range-reader.

deck.gl-geotiff no longer exports it and keeps no re-export, so the symbol has one home. Behavior is unchanged: COGSource.open, MultiCOGSource.open and MosaicLayer default to the same single instance, now imported from deck.gl-raster. DEFAULT_CONCURRENCY_LIMITER stays in deck.gl-geotiff. The module is marked side-effect free, so an app that doesn't use the reader doesn't bundle it: the zarr-sentinel2-tci example build contains no range-reader code.

Migration

// Before
import { DEFAULT_RANGE_READER } from "@developmentseed/deck.gl-geotiff";

// After
import { DEFAULT_RANGE_READER } from "@developmentseed/deck.gl-raster";

Tests

  • The existing COGSource.open and MultiCOGSource.open tests import DEFAULT_RANGE_READER from deck.gl-raster, including "defaults to the shared reader", which checks that a bare COGSource.open reads through deck.gl-raster's instance.
  • pnpm -r --filter='!docs' typecheck and pnpm -r test pass. The cog-basic, vermont-cog-comparison, naip-mosaic and zarr-sentinel2-tci examples build.

🤖 Written by Claude Code

The shared default RangeReader moves from deck.gl-geotiff to
deck.gl-raster, so a Zarr range-reader adapter in deck.gl-zarr can share
its cache and batching window without depending on deck.gl-geotiff.
deck.gl-geotiff no longer exports it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron added a commit that referenced this pull request Nov 5, 2026
> [!NOTE]
> This PR was written by Claude (Claude Code), not by @kylebarron.

Bumps `version` to `0.10.0-beta.3` in the root `package.json` and in
every `packages/*/package.json`. The publish workflow publishes it under
the `beta` dist-tag, so `latest` stays on 0.9.0.

`CHANGELOG.md` gets a `v0.10.0-beta.3` section with GitHub's generated
notes for the 17 PRs merged since v0.10.0-beta.2.

## Breaking change

- #843: `MosaicLayer` no longer takes `maxCacheByteSize`. To bound an
item's memory by bytes, set `maxCacheByteSize` on the layer that
`renderSource` returns.

## Behavior changes

- #839: a `MosaicLayer` item out of view keeps its opened source in the
cache but drops its layers, which frees their textures.
- #785: `parseGeoZarrMetadata` takes Y from the first entry of
`spatial:dimensions` and X from the second, whatever their names, as
v0.1 of the spatial convention says. Lists that aren't two entries long
are rejected.
- #841: `RasterTileset2D.getParentIndex` picks the parent tile that
contains the child's centre.

## New APIs

- #835: `parseVRT` in `@developmentseed/deck.gl-geotiff`, and `fromGDAL`
in `@developmentseed/affine`.
- #789: `renderSource` gets the props that `MosaicLayer` passes to its
sublayers.

## Not included

#838 (`ZarrSource` opens from a store with a `path`) and #837
(`DEFAULT_RANGE_READER` moves to `@developmentseed/deck.gl-raster`) are
still open. Both are breaking.

🤖 Written by [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kylebarron
kylebarron merged commit 4a3a6a9 into main Nov 5, 2026
4 checks passed
@kylebarron
kylebarron deleted the kyle/default-range-reader-in-raster branch November 5, 2026 20:08
kylebarron added a commit that referenced this pull request Nov 6, 2026
> [!NOTE]
> This PR was written by Claude (Claude Code), not by @kylebarron.

Bumps `version` to `0.10.0-beta.4` in the root `package.json` and in
every `packages/*/package.json`. The publish workflow publishes it under
the `beta` dist-tag, so `latest` doesn't change.

`CHANGELOG.md` gets a `v0.10.0-beta.4` section with GitHub's generated
notes for the 6 PRs merged since v0.10.0-beta.3.

## Breaking changes

- #837: `DEFAULT_RANGE_READER` moves from
`@developmentseed/deck.gl-geotiff` to `@developmentseed/deck.gl-raster`.
- #838: `ZarrSource.open` takes the store and a `path` option, instead
of a group you opened and `variable`. ZarrLayer's `source` takes a store
too.
- `open` returns a general `ZarrSource`. Narrow its data type with
`source.is("float32")`.
  - `source.arrays` is renamed to `source.levels`.
- `ZarrSource`, `ZarrLayer` and `ZarrLayerProps` lose their `Store` type
argument.

## Behavior changes

- #838: an array passed in inherits its parent group's `proj:` and
`spatial:` attributes, unless you pass `geoZarrMetadata`.
- #851: `parseGeoZarrMetadata` orders a multiscales group's levels
finest first by pixel size, whatever order its `layout` lists them in.
- #848: a change to `MosaicLayer`'s `updateTriggers.getSource` (or
`all`) unloads every item's source and opens the sources in view again.
The old items stop drawing at once.

## New APIs

- #792: `read({ window, pool, signal })` on `GeoTIFF` and `Overview`,
with the `Window` type and the `WindowError` class.
- #838: `ZarrSource.is(dtype)` and `source.node`.

## Not included

The fix for #826 (the range reader sends a read again when it arrives as
the stream holding its bytes finishes) isn't written yet.

🤖 Written by [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant