Skip to content

Main content

GeoJSON: Ring Distinct Vertex Minimum Check Tool

Check only the RFC7946 closed linear-ring minimum of four positions and three distinct vertices; no simplicity, winding or polygon validity claim.

Loading tool…

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

  1. Enter ring. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
ringRingRequired. Array of array of finite number. Implementation limit: 128 items.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.closedClosure or endpoint state under the documented exact comparison.Calculated result member: boolean.
result.distinctVerticesDistinct VerticesCalculated result member: number.
result.minimumSatisfiedMinimum SatisfiedCalculated result member: boolean.
json
{
  "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

  1. Calculation and input contract: geojson/ring-distinct-vertex-minimum-check — tool.io

  2. RFC 7946: Polygon linear rings — IETF

Similar or alternative tools