QGIS/resources/function_help/json/nodes_to_points
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

10 lines
793 B
Plaintext

{
"name": "nodes_to_points",
"type": "function",
"description": "Returns a multipoint geometry consisting of every node in the input geometry.",
"arguments": [ {"arg":"geometry","description":"geometry object"},
{"arg":"ignore_closing_nodes","description":"optional argument specifying whether to include duplicate nodes which close lines or polygons rings. Defaults to false, set to true to avoid including these duplicate nodes in the output collection."} ],
"examples": [ { "expression":"geom_to_wkt(nodes_to_points(geom_from_wkt('LINESTRING(0 0, 1 1, 2 2)')))", "returns":"'MultiPoint ((0 0),(1 1),(2 2))'"},
{ "expression":"geom_to_wkt(nodes_to_points(geom_from_wkt('POLYGON((-1 -1, 4 0, 4 2, 0 2, -1 -1))'),true))", "returns":"'MultiPoint ((-1 -1),(4 0),(4 2),(0 2))'"}]
}