What Is Polygon Intersection in GIS?
Polygon intersection is a core vector overlay operation in GIS geoprocessing intersection workflows: given two polygon layers, it returns a new geometry containing only the area that both inputs share. Anywhere you need to find overlapping polygons online, whether that's two zoning districts, a flood zone against a parcel layer, or two service-area boundaries, this is the operation that answers it. This tool runs the full calculation locally in your browser: draw two shapes directly on the map, or upload a GeoJSON file or a zipped Shapefile, and it works as a self-contained GeoJSON KML overlap tool without sending your data anywhere.
Real-World Use Cases
Managing Multiple Layers
The sidebar layer manager keeps every polygon layer you add, plus every intersection result you generate, in one list. You can run an intersection more than once with different layer pairs, keep every result on the map at the same time, and delete any layer you no longer need without affecting the others — useful when you're checking overlap between one base layer and several candidate layers in turn.
Frequently Asked Questions
How the Intersection Algorithm Works
Under the hood, a polygon intersection is a boolean set operation on two closed rings: the output keeps every point that is inside Polygon A AND inside Polygon B, and discards everything else. This sounds simple for two convex shapes, but real-world administrative boundaries, watershed outlines, and land parcels are almost always concave and often contain holes, so a proper topology overlap check GIS tool needs an algorithm that handles arbitrary polygon shapes correctly, not just simple convex ones.
Early clipping algorithms could not do this reliably. Sutherland–Hodgman (1974) only produces correct results when the clipping polygon is convex, which rules out most real map data. Weiler–Atherton (1977) improved on this by walking the boundaries of both polygons and switching between them at each intersection point, correctly handling concave shapes and multiple output pieces, but it struggles with certain degenerate cases like shared edges or self-touching rings. Vatti's algorithm (1992) generalized clipping further using an active-edge-table sweep across horizontal scanlines, and became the basis for widely used clipping libraries such as Angus Johnson's Clipper.
The Sweep-Line Approach This Tool Uses
- Build an event queue: Every vertex and edge endpoint from both polygons is collected into a queue and sorted left to right by X coordinate.
- Sweep a vertical line: An imaginary line sweeps across the queue from left to right, and a status structure tracks which edges from Polygon A and Polygon B are currently active at that X position.
- Detect edge crossings: Whenever an edge from A crosses an edge from B, the sweep computes the exact intersection point and splits both edges there — this is the mathematical core of the spatial overlap analysis.
- Classify each segment: Using winding rules, every resulting edge segment is labeled as inside or outside the other polygon, so only segments inside both A and B are kept.
- Reconstruct output rings: The retained segments are stitched back together into closed rings, correctly handling multiple disjoint overlap areas and holes in a single pass.
This tool's engine implements a Martinez–Rueda-style sweep-line boolean algorithm, which runs in roughly O((n + k) log n) time for n input vertices and k crossings, and is robust against the degenerate cases (shared edges, touching vertices, self-intersecting rings) that break simpler clippers. Before running the full sweep on every pair, the tool also does a cheap bounding-box pre-check, so a GIS geoprocessing intersection over dozens of features doesn't waste time testing pairs that clearly can't overlap.
How to Add Your Polygon Layers
There are two ways to get polygons into the tool before running an intersection:
- Draw on the map: Click "Draw Polygon", click the map to place corners, then double-click, press Enter, or click Finish to close the shape. Repeat to add a second polygon.
- Upload a file: Drag and drop a .geojson file or a zipped Shapefile (.zip with .shp/.dbf/.shx inside) anywhere on the map, or use the Upload button. Only Polygon and MultiPolygon features are read in; points and lines are skipped.
Once you have at least two polygon layers, pick one as Layer A and the other as Layer B in the sidebar, then click "Find Intersection" to compute the shared area.
Styling Your Layers
Every layer, including the intersection result, can be restyled independently:
- Color picker: Click the color swatch next to any layer in the sidebar to change its fill and outline color instantly.
- Visibility toggle: Uncheck a layer to hide it on the map without deleting it, useful when comparing Layer A and Layer B against the intersection result on their own.
- Zoom to layer: Click the target icon next to a layer to fit the map view to that layer's bounds.
None of this styling is saved anywhere outside your session — it only controls how the map looks while you work.
Step-by-Step: Finding a Polygon Overlap





Exporting Your Results
Every layer can be exported independently, or you can export everything at once:
- Single layer export: The download icon next to any layer exports just that layer's features as a standalone .geojson file.
- Export everything: The "Download All Layers" button combines Layer A, Layer B, and every intersection result into a single GeoJSON FeatureCollection, tagging each feature with which layer it came from.
- GeoJSON format: Output files are standard RFC 7946 GeoJSON, which opens directly in QGIS, ArcGIS, Google Earth, Mapbox, and virtually every other GIS tool.
Because the output is plain GeoJSON, it also re-imports cleanly into this same tool later, or into any shapefile intersection export workflow you run afterward in desktop GIS software.
The GIS Libraries Behind Polygon Overlay
Every serious GIS overlay tool is built on one of a small number of computational geometry engines, and it's worth knowing which one is doing the work when you extract common area between polygons for a professional workflow.
- Turf.js / polygon-clipping: This tool's own engine. Turf's @turf/intersect function wraps the polygon-clipping npm package, a pure-JavaScript implementation of the Martinez–Rueda sweep-line algorithm. Because it's plain JavaScript, it runs entirely inside your browser tab with no server round-trip.
- GEOS (Geometry Engine, Open Source): A C/C++ library that computes ST_Intersection in PostGIS and powers the native Intersection algorithm in QGIS's Processing Toolbox. If you've ever run vector layer intersection QGIS-side, GEOS did the geometry math underneath.
- JTS (Java Topology Suite): The original Java implementation that GEOS was ported from. JTS backs GeoTools and the Intersection process in GeoServer WPS, and is the reference implementation many other libraries validate against.
- Shapely: Python's geometry library, which itself binds to GEOS. Data scientists doing spatial overlap analysis in geopandas are, one layer down, calling the same GEOS routines that QGIS and PostGIS use.
- shpjs: Handles the file side rather than the geometry math: it decodes an uploaded zipped Shapefile (.shp/.dbf/.shx) into GeoJSON entirely client-side, which is what lets this tool accept a shapefile intersection export as input without a server upload.
All five tools agree on the underlying mathematics, since they're all solving the same boolean overlay problem. The practical difference is where the computation happens: GEOS/JTS/Shapely run on a server or a desktop GIS install, while this tool's Turf.js-based engine runs as a map polygon overlap finder directly on your device, which is why no file upload to a remote server is ever required here.
Related Geoprocessing Tools
Map tiles © OpenStreetMap contributors and Protomaps (hosted by KONAKTIVE), CARTO, Esri (satellite). Intersection math powered by Turf.js. Shapefile parsing by shpjs. Map rendering by Leaflet. All drawing, file reading and intersection calculation is local — no data is uploaded to any server.
