I'm using the Geoserver REST interface to create new coverage stores and add geotiff files to it.
I have a zip file with multiple tiff files in it, one for each band, and would like to have them all stored under the same coverage store. The main goal is then to be able to combine bands using the coverage view.
My problem: the coverage store seems to only accept one tiff file at a time.
How can I add multiple tif files to a coverage store?
-
I ended up combining the bands into one TIFF file using gdal_merge and the -separate flag. Still interested in an answer though ;-)Thomas– Thomas2016年10月04日 13:23:45 +00:00Commented Oct 4, 2016 at 13:23
2 Answers 2
You need to specify CoverageNameCollectorSPI
in your indexer.properties
:
CoverageNameCollectorSPI=org.geotools.gce.imagemosaic.namecollector.FileNameRegexNameCollectorSPI:regex=_(B[018][0-9A])
This reads the band from the filename. Change the Regex to your needs, file ending is ignored.
You can then create Coverage Views based on that.
See the docs and this very underrated ;-) related question.
Try using image mosaic plugin. The plugin combines granules into a one layer ie mosaic. you should have no trouble using this.
-
OP already uses image mosaic.pLumo– pLumo2017年08月24日 15:41:33 +00:00Commented Aug 24, 2017 at 15:41