Skip to content

Main content

Geometry Collection Null Member Rejection Tool

Check only the prohibition of null direct GeometryCollection members; valid=true does not establish full geometry validity.

Loading tool…

Description

Parse membersJson as an array, collect indexes whose direct member is exactly null, and return valid when that index list is empty.

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 membersJson as an array, collect indexes whose direct member is exactly null, and return valid when that index list is empty.

When to use this tool

Use Geometry Collection Null Member Rejection when you need one explicit GeoJSON object-shape or container operation.

How to use the tool and how it works

  1. Enter membersJson. 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 valid, nullIndexes. Inspect valid before interpreting the associated values.

Parse membersJson as an array, collect indexes whose direct member is exactly null, and return valid when that index list is empty.1

Input fieldMeaning and unitsAccepted input
membersJsonMembers JsonRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
validWhether this specific check passes; not necessarily a full object-validity verdict.Required. Boolean.
nullIndexesNull IndexesRequired. Array of safe integer; maximum items 256.
json
{
  "input": {
    "membersJson": "[null,{\"type\":\"Point\",\"coordinates\":[1,2]}]"
  },
  "output": {
    "valid": false,
    "nullIndexes": [
      0
    ]
  }
}

Limitations and assumptions

  • Only direct null members are rejected by this diagnostic. Other invalid members, such as numbers, and nested nulls are not checked; an empty list passes.
  • 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-null-member-rejection — tool.io

Similar or alternative tools