Closed jdries closed 1 year ago
The geotrellis Mask operation: https://github.com/locationtech/geotrellis/blob/fa88aeddab0849cdb8f830d3747554bc7adceb1f/raster/src/main/scala/geotrellis/raster/mapalgebra/local/Mask.scala#L31
Does not preserve the celltype of the tile that is masked, but rather converts the celltype to the union of the two tiles. This happens because combine in ArrayTile takes the union of celltypes: https://github.com/locationtech/geotrellis/blob/fa62e3af41270e8c553f054aef1866648ed809c0/raster/src/main/scala/geotrellis/raster/ArrayTile.scala#L208
Perform masking with two tiles with different celltype. Check the output celltype of the masked result.
The celltype of the original tile is preserved.
Describe the bug
The geotrellis Mask operation: https://github.com/locationtech/geotrellis/blob/fa88aeddab0849cdb8f830d3747554bc7adceb1f/raster/src/main/scala/geotrellis/raster/mapalgebra/local/Mask.scala#L31
Does not preserve the celltype of the tile that is masked, but rather converts the celltype to the union of the two tiles. This happens because combine in ArrayTile takes the union of celltypes: https://github.com/locationtech/geotrellis/blob/fa62e3af41270e8c553f054aef1866648ed809c0/raster/src/main/scala/geotrellis/raster/ArrayTile.scala#L208
To Reproduce
Perform masking with two tiles with different celltype. Check the output celltype of the masked result.
Expected behavior
The celltype of the original tile is preserved.
Environment