Add desktop GeoTIFF tile server for large-image support#1591
Open
mattdawkins wants to merge 1 commit intomainfrom
Open
Add desktop GeoTIFF tile server for large-image support#1591mattdawkins wants to merge 1 commit intomainfrom
mattdawkins wants to merge 1 commit intomainfrom
Conversation
Add geotiff.js and sharp-based tile server to the Electron backend that reads GeoTIFF/tiled TIFF files and serves them as PNG tiles. Wire the desktop import pipeline to recognize TIFF MIME types and classify them as 'large-image' datasets, and provide getTiles/getTileURL API functions so LargeImageAnnotator can render tiled imagery via GeoJS. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
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