java.lang.Object
org.entur.netex.gtfs.export.util.GeometryUtil

public final class GeometryUtil extends Object
Utility class for geometric conversions.
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    static double
    distance(org.locationtech.jts.geom.Coordinate from, org.locationtech.jts.geom.Coordinate to)
    Calculate the distance between 2 coordinates, in meters.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 coordinate
      to - 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.