OnlineMapMaker logo

Polygon Intersection Tool: GeoJSON & Shapefile

Draw or upload two polygon layers and extract only the area where they overlap. Open fullscreen ↗

Rate this tool:
Advertisement
Advertisement
Loading map…
Need assistance with your GIS project?Explore Our Services

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

🌾
Agriculture and irrigation management
Overlay soil-type zones against a field boundary to see which soil types are actually present within a specific field before planning irrigation or fertilizer application.
🏙️
Urban planning and zoning review
Overlay a proposed development parcel against zoning district boundaries to see exactly how much of the parcel falls inside a restricted zone before submitting a permit application.
🚨
Disaster response and evacuation planning
Intersect a flood or hurricane evacuation zone with population or infrastructure layers to estimate exactly how many assets fall inside the at-risk area.
🏘️
Real estate and insurance underwriting
Overlay FEMA-style floodplain maps against a property parcel to determine what fraction of a lot sits inside a flood risk zone before writing a policy.
📡
Telecom coverage planning
Compare two carriers' coverage polygons to find shared coverage areas for roaming agreements, or gaps where only one carrier reaches.
🌿
Environmental and conservation analysis
Intersect a protected habitat buffer with a proposed land-use change area to quantify how much of the buffer would actually be affected.

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

Can I use this as a GeoJSON KML overlap tool?
Yes for GeoJSON directly. KML files need to be converted to GeoJSON first (this site's KML/KMZ Viewer can export KML data as GeoJSON), after which you can upload the result here to check the overlap.
Does my data get uploaded anywhere? Is this a safe map polygon overlap finder?
No file you draw or upload ever leaves your device. Every calculation, from reading a Shapefile to running the intersection algorithm, happens locally in your browser using JavaScript — nothing is sent to a server.
Is this a full spatial overlap analysis tool, or just a visual overlap finder?
It's a full analysis tool. Beyond drawing the overlap, it computes the exact overlap area in hectares, square kilometers and acres, and lets you export the result geometry for further analysis in QGIS, ArcGIS or any other GIS software.
What algorithm computes the overlap, and is it accurate?
The tool uses a Martinez–Rueda-style sweep-line boolean algorithm (via Turf.js's polygon-clipping engine), the same family of algorithm used by production GIS software. It correctly handles concave polygons, multiple disjoint overlap areas, and polygons with holes.
How do I find overlapping polygons online for free?
Draw two polygons on the map or upload a GeoJSON file or zipped Shapefile for each layer, pick them as Layer A and Layer B in this tool, and click Find Intersection. The whole calculation runs in your browser at no cost and with no sign-up.
Does this tool perform a topology overlap check or just a visual overlay?
It performs a true topology overlap check: the output is a real geometry with accurate coordinates and area, not just two shapes drawn on top of each other. You can export it and measure it like any other polygon layer.
Can I do a shapefile intersection export directly from a zipped shapefile?
Yes. Upload a zipped Shapefile (.zip containing .shp, .dbf and .shx) for Layer A and/or Layer B, run the intersection, then export the result as GeoJSON, which is readable by virtually every desktop GIS application.
Can I extract just the common area between polygons and ignore the rest?
Yes — that is exactly what the intersection result is. Only the shared area is kept as a new layer; the non-overlapping parts of Layer A and Layer B are left untouched in their own layers and are not merged into the result.
How does this compare to running vector layer intersection in QGIS?
QGIS's native Intersection algorithm uses the GEOS library on your desktop; this tool uses a JavaScript sweep-line engine in your browser. Both implement the same boolean overlay mathematics and should produce matching results, but this tool needs no installation and keeps your data local to the browser tab.
What is polygon intersection in GIS?
Polygon intersection is a vector overlay operation that takes two polygon layers and returns a new geometry containing only the area common to both — the region where they physically overlap on the map, and nothing else.

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Advertisement
Advertisement

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

Empty Polygon Intersection Tool map showing the draw, upload and sample polygon buttons before any layer is added
1
Step 1: Open the tool and add your first layer
The empty tool: draw a polygon, upload a file, or click Sample Polygons to try it instantly.
Two overlapping polygon layers loaded from zipped Shapefiles, shown on the map with the layer list in the sidebar
2
Step 2: Add a second overlapping layer
Two layers loaded — the sidebar shows both, and Layer A / Layer B are already picked for you.
Sidebar close-up showing the Layer A and Layer B dropdown selectors and the Find Intersection button
3
Step 3: Pick Layer A and Layer B
Confirm Layer A and Layer B, then click Find Intersection to run the overlay.
The computed polygon intersection shown as a teal overlap shape on the map with a total overlap area readout in the sidebar
4
Step 4: Review the overlap result
The result: the exact overlapping area, plus its size in hectares, km² and acres.
Layer manager panel listing Layer A, Layer B and the Intersection layer with export and download controls
5
Step 5: Export the intersection layer
Export the intersection alone, or all three layers together, as GeoJSON.

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.

Advertisement
Advertisement

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.

Advertisement
Advertisement

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.

Muhammad Gulraiz Khan, GIS Expert and Founder of KONAKTIVE and OnlineMapMaker.com

About the Author

Muhammad Gulraiz Khan

GIS Expert & Consultant · Founder, KONAKTIVE

Muhammad Gulraiz Khan is a GIS expert with over a decade of professional experience delivering geospatial solutions for the energy sector, including projects for the World Bank, the International Finance Corporation (IFC), and USAID. He built OnlineMapMaker.com to make professional-grade mapping tools free and accessible to everyone.

Advertisement
Advertisement