Skip to content

Commit 87e7260

Browse files
marpetmartin-boettcher
authored andcommitted
fixed #57 - Land flag follows different definition if SRTM option is enabled or disabled
(cherry picked from commit b8afd1b)
1 parent 2b438c4 commit 87e7260

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

idepix-olci/src/main/java/org/esa/snap/idepix/olci/IdepixOlciClassificationOp.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ private void classifyOverLand(Tile[] olciReflectanceTiles,
402402

403403
private boolean isOlciLandPixel(int x, int y, Tile olciL1bFlagTile, int waterFraction) {
404404
if (waterFraction < 0) {
405-
return olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_LAND);
405+
boolean landFlag = olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_LAND);
406+
boolean inlandWaterFlag = olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_FRESH_INLAND_WATER);
407+
return landFlag && !inlandWaterFlag;
406408
} else {
407409
// the water mask ends at 59 Degree south, stop earlier to avoid artefacts
408410
if (IdepixUtils.getGeoPos(l1bProduct.getSceneGeoCoding(), x, y).lat > -58f) {

0 commit comments

Comments
 (0)