Basically I want to stack some sentinel imagery so I have all the bands I want to use in one tif. But I want them to keep their native resolutions. For example, band 1 coastal blue is 60m and band 4 red is 10m. But when I stack all the bands using the composite bands tool it takes the first band and upsamples the rest of them to 60m/px to match.
Any way to get around this?
Solved! Go to Solution.
You can not effectively have a tif file with bands that have different resolutions. There should be no reason to. You can use a Raster Function Chain instead. This can be set up using the raster function chain editor or better use the Sentinel 2 Raster Product. If you use catalog to browse to a directory that contains a Sentinel 2 Scene and click on the metadata (.xml) then you will be provided with options for how to load it as a product. This will create a layer that contains Composite band function, but will also bring in all the pertinent metadata. When accessed the data will be sampled to the resolution requested on demand. There is not need to have a separate file file. Similar is done when you add to a mosaic dataset using the Sentinel 2 Raster Type.
You can not effectively have a tif file with bands that have different resolutions. There should be no reason to. You can use a Raster Function Chain instead. This can be set up using the raster function chain editor or better use the Sentinel 2 Raster Product. If you use catalog to browse to a directory that contains a Sentinel 2 Scene and click on the metadata (.xml) then you will be provided with options for how to load it as a product. This will create a layer that contains Composite band function, but will also bring in all the pertinent metadata. When accessed the data will be sampled to the resolution requested on demand. There is not need to have a separate file file. Similar is done when you add to a mosaic dataset using the Sentinel 2 Raster Type.
I wouldn't say no reason to do it. If someone wants to work with one stacked raster instead of multiple individual tifs then it would decrease the amount of files delivered to them, so instead of 80 tifs they have 8. Was hoping there was a tool/setting I was missing so I could put it into my python script, but if not then I will look into the opensource libraries.
Thanks!
Emma
I don't believe the TIF format allows this. If you need to write different resolutions into a single file, NITF or NetCDF formats allow that. But one key reason NOT to do that is you're duplicating data volume, and there's another risk to consider - if you're leaving some of the other files behind, you may lose an important metadata file.
Peter's point is that, if you're working in ArcGIS, there's no need for this - the mosaic dataset can manage all of your separate files and present them to the user as a single image. And if you want to stack 8 multitemporal scenes covering the same area, that can be one mosaic dataset (does not require 8).
Our imagery workflows site http://esriurl.com/ImageryWorkflows provides resources if you want to learn more, or automate these sort of tasks.
Note you mentioned "number of files delivered". You can share a mosaic dataset with colleagues if you're on the same network, or if working in the cloud, we have ways of allowing the mosaic dataset to access all of the necessary source files directly from cloud storage. But our recommendation is that you keep all of those original source files together (in most cases - there ARE cases where we recommend converting original files to more efficient formats - see Imagery formats and performance—Imagery Best Practices | Documentation and if necessary to reformat we'd recommend using http://esriurl.com/OptimizeRasters)
Cody B
Good points, thanks to both of you. I will have to share this with the person requesting the data and see how they want it!