/unary-union

JavaScript implementation of GEOS's `UnaryUnionOp` algorithm

Primary LanguageJavaScriptMIT LicenseMIT

Unary Union

Build Status

Returns a representation of the union of the given geometric objects. Implementation of shapely's unary union.

Compute the unary union on a list of \a geometries. May be faster than an iterative union on a set of geometries. The returned geometry will be fully noded, i.e. a node will be created at every common intersection of the input geometries. An empty geometry will be returned in the case of errors. It's basically an implementation of QGS's Unary Union. This last uses as backend GEOS's GEOSUnaryUnion_r which by calling Geometry::Union() method ends up executing the UnaryUnionOp algorithm

Although, the algorithm is the same as GEOS, it isn't a literal transcription of the C++ source code. It was rewriten in order to get a more javascript like code.

JSDoc

Example

Documentation

Installation

Install this module individually:

$ npm install unary-union