Description
Return first and last positions and exact structural equality as closed 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.
Return first and last positions and exact structural equality as closed inside result.
When to use this tool
Use GeoJSON: Polygon Ring Start End Pair 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 a nonempty ring with positions of length two or three. Return first and last positions and exact structural equality as closed inside result.1
| 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.first | First | Calculated result member: array. |
| result.last | Last | Calculated result member: array. |
| result.closed | Closure or endpoint state under the documented exact comparison. | Calculated result member: boolean. |
{
"input": {
"ring": [
[
0,
0
],
[
1,
1
],
[
0,
0
]
]
},
"output": {
"result": {
"first": [
0,
0
],
"last": [
0,
0
],
"closed": true
}
}
} Limitations and assumptions
- A single position compares equal to itself and can be closed; no minimum ring size, common intermediate dimension, longitude/latitude range, or polygon topology is validated.
- 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 Ring Closure Ordinate Consistency
Compare the first two ordinates for xyClosed and all ordinates and dimensions for fullyClosed.
- Polygon Ring Minimum Position Budget
Return max(0, 4-positions) and meetsMinimum when count is at least four.