You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey folks 馃憢 I have three single-channel rasters I want to stack, to get a dataset with three channels. The broader context is: I want the raster single-channel numpy arrays aligned and stacked in a single numpy array, where pixels correspond to each other.
And while there exists a rio stack command, I haven't found a corresponding library function to do this from Python.
Ideally rio stack would behave like rio merge but instead of reducing the three input rasters to a single channel output raster, stack would just concatenate the three single channel rasters into a three channel output raster.
In this generalization, stack could also automatically handle different resolutions, shapes, etc. just like merge does already.
Is there a reason
stack does not exist as a library function
the stack cli does not automatically handle different shapes and resolutions like merge does
Can we generalize the merge implementation (maybe provide a method=cat option?) and then have a stack library function and cli wrapper around that? Thoughts? 馃
Expected behavior and actual behavior.
stack library function exists
stack (library function and cli tool) handle different resolutions and shapes, just like merge does
Steps to reproduce the problem.
Look through rasterio docs for a stack function
Look through rasterio source code for a stack function
Stare outside the window and contemplate buying a boat
Operating system
ubuntu 20.04 docker container
Rasterio version and provenance
1.1.8
The text was updated successfully, but these errors were encountered:
Hey folks 馃憢 I have three single-channel rasters I want to stack, to get a dataset with three channels. The broader context is: I want the raster single-channel numpy arrays aligned and stacked in a single numpy array, where pixels correspond to each other.
And while there exists a
rio stack
command, I haven't found a corresponding library function to do this from Python.Ideally
rio stack
would behave likerio merge
but instead of reducing the three input rasters to a single channel output raster, stack would just concatenate the three single channel rasters into a three channel output raster.In this generalization, stack could also automatically handle different resolutions, shapes, etc. just like merge does already.
Is there a reason
Can we generalize the merge implementation (maybe provide a
method=cat
option?) and then have a stack library function and cli wrapper around that? Thoughts? 馃Expected behavior and actual behavior.
Steps to reproduce the problem.
Operating system
ubuntu 20.04 docker container
Rasterio version and provenance
1.1.8
The text was updated successfully, but these errors were encountered: