Add desktop GeoTIFF tile server for large-image support #1591
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.
Summary
geotiff.js+sharptile server to the Electron backend that reads GeoTIFF/tiled TIFF files and serves PNG tiles via Express routes (/api/tiles/metadata,/api/tiles/zxy/:level/:x/:y)beginMediaImport,loadMetadata) to detect TIFF MIME types and classify datasets aslarge-imagegetTiles()andgetTileURL()in the desktop frontend API so the existingLargeImageAnnotatorand GeoJS rendering work on desktopDetails
New file:
tileServer.ts— Core tile reading module with LRU-cached GeoTIFF handles (max 10). Supports pyramidal TIFFs (multiple IFDs), non-pyramidal TIFFs (virtual zoom levels with downsampling), and 1/3/4-band raster data with auto-scaling for >8-bit depths.Import pipeline — Single
.tiffiles and directories containing TIFFs are detected and routed aslarge-imagedatasets. Each TIFF file becomes one frame in the dataset, with its absolute path used as the item ID for tile requests.Build config —
geotiffis bundled by webpack (pure JS, avoids ESM/CJS incompatibility with Electron 11).sharpis externalized as a native module.Test plan
.tiffile via desktop UI, verify tiled rendering with pan/zoom.tiffiles, verify multi-frame playback🤖 Generated with Claude Code