Linestring geometry.
Methods
-
sampleAt(d)
-
Sample a LineString at a distance
Parameters:
Name Type Description dnumber Returns:
- Type
- ol.geom.LineString
-
simplifyVisvalingam(options [, area] [, dist] [, ratio] [, minPoints] [, keepEnds])
-
Visvalingam polyline simplification algorithm, adapted from http://bost.ocks.org/mike/simplify/simplify.js This uses the Visvalingam–Whyatt algorithm.
Parameters:
Name Type Argument Default Description optionsObject areanumber <optional>
the tolerance area for simplification
distnumber <optional>
a tolerance distance for simplification
rationumber <optional>
.8 a ratio of points to keep
minPointsnumber <optional>
2 minimum number of points to keep
keepEndsboolean <optional>
keep line ends
Returns:
A new, simplified version of the original geometry.
- Type
- LineString
-
splitAt(pt, tol)
-
Split a lineString by a point or a list of points NB: points must be on the line, use getClosestPoint() to get one
Parameters:
Name Type Description ptol.Coordinate | Array.<ol.Coordinate> points to split the line
tolNumber distance tolerance for 2 points to be equal