pointOnLine

fun pointOnLine(point: Point, line: LineString, ignoreEndVertices: Boolean = false, epsilon: Double? = null): Boolean

Returns true if a point is on a line. Accepts a optional parameter to ignore the start and end vertices of the linestring.

Return

true if a point is on a line. Accepts an optional parameter to ignore the start and end vertices of the line.

Parameters

ignoreEndVertices

whether to ignore the start and end vertices.

epsilon

Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points


fun pointOnLine(position: Position, line: LineString, ignoreEndVertices: Boolean = false, epsilon: Double? = null): Boolean

Returns true if a position is on a line. Accepts a optional parameter to ignore the start and end vertices of the linestring.

Return

true if a point is on a line. Accepts an optional parameter to ignore the start and end vertices of the line.

Parameters

ignoreEndVertices

whether to ignore the start and end vertices.

epsilon

Fractional number to compare with the cross product result. Useful for dealing with floating points such as lng/lat points