@Test public void testCreateMasks() { CollectionOLILandsatQA landsatQA = new CollectionOLILandsatQA(); java.util.List<Mask> masks = landsatQA.createMasks(new Dimension(1, 1)); assertEquals(masks.size(),19); }
@Override public List<Mask> createMasks(Dimension size) { ArrayList<Mask> masks = new ArrayList<>(); final int width = size.width; final int height = size.height; masks.add(Mask.BandMathsType.create("designated_fill", "Designated Fill", width, height, "flags.designated_fill", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("terrain_occlusion", "Terrain Occlusion", width, height, "flags.terrain_occlusion", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("cloud", "Cloud", width, height, "flags.cloud", colorIterator.next(), 0.5)); masks.addAll(createDefaultRadiometricSaturationMasks("radiometric_saturation", "Radiometric saturation", width, height)); masks.addAll(createDefaultConfidenceMasks("snow_ice_confidence", "Snow/ice confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_confidence", "Cloud confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_shadow_confidence", "Cloud shadow confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cirrus_confidence", "Cirrus confidence", width, height)); return masks; }
CollectionOLILandsatQA extends AbstractLandsatQA { @Override public List<Mask> createMasks(Dimension size) { ArrayList<Mask> masks = new ArrayList<>(); final int width = size.width; final int height = size.height; masks.add(Mask.BandMathsType.create("designated_fill", "Designated Fill", width, height, "flags.designated_fill", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("terrain_occlusion", "Terrain Occlusion", width, height, "flags.terrain_occlusion", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("cloud", "Cloud", width, height, "flags.cloud", colorIterator.next(), 0.5)); masks.addAll(createDefaultRadiometricSaturationMasks("radiometric_saturation", "Radiometric saturation", width, height)); masks.addAll(createDefaultConfidenceMasks("snow_ice_confidence", "Snow/ice confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_confidence", "Cloud confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_shadow_confidence", "Cloud shadow confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cirrus_confidence", "Cirrus confidence", width, height)); return masks; } }
CollectionOLILandsatQA extends AbstractLandsatQA { @Override public List<Mask> createMasks(Dimension size) { ArrayList<Mask> masks = new ArrayList<>(); final int width = size.width; final int height = size.height; masks.add(Mask.BandMathsType.create("designated_fill", "Designated Fill", width, height, "flags.designated_fill", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("terrain_occlusion", "Terrain Occlusion", width, height, "flags.terrain_occlusion", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("cloud", "Cloud", width, height, "flags.cloud", colorIterator.next(), 0.5)); masks.addAll(createDefaultRadiometricSaturationMasks("radiometric_saturation", "Radiometric saturation", width, height)); masks.addAll(createDefaultConfidenceMasks("snow_ice_confidence", "Snow/ice confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_confidence", "Cloud confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_shadow_confidence", "Cloud shadow confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cirrus_confidence", "Cirrus confidence", width, height)); return masks; }  }
CollectionOLILandsatQA extends AbstractLandsatQA { @Override public List<Mask> createMasks(Dimension size) { ArrayList<Mask> masks = new ArrayList<>(); final int width = size.width; final int height = size.height; masks.add(Mask.BandMathsType.create("designated_fill", "Designated Fill", width, height, "flags.designated_fill", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("terrain_occlusion", "Terrain Occlusion", width, height, "flags.terrain_occlusion", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("cloud", "Cloud", width, height, "flags.cloud", colorIterator.next(), 0.5)); masks.addAll(createDefaultRadiometricSaturationMasks("radiometric_saturation", "Radiometric saturation", width, height)); masks.addAll(createDefaultConfidenceMasks("snow_ice_confidence", "Snow/ice confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_confidence", "Cloud confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_shadow_confidence", "Cloud shadow confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cirrus_confidence", "Cirrus confidence", width, height)); return masks; }  @Override FlagCoding createFlagCoding(String bandName); @Override List<Mask> createMasks(Dimension size); }
CollectionOLILandsatQA extends AbstractLandsatQA { @Override public List<Mask> createMasks(Dimension size) { ArrayList<Mask> masks = new ArrayList<>(); final int width = size.width; final int height = size.height; masks.add(Mask.BandMathsType.create("designated_fill", "Designated Fill", width, height, "flags.designated_fill", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("terrain_occlusion", "Terrain Occlusion", width, height, "flags.terrain_occlusion", colorIterator.next(), 0.5)); masks.add(Mask.BandMathsType.create("cloud", "Cloud", width, height, "flags.cloud", colorIterator.next(), 0.5)); masks.addAll(createDefaultRadiometricSaturationMasks("radiometric_saturation", "Radiometric saturation", width, height)); masks.addAll(createDefaultConfidenceMasks("snow_ice_confidence", "Snow/ice confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_confidence", "Cloud confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cloud_shadow_confidence", "Cloud shadow confidence", width, height)); masks.addAll(createDefaultConfidenceMasks("cirrus_confidence", "Cirrus confidence", width, height)); return masks; }  @Override FlagCoding createFlagCoding(String bandName); @Override List<Mask> createMasks(Dimension size);  }