Description
Compare first and last, count distinct serialized positions, and mark minimumSatisfied only for closure, at least four records, and at least three distinct vertices inside result.
A polygon ring is a closed sequence of coordinate positions. Closure, minimum position count, distinct vertices, winding, and self-intersection are separate properties, so a check of one cannot stand in for complete polygon validation.
Compare first and last, count distinct serialized positions, and mark minimumSatisfied only for closure, at least four records, and at least three distinct vertices inside result.
When to use this tool
Use GeoJSON: Ring Distinct Vertex Minimum Check when you need a specific ring-shape or closure diagnostic.
How to use the tool and how it works
- Enter ring. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require every supplied ring position to contain exactly two bounded longitude/latitude coordinates. Compare first and last, count distinct serialized positions, and mark minimumSatisfied only for closure, at least four records, and at least three distinct vertices inside result.1
A linear ring needs at least four positions and matching endpoints. This tool adds a distinct-vertex check but does not establish full polygon validity.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| ring | Ring | Required. Array of array of finite number. Implementation limit: 128 items. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated members; expand to inspect the fields below. | Required. Object. |
| result.closed | Closure or endpoint state under the documented exact comparison. | Calculated result member: boolean. |
| result.distinctVertices | Distinct Vertices | Calculated result member: number. |
| result.minimumSatisfied | Minimum Satisfied | Calculated result member: boolean. |
{
"input": {
"ring": [
[
0,
0
],
[
1,
0
],
[
0,
1
],
[
0,
0
]
]
},
"output": {
"result": {
"closed": true,
"distinctVertices": 3,
"minimumSatisfied": true
}
}
} Limitations and assumptions
- This checks a minimum record condition rather than polygon validity; self-intersection, winding, area, holes, and antimeridian topology are not evaluated.
- Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use a complete GeoJSON and polygon validator for publication or geometric operations. Check coordinate convention, distinctness, winding, self-intersection, and hole relationships as appropriate.
References
Similar or alternative tools
- Polygon Single Ring Geometry Wrapper
Serialize them as the sole ring of a Polygon.
- GeoJSON: Polygon Ring Start End Pair
Return first and last positions and exact structural equality as closed inside result.