Linestring geometry.
Methods
-
sampleAt(d)
-
Sample a LineString at a distance
Parameters:
Name Type Description d
number 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 options
Object area
number <optional>
the tolerance area for simplification
dist
number <optional>
a tolerance distance for simplification
ratio
number <optional>
.8 a ratio of points to keep
minPoints
number <optional>
2 minimum number of points to keep
keepEnds
boolean <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 pt
ol.Coordinate | Array.<ol.Coordinate> points to split the line
tol
Number distance tolerance for 2 points to be equal