多边形裁剪
对您的Polygons&MultiPolygons应用boolean Polygon裁剪操作( intersection , union , difference , xor )。
快速开始
const polygonClipping = require ( 'polygon-clipping' )
const poly1 = [ [ [ 0 , 0 ] , [ 2 , 0 ] , [ 0 , 2 ] , [ 0 , 0 ] ] ]
const poly2 = [ [ [ - 1 , 0 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ - 1 , 0 ] ] ]
polygonClipping . union ( poly1 , poly2 /* , poly3, ... */ )
polygonClipping . intersection ( pol
1