Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ public Product createProduct() throws ProductIOException {
// }
// @Override

protected Map<Band, Variable> addBrsBands(Product product, List<Variable> variables) {
protected Map<String, Variable> addBrsBands(Product product, List<Variable> variables) {
final int sceneRasterWidth = product.getSceneRasterWidth();
final int sceneRasterHeight = product.getSceneRasterHeight();
Band band;
Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
String description = "Level-1A Browse data";
String units = "Relative Reflectance units";

Expand Down Expand Up @@ -179,7 +179,7 @@ protected Map<Band, Variable> addBrsBands(Product product, List<Variable> var
}
}
}
bandToVariableMap.put(band, variable);
bandToVariableMap.put(band.getName(), variable);
}
} else if (variable.getRank() == 3) {
final int[] dimensions = variable.getShape();
Expand All @@ -206,7 +206,7 @@ protected Map<Band, Variable> addBrsBands(Product product, List<Variable> var
e.printStackTrace(); //Todo change body of catch statement.
}

bandToVariableMap.put(band, sliced);
bandToVariableMap.put(band.getName(), sliced);
band.setUnit(units);
band.setDescription(description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ public void addGeocoding(final Product product) throws ProductIOException {

}

public Map<Band, Variable> addHawkeyeBands(Product product,
public Map<String, Variable> addHawkeyeBands(Product product,
List<Variable> variables) {
final Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
final Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
int spectralBandIndex = 0;
for (Variable variable : variables) {
Band band = addNewBand(product, variable);
if (band != null) {
bandToVariableMap.put(band, variable);
bandToVariableMap.put(band.getName(), variable);
}
if (spectralBandIndex < 8) {
final float wavelength = Float.valueOf(HAWKEYE_WVL[spectralBandIndex]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ public void addGeocoding(final Product product) throws ProductIOException {
}
}

private Map<Band, Variable> addOctsBands(Product product, List<Variable> variables) {
private Map<String, Variable> addOctsBands(Product product, List<Variable> variables) {
final int sceneRasterWidth = product.getSceneRasterWidth();
final int sceneRasterHeight = product.getSceneRasterHeight();

Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
int spectralBandIndex = 0;
for (Variable variable : variables) {
int variableRank = variable.getRank();
Expand Down Expand Up @@ -168,7 +168,7 @@ private Map<Band, Variable> addOctsBands(Product product, List<Variable> variabl
} catch (InvalidRangeException e) {
e.printStackTrace(); //Todo change body of catch statement.
}
bandToVariableMap.put(band, sliced);
bandToVariableMap.put(band.getName(), sliced);
band.setUnit(units);
band.setDescription(description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ public Product createProduct() throws ProductIOException {

}

private Map<Band, Variable> addSeawifsBands(Product product, List<Variable> variables) {
private Map<String, Variable> addSeawifsBands(Product product, List<Variable> variables) {
final int sceneRasterWidth = product.getSceneRasterWidth();
final int sceneRasterHeight = product.getSceneRasterHeight();

Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
int spectralBandIndex = 0;
for (Variable variable : variables) {
int variableRank = variable.getRank();
Expand Down Expand Up @@ -145,7 +145,7 @@ private Map<Band, Variable> addSeawifsBands(Product product, List<Variable> vari
} catch (InvalidRangeException e) {
e.printStackTrace(); //Todo change body of catch statement.
}
bandToVariableMap.put(band, sliced);
bandToVariableMap.put(band.getName(), sliced);
band.setUnit(units);
band.setDescription(description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class L1BHicoFileReader extends SeadasFileReader {

L1BHicoFileReader(SeadasProductReader productReader) {
super(productReader);

}

Array wavlengths = ncFile.findVariable("products/Lt").findAttribute("wavelengths").getValues();
Expand Down Expand Up @@ -222,12 +223,12 @@ public void addMetadata(Product product, String groupname, String meta_element)
}
}

private Map<Band, Variable> addHicoBands(Product product, List<Variable> variables) {
private Map<String, Variable> addHicoBands(Product product, List<Variable> variables) {
final int sceneRasterWidth = product.getSceneRasterWidth();
final int sceneRasterHeight = product.getSceneRasterHeight();
Band band;

Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
int spectralBandIndex = 0;
for (Variable variable : variables) {
if ((variable.getShortName().contains("latitude")) || (variable.getShortName().contains("longitude"))
Expand Down Expand Up @@ -265,7 +266,7 @@ private Map<Band, Variable> addHicoBands(Product product, List<Variable> variabl
band.setNoDataValueUsed(true);
}
}
bandToVariableMap.put(band, variable);
bandToVariableMap.put(band.getName(), variable);
band.setUnit(units);
band.setDescription(name);
}
Expand Down Expand Up @@ -320,7 +321,7 @@ private Map<Band, Variable> addHicoBands(Product product, List<Variable> variabl
band.setNoDataValueUsed(true);
}
}
bandToVariableMap.put(band, sliced);
bandToVariableMap.put(band.getName(), sliced);
band.setUnit(units);
band.setDescription(description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ private float getScaleFactor(Variable variable) {
return scale_factor;
}

private Map<Band, Variable> addModisBands(Product product, List<Variable> variables) {
private Map<String, Variable> addModisBands(Product product, List<Variable> variables) {

final int sceneRasterWidth = product.getSceneRasterWidth();
final int sceneRasterHeight = product.getSceneRasterHeight();

Map<Band, Variable> bandToVariableMap = new HashMap<Band, Variable>();
Map<String, Variable> bandToVariableMap = new HashMap<String, Variable>();
int spectralBandIndex = 0;
for (Variable variable : variables) {
final int variableRank = variable.getRank();
Expand Down Expand Up @@ -282,7 +282,7 @@ private Map<Band, Variable> addModisBands(Product product, List<Variable> variab
} catch (InvalidRangeException e) {
e.printStackTrace(); //Todo change body of catch statement.
}
bandToVariableMap.put(band, sliced);
bandToVariableMap.put(band.getName(), sliced);
band.setUnit(units);
band.setDescription(description);
if (slope != null) {
Expand Down
Loading