Skip to content

Main content

Geometry Collection Child Type Token Tool

Calculate geometry collection child type token from explicit caller-supplied inputs.

Loading tool…

Description

Parse a JSON object, read its type when it is a string or use an empty string otherwise, and return whether it belongs to the seven recognized geometry-type tokens.

GeoJSON distinguishes geometry objects, Features, FeatureCollections, and nullable Feature geometry. Type names and container structure identify these roles, but a recognized token or expected array member alone does not establish full validity.

Parse a JSON object, read its type when it is a string or use an empty string otherwise, and return whether it belongs to the seven recognized geometry-type tokens.

When to use this tool

Use Geometry Collection Child Type Token when you need one explicit GeoJSON object-shape or container operation.

How to use the tool and how it works

  1. Enter childJson. 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 type, recognized. Inspect recognized before interpreting the associated values.

Parse a JSON object, read its type when it is a string or use an empty string otherwise, and return whether it belongs to the seven recognized geometry-type tokens.1

Input fieldMeaning and unitsAccepted input
childJsonChild JsonRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
typeLiteral type token or parsed-value classification under the stated vocabulary.Required. Text; maximum UTF-16 length 8192.
recognizedRecognizedRequired. Boolean.
json
{
  "input": {
    "childJson": "{\"type\":\"Point\",\"coordinates\":[1,2]}"
  },
  "output": {
    "type": "Point",
    "recognized": true
  }
}

Limitations and assumptions

  • Recognition checks only the type token, not coordinates, collection members, or whether the object is a valid child geometry.
  • 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 full GeoJSON validator and any needed geometric validity checks for interchange. Preserve the distinction between absence, null, empty containers, recognized type, and valid coordinates.

References

  1. Calculation and input contract: geojson/geometry-collection-child-type-token — tool.io

Similar or alternative tools