Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
Jena 4.3.2
-
None
-
None
Description
The correct setting is that longitude corresponds to x-axis and latitude to y-axis, but in the code lat is passed for x and lon for y.
public class ConvertLatLon { public static final Literal toLiteral(double lat, double lon) { checkBounds(lat, lon); return WKTLiteralFactory.createPoint(lat, lon, SRS_URI.WGS84_CRS); } }
public class WKTLiteralFactory { public static final Literal createPoint(Double x, Double y, String srsURI) { String tidyURI = tidySrsURI(srsURI); return ResourceFactory.createTypedLiteral(tidyURI + "POINT(" + reducePrecision(x) + " " + reducePrecision(y) + ")", WKTDatatype.INSTANCE); } }