polygon-clipping
polygon-clipping copied to clipboard
Apply boolean polygon clipping operations (union, intersection, difference, xor) to your Polygons & MultiPolygons.
test("incomplete fusion", t => { const clippings = [[[[-0.0842,0.0451],[0.09,0.0269],[0.09,0.0376],[0.0268,0.0485],[-0.0842,0.0525],[-0.0842,0.0451]]], [[[0.09,0.0059],[0.09,0.0269],[0.0056,0.0357],[0.09,0.0059]]], [[[0.09,-0.0063],[0.09,0.0059],[0.0056,0.0357],[-0.0842,0.0451],[0.09,-0.0063]]]]; const result = polygonClipping.union(...clippings); t.deepEqual( result, [[[[-0.0842,0.0451],[0.09,-0.0063],[0.09,0.0269],[0.0056,0.0357],[-0.0842,0.0451]]], [[[-0.0842,0.0451],[0.09,0.0269],[0.09,0.0376],[0.0268,0.0485],[-0.0842,0.0525],[-0.0842,0.0451]]]]); }); I'd expect to see a single polygon in the result,...
Would it be difficult to support an option to produce groups of convex polygons instead of polygons with concave holes? Although I'm not sure this is a use-case that you're...
union(...[[[[-13.659807482533342,15.000000000000004],[-4.619397662556434,-1.9134171618254447],[-9.750026667063697,15.000000000000004],[-13.659807482533342,15.000000000000004]]],[[[-9.750026667063697,15.000000000000004],[-4.903926402016152,-0.9754516100806383],[-6.477371050357451,15.000000000000004],[-9.750026667063697,15.000000000000004]]]]); Unable to complete output ring starting at [-13.659807482533342, 15.000000000000004]. Last matching segment found ends at [-9.750026667063697, 15.000000000000004].
I'm coming across this error with library version should be 0.14.1 Could you take a look? Thanks. ``` -- test case -- const subjectGeom = [[[[-25, 3.061616997868383e-15], [-24.903926402016154, -0.9754516100806382], [-24.619397662556434,...
So even after upgrading to splaytree v3 this library is failing to treeshake. I've started a [branch over here](https://github.com/rowanwins/polygon-clipping/tree/treeshaking) however I haven't quite got all the tests working. [This commit](https://github.com/rowanwins/polygon-clipping/commit/51d2c4e9142a3b9707aa51bbfbc9063884d7e1d0)...
Hey @mfogel Been looking at the performance of this lib and one of the things I noticed is that is spends a lot of time in the startup before it...
Thanx a lot for you lib Please can you give a small example of using it without node.js We have "snake" track and we need to calculate interselections and show...
There's a nice starter page up at http://polygon-clipping.js.org/ Let's expand that to include: * docs * demo * real-time comparison with other similar packages. A user should be able to...
**Reproduction** https://stackblitz.com/edit/nuxt-starter-e8wsmf?file=package.json **Describe the bug** When trying to include polygon-clipping, get an error `Cannot read properties of undefined (reading 'POLYGON_CLIPPING_MAX_QUEUE_SIZE')` because we have `process` but don't have `env` in nuxt...
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 3.2.7 to 3.2.8. Changelog Sourced from vite's changelog. 3.2.8 (2024-01-19) fix: fs deny for case insensitive (a26c87d) Commits 7e3a866 release: v3.2.8 a26c87d fix: fs deny for case...