turf-geometrycollection

1.0.0 • Public • Published

turf-geometrycollection

build status

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

Package Sidebar

Install

npm i turf-geometrycollection

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • morganherlocker