Skip to content

Commit

Permalink
StriX: check for numberOfRangeLooks
Browse files Browse the repository at this point in the history
  • Loading branch information
lveci committed Nov 22, 2022
1 parent de39ca2 commit c188f55
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,10 @@ protected void addAbstractedMetadataHeader(final MetadataElement root) {

if(processingInformation.containsElement("sarProcessingParameter")) {
final MetadataElement sarProcessingParameter = processingInformation.getElement("sarProcessingParameter");
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.range_looks, sarProcessingParameter.getAttributeInt("numberOfRangeLooks"));
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.azimuth_looks, sarProcessingParameter.getAttributeInt("numberOfAzimuthLooks"));
if(sarProcessingParameter.containsAttribute("numberOfRangeLooks")) {
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.range_looks, sarProcessingParameter.getAttributeInt("numberOfRangeLooks"));
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.azimuth_looks, sarProcessingParameter.getAttributeInt("numberOfAzimuthLooks"));
}
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.range_spacing, sarProcessingParameter.getAttributeDouble("rangePixelSpacing"));
AbstractMetadata.setAttribute(absRoot, AbstractMetadata.azimuth_spacing, sarProcessingParameter.getAttributeDouble("azimuthPixelSpacing"));
}
Expand Down Expand Up @@ -187,7 +189,11 @@ private String getMode(final String mode) {

protected void addImageFile(final String imgPath, final MetadataElement newRoot) {
final String name = getBandFileNameFromImage(imgPath);
final String imageName = productName.replace("PAR", "IMG-"+pol);
String prefix = "IMG";
if(!productName.startsWith("PAR-"+pol)) {
prefix += "-"+pol;
}
final String imageName = productName.replace("PAR", prefix);
if ((name.endsWith("tif")) && name.startsWith(imageName) && !name.contains("preview")) {
try {
if(!productDir.isCompressed()) {
Expand Down

0 comments on commit c188f55

Please sign in to comment.