Skip to main content
Vecaria

GeoJSON Overlay Tool

Local

Overlay two GeoJSON polygon layers — intersect, erase, union or spatial join — free in your browser, no sign-in, nothing uploaded.

Layer A (subject)

Layer B (overlay/mask)

Map preview (MapLibre, geometry rendered locally; CARTO basemap tiles fetched over the network)

What is it? GeoJSON Overlay performs vector overlay between two GeoJSON polygon layers: intersect/clip (the output keeps both layers' attributes), erase (A − B), union, and spatial join (attaches a join_count and the intersecting B features' attributes to each layer-A feature). Self-intersecting rings are auto-cleaned as a fallback, and everything runs locally with turf.js — nothing leaves your browser.

TL;DR: Intersect, erase, union or spatial-join two GeoJSON polygon layers — free in your browser, no sign-in, nothing uploaded.

How to use

  1. Paste layer A (the base polygons) and layer B (the overlay/mask polygons) into the two text boxes — both come pre-filled with samples, or click "or load a file" under either box to pick/drop a .geojson/.json file.
  2. Choose the operation: intersect/clip, erase, union or spatial join, then click "Run".
  3. Inspect the map preview (switch between Layer A / Layer B / Result — it jumps to Result after a successful run), then copy or download the result GeoJSON.

FAQ

Which operation do I need?

Use intersect/clip to keep only overlapping areas, erase to remove B from A, union to combine both.

Is it local?

Yes.

Does it work with points and lines?

Overlay operations target polygons; for point or line layers use the spatial join, which attaches intersecting features' counts and attributes to each layer-A feature.

Is it free? Do I need an account?

Yes — overlaying two GeoJSON layers uses a free daily allowance and needs no sign-in. Batch runs and larger quotas are the paid Pro tier.

Is this the same as turf.js intersect?

Yes — the geometry is turf.js intersect / difference / union (MIT) running in your browser. If you have working turf code, this gives you the same polygons without writing it, and the A / B / Result map preview lets you verify before downloading.

Why is my result empty?

The error names the likely cause per operation: for erase, layer B may fully cover layer A (everything in A − B was erased); otherwise the layers do not overlap — nothing to intersect. Self-intersecting rings are cleaned automatically as a fallback, but two genuinely disjoint layers will still produce an empty result.

Which properties does the output keep?

Intersect/clip keeps both layers' attributes on each output feature; spatial join attaches a join_count plus the attributes of the intersecting B features (up to 20). Erase and union outputs come straight from turf's difference/union — check the result properties on the map preview before downstream use.

Can I overlay more than two layers?

One run overlays two layers. Run the tool again on the result GeoJSON to fold in a third layer — paste the downloaded output into the A box and the next layer into B.

Examples

  • Polygon layer A → mask layer B → intersect/erase/merge/spatial join → inspect on the map (A/B/Result) → download GeoJSON
  • Land parcels (A) → flood-zone mask (B) → erase → parcels outside the flood zone, kept attributes spot-checked on the map.

Supported formats

GeoJSON

Limitations

  • Polygon-polygon overlay is the main use case.
  • Complex overlays may be slow in the browser (the map preview samples inputs beyond 5,000 features).
  • Antimeridian-crossing geometry is split along the ±180° dateline before the planar overlay — the output consists of parts on both sides (spherical continuity approximated by splitting; a disclosure line appears when it applies).
  • Output stays in WGS84 longitude/latitude (RFC 7946 default — no crs member is written).
  • Attribute handling differs per operation: intersect/clip merges both layers' properties, spatial join attaches a join_count and up to 20 joined B-feature attribute objects, while erase and union outputs carry whatever turf's difference/union returns (properties are not re-attached).

Privacy

Privacy first: this tool runs entirely in your browser — your input and files never leave your device, and everything is cleared when you close the page.