Skip to content

Main content

Polygon To Multipolygon Singleton Wrap Tool

Structurally wrap supplied Polygon coordinates; this does not revalidate every nested ring.

Loading tool…

Description

Parse polygonJson as an object with type Polygon and array coordinates.

Geometry and feature wrappers change the container around existing coordinate or object content. A newly constructed wrapper can have the intended outer shape while still containing coordinates or members that need separate validation.

Parse polygonJson as an object with type Polygon and array coordinates.

When to use this tool

Use Polygon To Multipolygon Singleton Wrap when you need a specified single-item GeoJSON container transformation.

How to use the tool and how it works

  1. Enter polygonJson. 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.

Parse polygonJson as an object with type Polygon and array coordinates. Wrap those coordinates once in a new MultiPolygon object and serialize it.1

Input fieldMeaning and unitsAccepted input
polygonJsonPolygon JsonRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
geometryJsonGeometry JsonRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "polygonJson": "{\"type\":\"Polygon\",\"coordinates\":[[[0,0],[1,0],[0,1],[0,0]]]}"
  },
  "output": {
    "geometryJson": "{\"type\":\"MultiPolygon\",\"coordinates\":[[[[0,0],[1,0],[0,1],[0,0]]]]}"
  }
}

Limitations and assumptions

  • The coordinate contents and ring validity are not checked; foreign members, bbox, and other input members are not copied, and no spatial transformation is performed.
  • 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

Run complete schema and geometry validation on the resulting object. Preserve and review any required foreign metadata or bounding box deliberately rather than assuming every wrapper copies it.

References

  1. Calculation and input contract: geojson/polygon-to-multipolygon-singleton-wrap — tool.io

Similar or alternative tools