java.lang.Object
org.entur.netex.gtfs.export.util.GeometryUtil
Utility class for geometric conversions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.locationtech.jts.geom.LineStringconvertLineStringFromGmlToJts(net.opengis.gml._3.LineStringType gmlLineString) Return a JTS LineString corresponding to the GML LineString, or null if the GML LineString is invalidstatic doubledistance(org.locationtech.jts.geom.Coordinate from, org.locationtech.jts.geom.Coordinate to) Calculate the distance between 2 coordinates, in meters.
-
Method Details
-
distance
public static double distance(org.locationtech.jts.geom.Coordinate from, org.locationtech.jts.geom.Coordinate to) Calculate the distance between 2 coordinates, in meters.- Parameters:
from- from coordinateto- to coordinate- Returns:
- the distance between the 2 coordinates, in meters.
-
convertLineStringFromGmlToJts
public static org.locationtech.jts.geom.LineString convertLineStringFromGmlToJts(net.opengis.gml._3.LineStringType gmlLineString) Return a JTS LineString corresponding to the GML LineString, or null if the GML LineString is invalid- Parameters:
gmlLineString- the GML LineString.- Returns:
- the JTS LineString or null if the GML LineString is invalid.
-