LocationIndexedLine class

Supports linear referencing along a linear {@link Geometry} using {@link LinearLocation}s as the index.

Constructors

LocationIndexedLine(Geometry linearGeom)
Constructs an object which allows linear referencing along a given linear {@link Geometry}.

Properties

hashCode int
The hash code for this object.
no setterinherited
linearGeom Geometry
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkGeometryType() → void
clampIndex(LinearLocation index) LinearLocation
Computes a valid index for this line by clamping the given index to the valid range of index values
extractLine(LinearLocation startIndex, LinearLocation endIndex) Geometry
Computes the {@link LineString} for the interval on the line between the given indices. If the start location is after the end location, the computed linear geometry has reverse orientation to the input line.
extractPoint(LinearLocation index) Coordinate
Computes the {@link Coordinate} for the point on the line at the given index. If the index is out of range the first or last point on the line will be returned. The Z-ordinate of the computed point will be interpolated from the Z-ordinates of the line segment containing it, if they exist.
extractPointWithOffset(LinearLocation index, double offsetDistance) Coordinate
Computes the {@link Coordinate} for the point on the line at the given index, offset by the given distance. If the index is out of range the first or last point on the line will be returned. The computed point is offset to the left of the line if the offset distance is positive, to the right if negative.
getEndIndex() LinearLocation
Returns the index of the end of the line @return the location index
getStartIndex() LinearLocation
Returns the index of the start of the line @return the location index
indexOf(Coordinate pt) LinearLocation
Computes the index for a given point on the line.
indexOfAfter(Coordinate pt, LinearLocation minIndex) LinearLocation
Finds the index for a point on the line which is greater than the given index. If no such index exists, returns minIndex. This method can be used to determine all indexes for a point which occurs more than once on a non-simple line. It can also be used to disambiguate cases where the given point lies slightly off the line and is equidistant from two different points on the line.
indicesOf(Geometry subLine) List<LinearLocation>
Computes the indices for a subline of the line. (The subline must conform to the line; that is, all vertices in the subline (except possibly the first and last) must be vertices of the line and occur in the same order).
isValidIndex(LinearLocation index) bool
Tests whether an index is in the valid index range for the line.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
project(Coordinate pt) LinearLocation
Computes the index for the closest point on the line to the given point. If more than one point has the closest distance the first one along the line is returned. (The point does not necessarily have to lie precisely on the line.)
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited