public class CoordinateParseUtils extends Object
Modifier and Type | Method and Description |
---|---|
static OccurrenceParseResult<LatLng> |
parseLatLng(String latitude,
String longitude)
This parses string representations of latitude and longitude values.
|
static OccurrenceParseResult<LatLng> |
parseVerbatimCoordinates(String coordinates) |
public static OccurrenceParseResult<LatLng> parseLatLng(String latitude, String longitude)
OccurrenceIssue
.
When the ParseResult.STATUS
is FAIL the payload will be null and one or more issues should be set
in OccurrenceParseResult.getIssues()
.
Coordinate precision will be 6 decimals at most, any more precise values will be rounded.
Supported standard formats are the following, with dots or optionally a comma as the decimal marker, and variations
on the units also accepted e.g. °, d, º, g, o.
latitude
- The decimal latitudelongitude
- The decimal longitudepublic static OccurrenceParseResult<LatLng> parseVerbatimCoordinates(String coordinates)
Copyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.