Skip to content
Snippets Groups Projects
Commit 253fb4d7 authored by Demian Katz's avatar Demian Katz
Browse files

Merge branch 'release-4.1'

parents 4ac30af3 7466147a
No related merge requests found
...@@ -45,7 +45,7 @@ public class GeoTools ...@@ -45,7 +45,7 @@ public class GeoTools
{ {
private static final Pattern COORDINATES_PATTERN = Pattern.compile("^([eEwWnNsS])(\\d{3})(\\d{2})(\\d{2})"); private static final Pattern COORDINATES_PATTERN = Pattern.compile("^([eEwWnNsS])(\\d{3})(\\d{2})(\\d{2})");
private static final Pattern HDMSHDD_PATTERN = Pattern.compile("^([eEwWnNsS])(\\d+(\\.\\d+)?)"); private static final Pattern HDMSHDD_PATTERN = Pattern.compile("^([eEwWnNsS])(\\d+(\\.\\d+)?)");
private static final Pattern PMDD_PATTERN = Pattern.compile("^([+-])(\\d+(\\.\\d+)?)"); private static final Pattern PMDD_PATTERN = Pattern.compile("^([-+]?\\d+(\\.\\d+)?)");
// Initialize logging category // Initialize logging category
static Logger logger = Logger.getLogger(GeoTools.class.getName()); static Logger logger = Logger.getLogger(GeoTools.class.getName());
...@@ -208,11 +208,7 @@ public class GeoTools ...@@ -208,11 +208,7 @@ public class GeoTools
} }
return coordinate; return coordinate;
} else if (PMDmatcher.matches()) { } else if (PMDmatcher.matches()) {
String hemisphere = PMDmatcher.group(1); coordinate = Double.parseDouble(PMDmatcher.group(1));
coordinate = Double.parseDouble(PMDmatcher.group(2));
if (hemisphere.equals("-")) {
coordinate *= -1;
}
return coordinate; return coordinate;
} else { } else {
logger.error("Decimal Degree Coordinate Conversion Error: Poorly formed coordinate: [" + coordinateStr + "] ... Returning null value ... "); logger.error("Decimal Degree Coordinate Conversion Error: Poorly formed coordinate: [" + coordinateStr + "] ... Returning null value ... ");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment