Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

turf-merge

Package Overview
Dependencies
Maintainers
8
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-merge

merge polygons

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
43
decreased by-68.15%
Maintainers
8
Weekly downloads
 
Created
Source

turf-merge

build status

merge polygons

turf.merge(fc)

Takes a FeatureCollection of Polygon features and outputs a single merged polygon feature.

Parameters

parametertypedescription
fcFeatureCollection- a FeatureCollection of Polygon features

Example

var poly1 = turf.polygon([[
 [9.994812, 53.549487],
 [10.046997, 53.598209],
 [10.117721, 53.531737],
 [9.994812, 53.549487]
]]);
poly1.properties.fill = '#0f0';
var poly2 = turf.polygon([[
 [10.000991, 53.50418],
 [10.03807, 53.562539],
 [9.926834, 53.551731],
 [10.000991, 53.50418]
]]);
poly2.properties.fill = '#00f';

var polygons = turf.featurecollection([poly1, poly2]);

var merged = turf.merge(polygons);

//=polygons

//=merged

Installation

Requires nodejs.

$ npm install turf-merge

Tests

$ npm test

Keywords

FAQs

Package last updated on 06 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc