[Lada-commits] [PATCH 1 of 2] Allow koord_*_extern to contain comma or dot as decimal separator

Wald Commits scm-commit at wald.intevation.org
Thu Feb 2 17:38:40 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1486053488 -3600
# Node ID a851fc69130cc904bbe1236c1465a5c1c93cfac9
# Parent  b63e0abcbf84cb65ba20bf4ce96420bc3e1c4173
Allow koord_*_extern to contain comma or dot as decimal separator.

diff -r b63e0abcbf84 -r a851fc69130c src/main/java/de/intevation/lada/factory/OrtFactory.java
--- a/src/main/java/de/intevation/lada/factory/OrtFactory.java	Thu Feb 02 17:28:31 2017 +0100
+++ b/src/main/java/de/intevation/lada/factory/OrtFactory.java	Thu Feb 02 17:38:08 2017 +0100
@@ -78,8 +78,8 @@
 
             MathTransform transform = CRS.findMathTransform(src, target);
             Coordinate srcCoord = new Coordinate();
-            srcCoord.x = Double.valueOf(xCoord);
-            srcCoord.y = Double.valueOf(yCoord);
+            srcCoord.x = Double.valueOf(xCoord.replace(",", "."));
+            srcCoord.y = Double.valueOf(yCoord.replace(",", "."));
             Coordinate targetCoord = new Coordinate();
             JTS.transform(srcCoord, targetCoord, transform);
 


More information about the Lada-commits mailing list