Polygon Overlay Lab
Create the common part of two spatial layers (A∩B), remove B from A (A−B), or expand or erode A by a meter buffer. Each result records its original A ID and properties and matching B indexes. Overall area unions overlapping results before measuring. All calculations run in this browser tab.
Key features
- Strict 2D longitude–latitude FeatureCollection, Feature, Polygon and MultiPolygon input with topology checks
- Real intersection, difference, positive and negative meter buffer Polygon/MultiPolygon results
- Preserved holes, disconnected pieces, original ID, attributes, A feature index and matched B indexes
- Turf spherical area in m² and unique overall area without counting overlapping features twice
- Tile-free SVG comparison and local GeoJSON, JSON analysis and SVG downloads
- Bounded input: 90 KB, 16 features and 400 coordinates per layer, combined 3-degree span and buffer up to 10 km
How to use
- Paste layer A and B Polygon or MultiPolygon GeoJSON in longitude–latitude order, choose local files or load the example.
- Choose intersection A∩B, difference A−B or A buffer. Buffer ignores B and accepts −10,000 to 10,000 meters.
- Run the calculation and compare unique input/output areas, disconnected parts and holes.
- Inspect the color preview and original properties, then save GeoJSON, analysis JSON or SVG locally.
Use cases
- Find the common area of two service regions
- Remove exclusions from a planned region
- Draft a buffer around a small area
- Compare boundaries of a hole-bearing MultiPolygon
Frequently asked questions
How are Boolean boundaries and area measured?
Intersection and difference treat longitude and latitude as flat Cartesian coordinates. Reported area is square meters under Turf's spherical model. This is not survey-grade or legal boundary analysis over large regions.
Does buffer distance 500 mean 500 longitude degrees?
No. Turf projects each geometry using a local azimuthal-equidistant projection, buffers in meters, then converts back to longitude and latitude. A negative distance erodes it; complete erosion gives an empty FeatureCollection.
Are holes and multiple features retained?
Yes. Each A feature is processed separately with its ID and properties nested in the result. Holes and separated parts remain Polygon or MultiPolygon. Because A features may overlap, overall area is measured after unioning results.
Can I use another CRS, the antimeridian or polar data?
No. Explicit CRS members are rejected. Use WGS 84 longitude ±180 degrees and latitude ±80 degrees. Rings spanning the antimeridian, self-crossing or open are rejected; the combined span must not exceed 3 degrees.
Are coordinates uploaded?
No. Files stay in this browser tab and exports are generated locally. External map tiles are not fetched.
Privacy
Coordinates and files stay in this browser tab. There are no uploads, external map tiles or automatic storage.
Comments & questions