# polygonize
Polygonizes (Multi)LineString(s) into Polygons.
将折线转换为多边形。
> npm install @turf/polygonize
参数
参数 | 类型 | 描述 |
---|---|---|
geojson | (FeatureCollection|Geometry|Feature <(LineString|MultiLineString)>) | Lines in order to polygonize |
返回
FeatureCollection <Polygon> - 创建的多边形
示例
var linestring = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]]);
var polygonize = turf.polygonize(linestring);