Class LocatePoint
java.lang.Object
org.opentrafficsim.road.network.factory.vissim.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 pointorg.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)
-
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
-