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;
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;
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);
}
}
throw new IllegalArgumentException("Unsupported format " + clss);
}
}
-
+
/** @deprecated Use {@link #parseGpxTrackTo(InputStream, Class)} instead. */
@Deprecated
public static SimpleFeature parseGpxToPolygon(InputStream in) throws IOException {