comparison 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
comparison
equal deleted inserted replaced
5082:fb4d87274f28 5083:7bbee0cfc171
83 public static final String SKIP_MEASUREMENT_STATIONS = 83 public static final String SKIP_MEASUREMENT_STATIONS =
84 "flys.backend.importer.skip.measurement.stations"; 84 "flys.backend.importer.skip.measurement.stations";
85 85
86 public static final String SKIP_SQ_RELATION = 86 public static final String SKIP_SQ_RELATION =
87 "flys.backend.importer.skip.sq.relation"; 87 "flys.backend.importer.skip.sq.relation";
88
89 public static final Double CROSS_SECTION_SIMPLIFICATION_EPSILON =
90 getDouble("flys.backend.importer.cross.section.simplification.epsilon");
88 91
89 92
90 public static final Config INSTANCE = new Config(); 93 public static final Config INSTANCE = new Config();
91 94
92 private Config () { 95 private Config () {
97 return flag != null 100 return flag != null
98 ? Boolean.valueOf(flag) 101 ? Boolean.valueOf(flag)
99 : Boolean.getBoolean(SKIP_DEFAULT); 102 : Boolean.getBoolean(SKIP_DEFAULT);
100 } 103 }
101 104
105 public static final Double getDouble(String key) {
106 try {
107 String value = System.getProperty(key);
108 return value != null
109 ? Double.valueOf(value)
110 : null;
111 } catch (NumberFormatException nfe) {
112 return null;
113 }
114 }
115
116 public Double getCrossSectionSimplificationEpsilon() {
117 return CROSS_SECTION_SIMPLIFICATION_EPSILON;
118 }
119
102 public boolean dryRun() { 120 public boolean dryRun() {
103 return getFlag(DRY_RUN); 121 return getFlag(DRY_RUN);
104 } 122 }
105 123
106 public String getInfoGewFile() { 124 public String getInfoGewFile() {

http://dive4elements.wald.intevation.org