Class LocatePoint

java.lang.Object
org.opentrafficsim.road.network.factory.shape.LocatePoint

public class LocatePoint
extends java.lang.Object
Computes the location of the point a given distance along a LineString
  • Constructor Summary

    Constructors 
    Constructor Description
    LocatePoint​(org.locationtech.jts.geom.LineString line, double distance)  
  • Method Summary

    Modifier and Type Method Description
    int getIndex()
    Returns the index of the segment containing the computed point
    org.locationtech.jts.geom.Coordinate getPoint()  
    static org.locationtech.jts.geom.Coordinate pointAlongLine​(org.locationtech.jts.geom.LineString line, double distance)  
    static org.locationtech.jts.geom.Coordinate pointAlongSegment​(org.locationtech.jts.geom.Coordinate p0, org.locationtech.jts.geom.Coordinate p1, double distance)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocatePoint

      public LocatePoint​(org.locationtech.jts.geom.LineString line, double distance)
  • Method Details

    • pointAlongSegment

      public static org.locationtech.jts.geom.Coordinate pointAlongSegment​(org.locationtech.jts.geom.Coordinate p0, org.locationtech.jts.geom.Coordinate p1, double distance)
    • pointAlongLine

      public static org.locationtech.jts.geom.Coordinate pointAlongLine​(org.locationtech.jts.geom.LineString line, double distance)
    • getPoint

      public org.locationtech.jts.geom.Coordinate getPoint()
    • getIndex

      public int getIndex()
      Returns the index of the segment containing the computed point
      Returns:
      the index