Repository navigation
feat(geotiff): New internal method to fetch multiple tiles concurrently, with range coalescing - #530
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…f PR #1463 Internal helpers only; fetchTiles is not yet wired to them. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
kylebarron
force-pushed
the
kyle/fetch-tiles-coalesce
branch
from
May 12, 2026 20:11
bfb7035 to
3841d07
Compare
kylebarron
enabled auto-merge (squash)
May 12, 2026 20:17
kylebarron
added a commit
that referenced
this pull request
May 12, 2026
…Tiles (#531) * docs(geotiff): spec for routing fetchTiles through batched getTiles Closes the design phase for #407: fetchTiles should issue coalesced batched range requests via the getTiles/getMultipleBytes/coalesceRanges helpers vendored in #530, instead of Promise.all over fetchTile. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * refactor(geotiff): extract assembleTile from fetchTile Splits fetchTile into "fetch compressed bytes" + "decode/assemble the RasterArray". No behavior change; assembleTile will be shared with the batched fetchTiles path. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * feat(geotiff): batch + coalesce reads in fetchTiles (closes #407) fetchTiles now resolves every requested tile's byte range up front and fetches the data through getTiles / getMultipleBytes (range-coalescing), instead of Promise.all over fetchTile. Both planar configurations: pixel-interleaved via getTiles; band-planar by flattening every (tile, band) range into one getMultipleBytes call and regrouping. The mask IFD, if any, is fetched the same batched way. Decoding is still per-tile via the shared assembleTile. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> * test(geotiff): parity + coalescing tests for batched fetchTiles Covers fetchTiles vs per-tile fetchTile parity (pixel-interleaved, band-planar, masked), input-order preservation, boundless: false propagation, band-planar range coalescing, and empty input. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
kylebarron
added a commit
that referenced
this pull request
Oct 20, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. Bumps `version` to `0.9.0-beta.1` in the root `package.json` and in every `packages/*/package.json`, ready for a beta release. The publish workflow sees `beta` in the version and publishes to npm under the `beta` dist-tag, so `latest` stays on 0.8.1. `CHANGELOG.md` gets a `v0.9.0-beta.1` section listing the 44 PRs merged since v0.8.1, plus the two new contributors. This also drops the old "Unreleased" section: its three entries (#424, #530, #531) already shipped in v0.7.0. Once this is merged, tag the merge commit `v0.9.0-beta.1` and push the tag. 🤖 Written by [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vendored from blacha/cogeotiff#1463
As explained in blacha/cogeotiff#1432 and #407 I would like a method to fetch multiple tiles so that we can merge ranges for neighboring requests.
This is modeled after the Rust
object-storecrate and itsget_rangesmethodModifications
getMultipleBytesandgetTilesfetchmethod of a normal source.Vendored from blacha/cogeotiff#1463
For #273 and #407
Vendors the range-coalescing + batched byte/tile readers from cogeotiff PR #1463 into
@developmentseed/geotiff, so we can use them before that PR is merged/released. Apnpm patchwouldn't work here — patches live in the root workspace and don't propagate to consumers of a published library — so the code is vendored into the package itself, mirroring the existinggetTile/getBytesvendoring infetch.ts.Changes
packages/geotiff/src/coalesce.ts(new) — near-verbatim port of the PR'ssource.coalesce.ts:coalesceRanges(source, ranges, options?)plus theCOALESCE_*constants andmergeRanges/findGroupIndex/dispatchMergedhelpers. Typed againstPick<Source, "fetch">.packages/geotiff/src/fetch.ts— addsgetMultipleBytesandgetTiles, sitting next to the already-vendoredgetTile/getBytesand routing tile data through the uncacheddataSource. Exported package-internally; not added toindex.ts. The PR'sSource.fetchRangesbranch is dropped (no such interface in@cogeotiff/[email protected]).tests/coalesce.test.ts(ported from the PR'ssource.coalesce.test.ts, converted to Vitest) andtests/get-multiple-bytes.test.ts(mockedTiffImage+ recording data source).fetchTilesis intentionally unchanged — wiring it to actually coalesce is a follow-up PR.Test plan
pnpm --filter @developmentseed/geotiff exec vitest run tests/coalesce.test.ts tests/get-multiple-bytes.test.ts— 21 passingpnpm --filter @developmentseed/geotiff typecheck— cleanpnpm biome check packages/geotiff— cleantests/integration-rasterio.test.tsfailures are pre-existing (thefixtures/geotiff-test-datasubmodule isn't initialized locally), unrelated to this change.🤖 Generated with Claude Code