1.0.0 • Published 11 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]]);
//=collectionReturns Feature.<GeometryCollection>, a geometrycollection feature
Installation
Requires nodejs.
$ npm install turf-geometrycollectionTests
$ npm test1.0.0
11 years ago
