changeset 7735:46273d890da5

Cross section importer: avoid logging of unused feature.
author Tom Gottfried <tom@intevation.de>
date Wed, 22 Jan 2014 13:26:35 +0100
parents 228be10e6165
children 714fda61b006
files backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java	Wed Jan 22 12:54:18 2014 +0100
+++ b/backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java	Wed Jan 22 13:26:35 2014 +0100
@@ -252,13 +252,15 @@
 
             ImportRiver.this.addCrossSections(description, ti, lines);
 
-            double percent = numReadPoints > 0L
-                ? ((double)numRemainingPoints/numReadPoints)*100d
-                : 0d;
+            if (simplificationEpsilon != null) {
+                double percent = numReadPoints > 0L
+                    ? ((double)numRemainingPoints/numReadPoints)*100d
+                    : 0d;
 
-            log.info(String.format(
-                "Number of points in cross section: %d / %d (%.2f%%)",
-                numReadPoints, numRemainingPoints, percent));
+                log.info(String.format(
+                    "Number of points in cross section: %d / %d (%.2f%%)",
+                    numReadPoints, numRemainingPoints, percent));
+            }
         }
     } // ImportRiverCrossSectionParserCallback
 

http://dive4elements.wald.intevation.org