Description
Return indexes with true flags and set collectionEmpty only when the member list itself has length zero.
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.
Return indexes with true flags and set collectionEmpty only when the member list itself has length zero.
When to use this tool
Use Geometry Collection Empty Member Role when you need one explicit GeoJSON object-shape or container operation.
How to use the tool and how it works
- Enter memberTypes, emptyMembers. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read emptyIndices, collectionEmpty. Inspect collectionEmpty before interpreting the associated values.
Require equally long recognized memberTypes and emptyMembers arrays. Return indexes with true flags and set collectionEmpty only when the member list itself has length zero.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| memberTypes | Member Types | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| emptyMembers | Empty Members | Required. Array of boolean; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| emptyIndices | Empty Indices | Required. Array of safe integer; maximum items 256. |
| collectionEmpty | Collection Empty | Required. Boolean. |
{
"input": {
"memberTypes": [
"Point",
"LineString"
],
"emptyMembers": [
false,
true
]
},
"output": {
"emptyIndices": [
1
],
"collectionEmpty": false
}
} Limitations and assumptions
- Emptiness is supplied metadata rather than derived from actual geometry. A collection with members all marked empty still has collectionEmpty false.
- 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
Similar or alternative tools
- Feature Geometry Collection Member Count
For null geometry return zero with the null flag; otherwise require GeometryCollection with an array geometries member and count its direct members.
- Geometry Collection Null Member Rejection
Parse membersJson as an array, collect indexes whose direct member is exactly null, and return valid when that index list is empty.