1.0.0 • Published 10 years ago
turf-geometrycollection v1.0.0
turf-geometrycollection
turf geometrycollection module
turf.geometrycollection(geometries, properties)
Creates a Feature based on a coordinate array. Properties can be added optionally.
Parameters
parameter | type | description |
---|---|---|
geometries | Array.\<{ Geometry: * }> | an array of GeoJSON Geometries |
properties | Object | optional: an Object of key-value pairs to add as properties |
Example
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
Installation
Requires nodejs.
$ npm install turf-geometrycollection
Tests
$ npm test
1.0.0
10 years ago