X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.app.geo%2Fsrc%2Forg%2Fargeo%2Fapp%2Fgeo%2FGpxUtils.java;h=44afa2c01f0a9341700aa644a4324ef207407d8b;hb=e9978679e86dcd297270432e4ed953b782f1e7c6;hp=2a946f48ac29998bc413187d421e5dde09a445f2;hpb=ef62b6f2aa5d42ae45865eed142ab1e69f6ae43f;p=gpl%2Fargeo-suite.git diff --git a/org.argeo.app.geo/src/org/argeo/app/geo/GpxUtils.java b/org.argeo.app.geo/src/org/argeo/app/geo/GpxUtils.java index 2a946f4..44afa2c 100644 --- a/org.argeo.app.geo/src/org/argeo/app/geo/GpxUtils.java +++ b/org.argeo.app.geo/src/org/argeo/app/geo/GpxUtils.java @@ -15,6 +15,8 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; +import org.geotools.api.feature.simple.SimpleFeature; +import org.geotools.api.feature.simple.SimpleFeatureType; import org.geotools.data.DataUtilities; import org.geotools.feature.SchemaException; import org.geotools.feature.simple.SimpleFeatureBuilder; @@ -24,8 +26,6 @@ import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.LineString; import org.locationtech.jts.geom.MultiPoint; import org.locationtech.jts.geom.Polygon; -import org.opengis.feature.simple.SimpleFeature; -import org.opengis.feature.simple.SimpleFeatureType; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; @@ -68,7 +68,7 @@ public class GpxUtils { Double latitude = Double.parseDouble(attributes.getValue("lat")); Double longitude = Double.parseDouble(attributes.getValue("lon")); // TODO elevation in 3D context - Coordinate coordinate = new Coordinate(longitude, latitude); + Coordinate coordinate = new Coordinate(latitude, longitude); coordinates.add(coordinate); } } @@ -107,7 +107,7 @@ public class GpxUtils { throw new IllegalArgumentException("Unsupported format " + clss); } } - + /** @deprecated Use {@link #parseGpxTrackTo(InputStream, Class)} instead. */ @Deprecated public static SimpleFeature parseGpxToPolygon(InputStream in) throws IOException {