ai-agent

polygon-clipping: Precise Boolean Operations for Your Geo‑Data

Easily perform union, intersection, difference, and xor on Polygons and MultiPolygons in JavaScript. Ideal for founders building mapping, CAD, or spatial analytics features.

From the repo · “Apply boolean polygon clipping operations (union, intersection, difference, xor) to your Polygons & MultiPolygons.”

642 stars68 forksJavaScriptGuide quality 9/10 · reviewed Oct 10Updated 4/19/2024100% free · open source
What it does

The polygon-clipping tool applies boolean clipping operations such as union, intersection, difference, and xor to polygons and multi-polygons in JavaScript.

When to use it
  • •When working with geographic information systems (GIS) and need to manipulate polygon shapes
  • •When developing a web application that requires spatial operations on polygons
  • •When analyzing geometric data and need to perform boolean operations on polygons
Ready-to-paste prompt
const polygon1 = [[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]; const polygon2 = [[0.5, 0], [1.5, 0], [1.5, 1], [0.5, 1], [0.5, 0]]; const unionResult = clip.union(polygon1, polygon2); console.log(unionResult);
Heads up: Make sure the input polygons are valid (i.e., they have at least 3 points and the last point is the same as the first point) to avoid errors during clipping operations
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

✅ Light setup

Installs with a command or two; your AI agent can do it for you.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/polygon-clipping && curl -fsSL https://workflowstacks.com/api/skills/polygon-clipping/claude-skill -o ~/.claude/skills/polygon-clipping/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

Quick Actions
Details
Creator
mfogel
Language
JavaScript
Category
ai-agent
Published
1/26/2018

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/polygon-clipping.svg)](https://workflowstacks.com/skills/polygon-clipping?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.