Appearance
KBE3D / KBCore / turf / lineStrings
函数: lineStrings()
lineStrings<
P>(coordinates:Position[][],properties?:P,options?: {bbox?:BBox;id?:Id; }):FeatureCollection<LineString,P>
Function
Creates a LineString FeatureCollection from an Array of LineString coordinates.
类型参数
P
P extends GeoJsonProperties = GeoJsonProperties
参数
coordinates
Position[][]
an array of LinearRings
properties?
P
an Object of key-value pairs to add as properties
options?
Optional Parameters
bbox?
Bounding Box Array [west, south, east, north] associated with the FeatureCollection
id?
Identifier associated with the FeatureCollection
返回
FeatureCollection<LineString, P>
LineString FeatureCollection
示例
ts
var linestrings = turf.lineStrings([
[[-24, 63], [-23, 60], [-25, 65], [-20, 69]],
[[-14, 43], [-13, 40], [-15, 45], [-10, 49]]
]);
//=linestrings