Skip to content

Commit b8afd1b

Browse files
committed
fixed #57 - Land flag follows different definition if SRTM option is enabled or disabled
1 parent 39bf5b4 commit b8afd1b

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
@@ -392,7 +392,9 @@ private void classifyOverLand(Tile[] olciReflectanceTiles,
392392

393393
private boolean isOlciLandPixel(int x, int y, Tile olciL1bFlagTile, int waterFraction) {
394394
if (waterFraction < 0) {
395-
return olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_LAND);
395+
boolean landFlag = olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_LAND);
396+
boolean inlandWaterFlag = olciL1bFlagTile.getSampleBit(x, y, IdepixOlciConstants.L1_F_FRESH_INLAND_WATER);
397+
return landFlag && !inlandWaterFlag;
396398
} else {
397399
// the water mask ends at 59 Degree south, stop earlier to avoid artefacts
398400
if (IdepixUtils.getGeoPos(getSourceProduct().getSceneGeoCoding(), x, y).lat > -58f) {

0 commit comments

Comments
 (0)