Polygon Overlay Lab

Polygon Overlay Lab

Create real intersection, difference or meter-buffer geometry while preserving holes, attributes and area.

1. Spatial layer input

Use 2D longitude then latitude in a FeatureCollection, Feature, Polygon or MultiPolygon. Explicit CRS and invalid rings are rejected.

Used for intersection or difference. All B features are unioned into one region.

Intersection and difference boundaries use planar longitude–latitude. Buffer distance uses locally projected meters; area is spherical m². Antimeridian, polar and large-region analysis are unsupported.

Copyright and permission text for included geometry libraries: View original licenses

Comments & questions

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

  1. Paste layer A and B Polygon or MultiPolygon GeoJSON in longitude–latitude order, choose local files or load the example.
  2. Choose intersection A∩B, difference A−B or A buffer. Buffer ignores B and accepts −10,000 to 10,000 meters.
  3. Run the calculation and compare unique input/output areas, disconnected parts and holes.
  4. 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.

References

Related Tools

GeoJSON Topology AuditorGeoJSON Map EditorCoordinate Reference LabWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerCartographic Label PlacerSpatial Table JoinGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterCron Expression GeneratorRegex TesterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVCase ConverterImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →