Description
Compare the first two ordinates for xyClosed and all ordinates and dimensions for fullyClosed.
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 the first two ordinates for xyClosed and all ordinates and dimensions for fullyClosed.
When to use this tool
Use Polygon Ring Closure Ordinate Consistency when you need a specific ring-shape or closure diagnostic.
How to use the tool and how it works
- Enter first, last. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read xyClosed, fullyClosed. Inspect xyClosed, fullyClosed before interpreting the associated values.
Require first and last positions each with at least two entries. Compare the first two ordinates for xyClosed and all ordinates and dimensions for fullyClosed.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Array of finite number; maximum items 256. |
| last | Last | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| xyClosed | Whether the first two ordinates match exactly. | Required. Boolean. |
| fullyClosed | Whether complete tuple lengths and every ordinate match exactly. | Required. Boolean. |
{
"input": {
"first": [
1,
2,
3
],
"last": [
1,
2,
4
]
},
"output": {
"xyClosed": true,
"fullyClosed": false
}
} Limitations and assumptions
- XY closure can coexist with different third values or dimensions; no full ring, coordinate bounds, minimum count, or polygon topology is inspected.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
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
- Linestring Two Point Degeneracy Flag
Mark degenerate when every ordinate is exactly equal.
- GeoJSON: Polygon Ring Start End Pair
Return first and last positions and exact structural equality as closed inside result.