Description
For null geometry return zero with the null flag; otherwise require GeometryCollection with an array geometries member and count its direct members.
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.
For null geometry return zero with the null flag; otherwise require GeometryCollection with an array geometries member and count its direct members.
When to use this tool
Use Feature Geometry Collection Member Count when you need one explicit GeoJSON object-shape or container operation.
How to use the tool and how it works
- Enter featureJson. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read count, nullGeometry. Inspect nullGeometry before interpreting the associated values.
Require a Feature object. For null geometry return zero with the null flag; otherwise require GeometryCollection with an array geometries member and count its direct members.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| featureJson | Feature Json | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| count | Count under the documented selection and duplicate convention. | Required. Safe integer. |
| nullGeometry | Null Geometry | Required. Boolean. |
{
"input": {
"featureJson": "{\"type\":\"Feature\",\"geometry\":{\"type\":\"GeometryCollection\",\"geometries\":[]},\"properties\":{}}"
},
"output": {
"count": 0,
"nullGeometry": false
}
} Limitations and assumptions
- The count is not recursive and does not validate individual children. Nested GeometryCollections each occupy one direct slot.
- 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
- Geometrycollection Leaf Count
Parse a GeometryCollection object and recursively traverse its geometries arrays with a depth guard of 32.
- Feature Position Total Count
Return zero and the null flag for null geometry; otherwise recursively traverse recognized geometry types and collection children to depth 32, counting each finite numeric position with at least two ordinates.