From 92859ec6df9de973d3ec40b8efd2b4a757817b02 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 6 Nov 2024 09:36:25 +0100 Subject: [PATCH] Refine logging level for product compatibility checks. Changed log level from info to fine consistency checks to reduce excessive logging. Could actually be removed at all, I think Messages were triggered when e.g., calling ProductUtils.copyVectorData() --- .../org/esa/snap/core/datamodel/Product.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/snap-core/src/main/java/org/esa/snap/core/datamodel/Product.java b/snap-core/src/main/java/org/esa/snap/core/datamodel/Product.java index 66ef9b342e..13524eccf0 100644 --- a/snap-core/src/main/java/org/esa/snap/core/datamodel/Product.java +++ b/snap-core/src/main/java/org/esa/snap/core/datamodel/Product.java @@ -1495,7 +1495,7 @@ public void setNumResolutionsMax(int numResolutionsMax) { // Visitor-Pattern support /** - * Checks whether or not the given product is compatible with this product. + * Checks whether the given product is compatible with this product. * * @param product the product to compare with * @param eps the maximum lat/lon error in degree @@ -1507,20 +1507,20 @@ public boolean isCompatibleProduct(final Product product, final float eps) { return true; } if (getSceneRasterWidth() != product.getSceneRasterWidth()) { - SystemUtils.LOG.info("raster width " + product.getSceneRasterWidth() + " not equal to " + getSceneRasterWidth()); + SystemUtils.LOG.fine("raster width " + product.getSceneRasterWidth() + " not equal to " + getSceneRasterWidth()); return false; } if (getSceneRasterHeight() != product.getSceneRasterHeight()) { - SystemUtils.LOG.info("raster height " + product.getSceneRasterHeight() + " not equal to " + getSceneRasterHeight()); + SystemUtils.LOG.fine("raster height " + product.getSceneRasterHeight() + " not equal to " + getSceneRasterHeight()); return false; } if (getSceneGeoCoding() == null && product.getSceneGeoCoding() != null) { - SystemUtils.LOG.info("no geocoding in master but in source"); + SystemUtils.LOG.fine("no geocoding in master but in source"); return false; } if (getSceneGeoCoding() != null) { if (product.getSceneGeoCoding() == null) { - SystemUtils.LOG.info("no geocoding in source but in master"); + SystemUtils.LOG.fine("no geocoding in source but in master"); return false; } @@ -1533,7 +1533,7 @@ public boolean isCompatibleProduct(final Product product, final float eps) { getSceneGeoCoding().getGeoPos(pixelPos, geoPos1); product.getSceneGeoCoding().getGeoPos(pixelPos, geoPos2); if (!equalsLatLon(geoPos1, geoPos2, eps)) { - SystemUtils.LOG.info("first scan line left corner " + geoPos2 + " not equal to " + geoPos1); + SystemUtils.LOG.fine("first scan line left corner " + geoPos2 + " not equal to " + geoPos1); return false; } @@ -1542,7 +1542,7 @@ public boolean isCompatibleProduct(final Product product, final float eps) { getSceneGeoCoding().getGeoPos(pixelPos, geoPos1); product.getSceneGeoCoding().getGeoPos(pixelPos, geoPos2); if (!equalsLatLon(geoPos1, geoPos2, eps)) { - SystemUtils.LOG.info("first scan line right corner " + geoPos2 + " not equal to " + geoPos1); + SystemUtils.LOG.fine("first scan line right corner " + geoPos2 + " not equal to " + geoPos1); return false; } @@ -1551,7 +1551,7 @@ public boolean isCompatibleProduct(final Product product, final float eps) { getSceneGeoCoding().getGeoPos(pixelPos, geoPos1); product.getSceneGeoCoding().getGeoPos(pixelPos, geoPos2); if (!equalsLatLon(geoPos1, geoPos2, eps)) { - SystemUtils.LOG.info("last scan line left corner " + geoPos2 + " not equal to " + geoPos1); + SystemUtils.LOG.fine("last scan line left corner " + geoPos2 + " not equal to " + geoPos1); return false; } @@ -1560,7 +1560,7 @@ public boolean isCompatibleProduct(final Product product, final float eps) { getSceneGeoCoding().getGeoPos(pixelPos, geoPos1); product.getSceneGeoCoding().getGeoPos(pixelPos, geoPos2); if (!equalsLatLon(geoPos1, geoPos2, eps)) { - SystemUtils.LOG.info("last scan line right corner " + geoPos2 + " not equal to " + geoPos1); + SystemUtils.LOG.fine("last scan line right corner " + geoPos2 + " not equal to " + geoPos1); return false; } }