Fix a Self-Intersecting Polygon (WKT and GeoJSON)
2026-01-06 · 5 min read · WKT · GeoJSON · validation · polygon · self-intersection · bowtie · GIS
Self‑intersections (“bowties”) make polygons invalid. Learn how to detect the crossing, repair it in a browser, validate the result, and export clean WKT or GeoJSON.
Try it now
A self‑intersecting polygon is a polygon whose boundary crosses itself, often called a bowtie.
Many GIS tools refuse to buffer, clip, or union these geometries. Or they “work” but return unpredictable results.
This guide shows a practical way to:
- Spot the crossing quickly.
- Fix it without uploads.
- Validate the geometry.
- Export clean WKT and GeoJSON.
What “self‑intersection” means (in plain terms)
A valid polygon has an outer ring that forms a non‑crossing loop.
When edges cross, the polygon no longer has a single, unambiguous interior.
Typical symptoms
- Validator errors like Self-intersection, Ring self-intersection, or Invalid polygon.
- Your polygon renders “inside‑out”, disappears at some zoom levels, or looks like two triangles.
- Operations like buffer, union, or clip fail, or give empty or odd results.
Quick diagnostic: confirm it’s a bowtie
- Open WKT Validator or GeoJSON Validator.
- Paste your geometry.
- If you see a self‑intersection error, you’re in the right place.
Note: The validators are meant to detect and explain bowties. They do not automatically “fix” self-intersections, because a bowtie does not have one unambiguous “correct” shape. Use the Editor to decide what you meant and repair it.
Minimal example (a classic bowtie)
POLYGON((0 0, 2 2, 0 2, 2 0, 0 0))
That ring crosses itself in the middle.
Fix it in the browser (ClearSKY Polygon Tools)
A bowtie is not “one clear shape”. You have to decide what you meant:
- One lobe. Keep only one side.
- Two lobes. Turn it into a MultiPolygon, or two separate polygons.
Option A: adjust vertices so edges don’t cross
Use this if it’s almost correct and a couple of points are misplaced.
- Open the Editor and paste or import your geometry.
- Zoom in until you can clearly see where two edges cross.
- Move one vertex, or a small set of vertices, so the two edges no longer intersect.
- Validate again in WKT Validator or GeoJSON Validator.
Rule of thumb: Move the minimum number of points needed to remove the crossing, so you don’t accidentally change the footprint.
Option B: rebuild the polygon (often faster)
Use this when the ring is messy, has many points, or multiple crossings.
- Use the original geometry as a visual reference.
- Trace a new polygon with clean edges and no crossings.
- Delete the broken one.
- Validate and export.
This is boring, but it’s the most reliable fix when the original is beyond saving.
Option C: split into two valid polygons (if you intended two areas)
If your bowtie represents two intended lobes, two triangles or two areas, the right output is usually two polygons, not one.
A workflow that works in most tools:
- Split at, or near, the crossing.
- Keep both pieces as separate polygons.
- Export as MultiPolygon if you need one feature.
If your downstream system only accepts a single polygon, you’ll have to choose which lobe to keep.
Validate the fixed result (don’t skip this)
After any fix:
- Re-run validation (WKT or GeoJSON).
- Visually confirm the outline looks right.
- Sanity-check area and bounds. Huge or tiny values usually mean a coordinate issue.
If you’re working in lat/lon (EPSG:4326), keep in mind:
- Area values are not “square meters” unless projected.
- Extreme lon or lat numbers often indicate swapped coordinates, or a wrong CRS.
If you’re using QGIS or PostGIS
Sometimes you need a “known good” repair in an external tool.
QGIS
Useful tools, names may vary by version:
- Check validity (to locate the problem)
- Fix geometries (attempts an automatic repair)
- Polygonize (can help rebuild from lines)
Tip: Always compare the repaired output to the original. Automatic fixes can change topology in ways you didn’t intend.
PostGIS
Handy functions:
ST_IsValid(geom). Check validity.ST_IsValidReason(geom). Get the reason. It often mentions self‑intersection.ST_MakeValid(geom). Attempt repair. It may return a MULTIPOLYGON.
Example:
SELECT ST_IsValidReason(geom) FROM my_table WHERE id = 123;
UPDATE my_table
SET geom = ST_MakeValid(geom)
WHERE id = 123;
If ST_MakeValid returns a MultiPolygon and your pipeline expects a Polygon, you’ll need a decision rule. For example, keep the largest part.
Prevention checklist
- Avoid “zig‑zagging” back over the same area while digitizing.
- Keep vertices clean. Remove accidental duplicates.
- Validate before exporting to Shapefile, or before running heavy operations.
- If you’re converting between CRS, verify the CRS first. Bad CRS transforms can create crossings.
FAQ
›Why do bowties break buffers, unions, and clips?
A lot of geometry algorithms assume polygons have a well-defined inside and outside. A self-intersection breaks that assumption, so tools either fail validation or return results that depend on implementation details.
›Can a tool fix this automatically without changing my shape?
Sometimes. If the issue is a tiny “kink” caused by a misplaced point, an automatic fix can work well. But for true bowties, a tool must pick an interior interpretation, which can change your intended area. Always compare before and after.
›Why did the fix turn my Polygon into a MultiPolygon?
That usually means the original boundary implied multiple separate areas. Many “make valid” operations preserve both parts as a MultiPolygon, which is often the most honest representation.
›How do I choose which part to keep if I need a single Polygon?
Common approaches are: keep the largest area, keep the part that overlaps a reference layer, or keep the part that contains a known point (for example, a centroid or POI). The correct choice is domain-specific.
›Is this the same as a ring not being closed?
No. A ring closure error means the first and last coordinate don’t match. A self-intersection means the ring closes, but edges cross somewhere along the boundary.
›Can the validator fix a bowtie automatically?
No. The validator is for detection and diagnosis. A bowtie has multiple possible “correct” outputs, so an automatic fix would have to guess what you meant. Use the Editor to repair it and then re-run the validator to confirm it is valid.
Related resources
Related guides
validation
Fix a Hole Outside the Outer Ring (WKT and GeoJSON)
A hole must sit inside its outer ring. Learn how to detect a hole outside the outer ring, fix it in the browser, validate the result, and export clean WKT or GeoJSON.
validation
Fix a Zero-Area Polygon Ring (Degenerate) (WKT and GeoJSON)
A zero-area ring is a degenerate polygon. Learn how to spot it, remove or repair it in a browser, validate the result, and export clean WKT or GeoJSON.
validation
Fix a Polygon Ring That Is Not Closed (WKT and GeoJSON)
A polygon ring must end where it starts. Learn how to spot an unclosed ring, close it correctly in WKT or GeoJSON, validate the result, and export clean geometry.