QGIS/resources/function_help/json/num_geometries
Nyall Dawson 5b244ae88c [FEATURE] More geometry functions for expressions
- add accessors: geometry_n, interior_ring_n
- add num_geometries, num_rings, num_interior_rings
- add nodes_to_points for converting every node in a geometry
to a multipoint geometry
- add segments_to_lines for converting every segment in a geometry
to a multiline geometry

nodes_to_points and segments_to_lines are intended for use with
geometry generator symbology, eg to allow use of m and z values
for nodes/lines with data defined symbology.
2015-12-15 11:22:39 +11:00

8 lines
415 B
Plaintext

{
"name": "num_geometries",
"type": "function",
"description": "Returns the number of geometries in a geometry collection, or null if the input geometry is not a collection.",
"arguments": [ {"arg":"geometry","description":"geometry collection"} ],
"examples": [ { "expression":"num_geometries(geom_from_wkt('GEOMETRYCOLLECTION(POINT(0 1), POINT(0 0), POINT(1 0), POINT(1 1))'))'),3))", "returns":"4"}]
}