Description
Audit exact repeated polygon coordinates with an explicit allowance for one repeated closure point; interior repetition remains observable.
Planar geometry operates on two-coordinate Cartesian points and explicit shape boundaries. A closed rectangle includes its edges, while a segment parameter locates a point along a supporting line. Signed cross products, areas and axis gaps preserve orientation or direction information that a magnitude alone would lose.
Audit exact repeated polygon coordinates with an explicit allowance for one repeated closure point; interior repetition remains observable.
When to use this tool
Use this tool to audit exact repeated polygon coordinates with an explicit allowance for one repeated closure point; interior repetition remains observable.
How to use the tool and how it works
- Enter points, repeatedClosureAllowed using the input definitions below.
- Run the operation. Resolve malformed-input errors before interpreting the result.
- Read result.duplicates, result.explicitClosure. Interpret signs, units, ordering and null values using the rules below.
Detect exact equality of the first and last point. If repeatedClosureAllowed is true, exclude that final closure point from duplicate grouping; group all remaining exact coordinate repeats with their original indexes.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| points | Ordered planar [x,y] points. Polygon operations close the cycle implicitly; polyline operations use adjacent pairs only. | Dense list of at most 128 rows of at most 128 finite numbers; the operation’s shape constraints also apply. |
| repeatedClosureAllowed | Whether one final point equal to the first is exempt from duplicate grouping. | Boolean true or false. |
| Output field | Interpretation |
|---|---|
| result | Object containing the fields below. |
| result.duplicates | Repeated exact coordinate groups with source indexes after the allowed closure removal. |
| result.explicitClosure | Whether the original final point exactly repeats the first. |
{
"input": {
"points": [
[
0,
0
],
[
1,
0
],
[
0,
0
]
],
"repeatedClosureAllowed": true
},
"output": {
"result": {
"duplicates": [],
"explicitClosure": true
}
}
} Limitations and assumptions
- Only one final closure occurrence is exempted; other repeated vertices remain visible and topology is not validated.
- Point components and rectangle bounds are finite within ±1,000,000,000. Rectangles use [minX,minY,maxX,maxY] with ordered inclusive bounds. Floating arithmetic is used without an implicit robustness tolerance.
- Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.
Alternative or Complementary methods
Choose the boundary and coordinate convention explicitly. Use robust geometric predicates or a topology-aware library when near-coincidence, holes, invalid polygons or geographic coordinates matter.
References
Similar or alternative tools
- Polygon Edge Orientation Table
Report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.
- Polygon Half Plane Clip
Clip an ordered polygon against the closed half-plane nx*x+ny*y<=maximum; no self-intersection validation or geographic geometry.