QGIS/resources/function_help/json/collect_geometries
Nyall Dawson 36173d7c40 [FEATURE] New expression function "collect_geometries"
Collects a set of geometries into a multi-part geometry object.
Geometry parts can either be specified as seperate arguments to the
function, or (more flexibly), as an array of geometry parts.

This allows geometries to be generated using iterator based approaches,
such as transforming an array generated using generate_series, e.g:

  collect_geometries(
    array_foreach(
      generate_series( 0, 330, 30),
      project($geometry, .2, radians(@element))
    )
  )

Gives a nice radial effect of points surrounding the central feature
point when used as a MultiPoint geometry generator
2019-08-29 19:33:43 +10:00

20 lines
1.1 KiB
Plaintext

{
"name": "collect_geometries",
"type": "function",
"description": "Collects a set of geometries into a multi-part geometry object.",
"variants": [
{ "variant": "List of arguments variant",
"variant_description": "Geometry parts are specified as seperate arguments to the function.",
"variableLenArguments": true,
"arguments": [ {"arg":"geometry1", "syntaxOnly": true},
{"arg":"geometry2", "syntaxOnly": true},
{"arg":"geometry", "descOnly": true, "description":"a geometry"}],
"examples": [ { "expression":"geom_to_wkt(collect_geometries(make_point(1,2), make_point(3,4), make_point(5,6)))", "returns":"'MultiPoint ((1 2),(3 4),(5 6))'"} ] },
{
"variant": "Array variant",
"variant_description": "Geometry parts are specified as an array of geometry parts.",
"arguments": [ {"arg":"array","description":"array of geometry objects"}],
"examples": [ { "expression":"geom_to_wkt(collect_geometries(array(make_point(1,2), make_point(3,4), make_point(5,6))))", "returns":"'MultiPoint ((1 2),(3 4),(5 6))'"} ]
}]
}