3.0.12 • Published 10 years ago
turf-kinks v3.0.12
turf-kinks
turf kinks module
turf.kinks(polygon)
Takes a Polygon|polygon and returns Point|points at all self-intersections.
Parameters
| parameter | type | description |
|---|---|---|
polygon | Feature.\<Polygon> | input polygon |
Example
var poly = {
"type": "Feature",
"properties": {},
"geometry": {
"type": "Polygon",
"coordinates": [[
[-12.034835, 8.901183],
[-12.060413, 8.899826],
[-12.03638, 8.873199],
[-12.059383, 8.871418],
[-12.034835, 8.901183]
]]
}
};
var kinks = turf.kinks(poly);
var resultFeatures = kinks.intersections.features.concat(poly);
var result = {
"type": "FeatureCollection",
"features": resultFeatures
};
//=resultReturns FeatureCollection.<Point>, self-intersections
Installation
Requires nodejs.
$ npm install turf-kinksTests
$ npm test3.0.12
10 years ago
3.0.10
10 years ago
3.0.7-canary.ae89c8b3
10 years ago
3.0.5
10 years ago
3.0.1
10 years ago
3.0.0-canary.7879bf6c
10 years ago
3.0.0-canary.2f5f7167
10 years ago
1.3.2
11 years ago
1.3.1
11 years ago
1.3.0
11 years ago
1.2.1
11 years ago
1.2.0
11 years ago
1.1.0
11 years ago
1.0.0
11 years ago
