Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/utils/RiverUtils.java @ 8765:a5e450af498b
(issue1838) Remove method in RiverUtils.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 17 Aug 2015 11:06:23 +0200 |
parents | 9483a5bf4219 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8764:d5917ff74d8a | 8765:a5e450af498b |
---|---|
232 return WQ_INPUT.SINGLE; | 232 return WQ_INPUT.SINGLE; |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 | 236 |
237 /** | |
238 * Get bounds for river of artifact. | |
239 * @param flysArtifact artifact which has a "river" data. | |
240 * @return double array. min is at[0], max at[1]. null if given artifact is null | |
241 */ | |
242 public static double[] getRiverMinMax(D4EArtifact flysArtifact) { | |
243 if (flysArtifact == null) { | |
244 return null; | |
245 } | |
246 | |
247 String riverName = flysArtifact.getDataAsString("river"); | |
248 | |
249 if (riverName == null) { | |
250 riverName = ""; | |
251 } | |
252 | |
253 log.debug("Search for the min/max distances of '" + riverName + "'"); | |
254 | |
255 // Why not use getRiver(flysArtifact) ? | |
256 River river = RiverFactory.getRiver(riverName); | |
257 | |
258 return river != null | |
259 ? river.determineMinMaxDistance() | |
260 : null; | |
261 } | |
262 | |
263 | |
264 public static double[] getKmFromTo(D4EArtifact flys) { | 237 public static double[] getKmFromTo(D4EArtifact flys) { |
265 String strFrom = flys.getDataAsString("ld_from"); | 238 String strFrom = flys.getDataAsString("ld_from"); |
266 String strTo = flys.getDataAsString("ld_to"); | 239 String strTo = flys.getDataAsString("ld_to"); |
267 | 240 |
268 if (strFrom == null) { | 241 if (strFrom == null) { |