turf geometrycollection module
Creates a Feature based on a coordinate array. Properties can be added optionally.
parameter | type | description |
---|---|---|
geometries |
Array.<{ Geometry: * }> | an array of GeoJSON Geometries |
properties |
Object | optional: an Object of key-value pairs to add as properties |
var pt = {
"type": "Point",
"coordinates": [100, 0]
};
var line = {
"type": "LineString",
"coordinates": [ [101, 0], [102, 1] ]
};
var collection = turf.geometrycollection([[0,0],[10,10]]);
//=collection
Returns Feature.<GeometryCollection>
, a geometrycollection feature
Requires nodejs.
$ npm install turf-geometrycollection
$ npm test