geotrellis
geotrellis copied to clipboard
subsetBands extract the wrong band tile
Describe the bug
This issue is not easy to be exposed.
Try to extract subset bands using a List,but output undesired result which cannot drop the correspoing I don't want to have.
Test tiff is here
It can be easily reproduced or located by using findMinMax for each tile in the classMbt
and classMbtB
Like it means in code, the band index 2 (third band in the Tiff) cannot be droped using subsetBands
.
A clear and concise description of what the bug is.
To Reproduce
Provide as able:
-
Steps to reproduce the behavior
-
Code example
val classifiedPath = "/xx/6_crop_indice_9b_predicted.tif" val classArray: List[Int] = List(1,2,4,5,6).map(_ - 1). // band index (0,1,3,4,5)
val classMbt: MultibandTile = classifiedTiff.tile val classMbtB: MultibandTile = classMbt.subsetBands(classArray) //band index 2 exists
-
Inputs
-
Actual output band (0,1,2,3,4)
-
Expected output band(0,1,3,4,5)
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- Java version:1.8
- Scala version:2.11
- GeoTrellis version:3.3.1
Additional context
Add any other context about the problem here.