项目作者: toanqng
项目描述 :
Martinez algorithm for polygon Boolean operations
高级语言: Go
项目地址: git://github.com/toanqng/martinez-rueda.git
Martinez-Rueda polygon boolean operations algorithm
PHP implementation of original algorithm http://www4.ujaen.es/~fmartin/bool_op.html
Algorithm is used for computing Boolean operations on polygons:
- union
- difference
- intersection
- xor
Usage
Input parameter is a multipolygon - an array of polygons. And each polygon is an array of points x,y. TODO
Some visual examples
Let’s consider two polygons: green multipolygon of two polygons and yellow polygon.
Snow-white polygon is result of Boolean operation on two polygons.

Union

Difference (green NOT yellow)

Intersection

Xor
