2015-12-15 07:39:43 +11:00
{
"name": "num_geometries",
"type": "function",
2020-07-02 01:46:48 +01:00
"groups": ["GeometryGroup"],
2022-03-22 12:03:39 +07:00
"description": "Returns the number of geometries in a geometry collection, or the number of parts in a multi-part geometry. The function returns NULL if the input geometry is not a collection.",
2022-01-07 08:33:29 -05:00
"arguments": [{
"arg": "geometry",
2022-03-22 12:03:39 +07:00
"description": "geometry collection or multi-part geometry"
2022-01-07 08:33:29 -05:00
}],
"examples": [{
"expression": "num_geometries(geom_from_wkt('GEOMETRYCOLLECTION(POINT(0 1), POINT(0 0), POINT(1 0), POINT(1 1))'))",
"returns": "4"
2022-03-22 12:03:39 +07:00
},{
"expression": "num_geometries(geom_from_wkt('MULTIPOINT((0 1), (0 0), (1 0))'))",
"returns": "3"
2022-01-07 08:33:29 -05:00
}],
2022-01-11 11:25:21 -05:00
"tags": ["collection", "multipart", "parts", "count"]
2015-12-15 07:39:43 +11:00
}