diff flys-backend/src/main/java/de/intevation/flys/importer/Config.java @ 5083:7bbee0cfc171 slt-simplify-cross-sections

Added experimental Douglas Peuker simplification of cross sections.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 24 Feb 2013 17:29:52 +0100
parents e825a5780a90
children
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/Config.java	Sun Feb 24 13:03:44 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/Config.java	Sun Feb 24 17:29:52 2013 +0100
@@ -86,6 +86,9 @@
     public static final String SKIP_SQ_RELATION =
         "flys.backend.importer.skip.sq.relation";
 
+    public static final Double CROSS_SECTION_SIMPLIFICATION_EPSILON =
+        getDouble("flys.backend.importer.cross.section.simplification.epsilon");
+
 
     public static final Config INSTANCE = new Config();
 
@@ -99,6 +102,21 @@
             : Boolean.getBoolean(SKIP_DEFAULT);
     }
 
+    public static final Double getDouble(String key) {
+        try {
+            String value = System.getProperty(key);
+            return value != null
+                ? Double.valueOf(value)
+                : null;
+        } catch (NumberFormatException nfe) {
+            return null;
+        }
+    }
+
+    public Double getCrossSectionSimplificationEpsilon() {
+        return CROSS_SECTION_SIMPLIFICATION_EPSILON;
+    }
+
     public boolean dryRun() {
         return getFlag(DRY_RUN);
     }

http://dive4elements.wald.intevation.org