Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/FLYSUtils.java @ 5086:4f65d833680f dami
Merge Default onto Dami branch.
Dami is now temporarily a public merge branch to fix problems
created by the merge.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 25 Feb 2013 11:50:13 +0100 |
parents | 63617e142dfe |
children |
comparison
equal
deleted
inserted
replaced
5085:4f46679e13d0 | 5086:4f65d833680f |
---|---|
70 Pattern.compile("\\D*(\\d++.\\d*)\\D*"); | 70 Pattern.compile("\\D*(\\d++.\\d*)\\D*"); |
71 | 71 |
72 public static final String XPATH_FLOODMAP_RIVER_PROJECTION = | 72 public static final String XPATH_FLOODMAP_RIVER_PROJECTION = |
73 "/artifact-database/floodmap/river[@name=$name]/srid/@value"; | 73 "/artifact-database/floodmap/river[@name=$name]/srid/@value"; |
74 | 74 |
75 public static final String XPATH_FLOODMAP_DGM_PROJECTION = | |
76 "/artifact-database/floodmap/river[@name=$name]/dgm-srid/@value"; | |
77 | |
75 public static final String XPATH_FLOODMAP_SHAPEFILE_DIR = | 78 public static final String XPATH_FLOODMAP_SHAPEFILE_DIR = |
76 "/artifact-database/floodmap/shapefile-path/@value"; | 79 "/artifact-database/floodmap/shapefile-path/@value"; |
77 | 80 |
78 public static final String XPATH_FLOODMAP_VELOCITY_LOGFILE = | 81 public static final String XPATH_FLOODMAP_VELOCITY_LOGFILE = |
79 "/artifact-database/floodmap/velocity/logfile/@path"; | 82 "/artifact-database/floodmap/velocity/logfile/@path"; |
414 XPathConstants.STRING, | 417 XPathConstants.STRING, |
415 null, | 418 null, |
416 variables); | 419 variables); |
417 } | 420 } |
418 | 421 |
422 public static String getRiverDGMSrid(String rivername) { | |
423 Map<String, String> variables = new HashMap<String, String>(1); | |
424 variables.put("name", rivername); | |
425 | |
426 Document cfg = Config.getConfig(); | |
427 | |
428 String dgm = (String) XMLUtils.xpath( | |
429 cfg, | |
430 XPATH_FLOODMAP_DGM_PROJECTION, | |
431 XPathConstants.STRING, | |
432 null, | |
433 variables); | |
434 if (logger.isDebugEnabled()) { | |
435 logger.debug("Use EPSG:" + dgm + " for DGM"); | |
436 } | |
437 return dgm; | |
438 } | |
419 | 439 |
420 /** | 440 /** |
421 * Return the (first) Gauge corresponding to the given location(s) of | 441 * Return the (first) Gauge corresponding to the given location(s) of |
422 * the artifact. | 442 * the artifact. |
423 * @param flys the artifact in question. | 443 * @param flys the artifact in question. |