Fix a Polygon Ring That Is Not Closed (WKT and GeoJSON)
2026-01-06 · 5 min read · WKT · GeoJSON · validation · polygon · ring · closed-ring · GIS
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.
Try it now
A polygon ring is not closed when the last coordinate in a ring does not match the first coordinate.
Most validators will reject the geometry, and many GIS tools will refuse to process it.
This guide shows a practical way to:
- Spot the error quickly.
- Close the ring correctly.
- Validate the result.
- Export clean WKT or GeoJSON.
What “ring not closed” means (in plain terms)
A polygon is made of one or more linear rings:
- The outer ring defines the boundary.
- Optional inner rings define holes.
For a ring to be valid, it must start and end on the same coordinate.
In other words, the first and last coordinate must be identical, including the same X and Y values.
Typical symptoms
- Validator errors like Ring not closed or First and last point must be the same.
- A polygon that renders strangely, or not at all, in some tools.
- Operations like buffer, union, or clip failing early in the pipeline.
Quick diagnostic. Confirm it is an unclosed ring
- Open WKT Validator (or GeoJSON Validator).
- Paste your geometry.
- If you see a ring closure error, you are in the right place.
Minimal example. WKT polygon with an unclosed ring
This example is missing the closing point at the end.
POLYGON((0 0, 2 0, 2 2, 0 2))
A correct closed version repeats the first coordinate at the end.
POLYGON((0 0, 2 0, 2 2, 0 2, 0 0))
Minimal example. GeoJSON polygon with an unclosed ring
In GeoJSON, each ring is an array of coordinates. The first coordinate must equal the last.
{
"type": "Polygon",
"coordinates": [
[
[0, 0],
[2, 0],
[2, 2],
[0, 2]
]
]
}
Correct closed version:
{
"type": "Polygon",
"coordinates": [
[
[0, 0],
[2, 0],
[2, 2],
[0, 2],
[0, 0]
]
]
}
Fix it in the browser (ClearSKY Polygon Tools)
Option A. Close the ring by copying the first coordinate
This is the usual fix when everything else looks correct.
- Open the Editor and paste or import your geometry.
- Find the first coordinate of the ring.
- Make the last coordinate equal to the first coordinate.
- Re-run WKT Validator or GeoJSON Validator.
Rule of thumb: Only add the closing point. Do not reorder points unless you know the ring is wrong.
Option B. Rebuild the polygon if the ending point is not the real start
Sometimes the last point is not “missing.” Sometimes the ring is in a weird order, duplicated, or partially broken.
Use this if:
- The ring has many points and looks messy.
- There are multiple small errors, not just a missing closure.
- The polygon outline is clearly wrong when rendered.
Steps:
- Use the broken polygon as a visual reference.
- Trace a new polygon with clean edges.
- Delete the broken one.
- Validate and export.
Special cases you should not miss
Holes must be closed too
If your polygon has holes, every hole ring must be closed, not just the outer ring.
WKT holes example, outer ring plus one hole ring. Both rings must end where they start.
POLYGON(
(0 0, 6 0, 6 6, 0 6, 0 0),
(2 2, 4 2, 4 4, 2 4, 2 2)
)
MultiPolygon means more rings to check
If you have a MultiPolygon, each polygon has its own outer ring, and optionally holes.
Every ring inside the MultiPolygon must be closed.
Validate the fixed result (do not skip this)
After any fix:
- Re-run validation (WKT or GeoJSON).
- Visually confirm the outline looks right.
- Sanity-check bounding box and area. If they look extreme, you may have a CRS or coordinate issue.
If validation still fails, check for other common problems:
- Self-intersections.
- Duplicate vertices.
- Holes outside the outer ring.
- Too few points.
Prevention checklist
- Finish digitizing by snapping the last vertex to the first.
- Avoid exporting partial sketches as polygons.
- Validate before converting to Shapefile or before running heavy GIS operations.
- If you edit raw coordinates, always confirm the last point equals the first.
FAQ
›Do I need to close rings in both WKT and GeoJSON?
Yes. Both formats represent rings, and rings must be closed to be valid. In WKT, it means repeating the first coordinate at the end of the ring. In GeoJSON, it means the last coordinate in the ring array must equal the first.
›My polygon renders fine. Why does the validator still complain?
Some renderers try to be forgiving, but validators are strict. Many downstream operations and file formats assume valid geometry. If the ring is not closed, you can get failures later, or you can get subtle wrong results.
›Should I add the first point again, or should I move the last point?
Add the first point again if the rest of the ring is correct. Move the last point only if you are sure the last point was meant to be the start point and the ring ordering is already correct.
›What if the first and last points are almost the same but not identical?
Validators usually require exact equality. If you have a tiny difference, treat it as not closed. Copy the first coordinate exactly. If the near match is caused by rounding or precision loss, export with enough decimals to preserve the original coordinates.
›Is a ring closure error the same as a self-intersection?
No. Ring closure is about the start and end point matching. A self-intersection happens when edges cross somewhere along the ring. You can have a closed ring that still self-intersects, and you can have an unclosed ring with no crossings.
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 Self-Intersecting Polygon (WKT and GeoJSON)
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.