aboutsummaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorSammysHP <sven@sammyshp.de>2012-01-03 13:33:07 +0100
committerSammysHP <sven@sammyshp.de>2012-01-03 13:33:07 +0100
commita6738ca8b90c74456fa0313e96fd1f30f4242f5d (patch)
treed090c2754ab3402fd498edca6baf7c75f1aa5c3b /main/src
parent1f68a8d507df7bcd568beb6d52ea31da2bb5ccce (diff)
downloadcgeo-a6738ca8b90c74456fa0313e96fd1f30f4242f5d.zip
cgeo-a6738ca8b90c74456fa0313e96fd1f30f4242f5d.tar.gz
cgeo-a6738ca8b90c74456fa0313e96fd1f30f4242f5d.tar.bz2
Fix #936: Parsing of decimal-seconds with comma as separator fails
Diffstat (limited to 'main/src')
-rw-r--r--main/src/cgeo/geocaching/geopoint/GeopointParser.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/main/src/cgeo/geocaching/geopoint/GeopointParser.java b/main/src/cgeo/geocaching/geopoint/GeopointParser.java
index 87a4499..ad5d6ba 100644
--- a/main/src/cgeo/geocaching/geopoint/GeopointParser.java
+++ b/main/src/cgeo/geocaching/geopoint/GeopointParser.java
@@ -43,12 +43,12 @@ public class GeopointParser
* X DD° MM
* X DD° MM.MMM
* X DD° MM SS
- *
+ *
* as well as:
* DD.DDDDDDD
- *
+ *
* Both . and , are accepted, also variable count of spaces (also 0)
- *
+ *
* @param text
* the string to parse
* @return an Geopoint with parsed latitude and longitude
@@ -78,12 +78,12 @@ public class GeopointParser
* X DD° MM
* X DD° MM.MMM
* X DD° MM SS
- *
+ *
* as well as:
* DD.DDDDDDD
- *
+ *
* Both . and , are accepted, also variable count of spaces (also 0)
- *
+ *
* @param latitude
* the latitude string to parse
* @param longitude
@@ -123,7 +123,7 @@ public class GeopointParser
if (null != matcher.group(4)) {
seconds = Double.parseDouble("0." + matcher.group(4)) * 60.0;
} else if (null != matcher.group(5)) {
- seconds = Double.parseDouble(matcher.group(5));
+ seconds = Double.parseDouble(matcher.group(5).replace(",", "."));
}
}