Class CoordinateParseUtils
java.lang.Object
net.buildtheearth.terraminusminus.util.geo.CoordinateParseUtils
Utilities for assisting in the parsing of latitude and longitude strings into Decimals.
Adapted version from gbif parsers
-
Method Summary
Modifier and TypeMethodDescriptionstatic LatLngparseVerbatimCoordinates(String coordinates) Parses a String to aLatLngobject, while being as flexible as possible.
-
Method Details
-
parseVerbatimCoordinates
Parses a String to aLatLngobject, while being as flexible as possible. It can understand both decimal and DMS coordinates, and even a mix of them.Coordinates can use both a period
., or a comma,as the decimal separator, as long as the same is used for both the latitude and longitude.The coordinates can be separated by whitespaces, a semicolon
;, a slash/or a comma,.If the context doesn't make it clear which of latitude or longitude comes first, latitude is assumed.
- Parameters:
coordinates- the coordinates to parse- Returns:
- the parsed coordinates
-