girder / large_image

Python modules to work with large multiresolution images.
http://girder.github.io/large_image/
Apache License 2.0
195 stars 43 forks source link

Composite geospatial image from multiple files #680

Open banesullivan opened 3 years ago

banesullivan commented 3 years ago

Following up on https://github.com/ResonantGeoData/ResonantGeoData/issues/421#issuecomment-854073827

Would it be possible to have large image use separate TIFs to composite into a single RGB image?

Use case: making an RGB tile server from Landsat images where each band of the raster is in a separate TIF.

A possible workaround: create a VRT for these scenarios, specifying the RGB bands

manthey commented 3 years ago

There are two approaches to this:

(1) create a new "multi" tile source (which would require a file saying how images are composited toegther). This would be like a VRT file but have the flexibility of using any tile source large_image supports.

(2) allow specifying other files as part of the style specification. That is, something like: {bands: [{palette: ['black', 'red']}, {file: <second file>, palette: ['black', 'green']}, {file: <third file>, palette: ['black', 'blue']}]}

The virtue of (1) is that we could construct multi-frame sources fairly intelligently (e.g., you have a time series that you could assemble as frames AND composite different color bands).

The virtue of (2) is the dynamic nature of it and lack of an extra control file. Probably once we implement (1), also supporting (2) will be nearly trivial.

manthey commented 2 years ago

A substantial start to this has been added in #764. It still needs to (a) support general transforms, (b) support cropping, (c) support geospatial data. Ideally, we'd also support an "inline" version of this, so you wouldn't need an explicit source file.

manthey commented 10 months ago

With #1415, the only missing feature is support for geospatial data.

manthey commented 8 months ago

Retitling this to indicate remaining scope.