Skip to content

Main content

Polygon Single Ring Geometry Wrapper Tool

Calculate polygon single ring geometry wrapper from explicit caller-supplied inputs.

Loading tool…

Description

Serialize them as the sole ring of a Polygon.

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.

Serialize them as the sole ring of a Polygon.

When to use this tool

Use Polygon Single Ring Geometry Wrapper 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 geometryJson. Use the output convention below.

Require at least four positions each of consistent dimension two or three and identical first/last coordinates. Serialize them as the sole ring of a Polygon.1

Input fieldMeaning and unitsAccepted input
ringRingRequired. Array of array of finite number; maximum items 128; maximum items 128.
Output fieldInterpretationReturned shape
geometryJsonGeometry JsonRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "ring": [
      [
        0,
        0
      ],
      [
        2,
        0
      ],
      [
        0,
        2
      ],
      [
        0,
        0
      ]
    ]
  },
  "output": {
    "geometryJson": "{\"type\":\"Polygon\",\"coordinates\":[[[0,0],[2,0],[0,2],[0,0]]]}"
  }
}

Limitations and assumptions

  • No longitude/latitude ranges, distinct-vertex count, area, winding, self-intersection, or actual polygon validity is checked; this is a closure-and-shape wrapper.
  • 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/polygon-single-ring-geometry-wrapper — tool.io

Similar or alternative tools