mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
16 lines
1.0 KiB
Plaintext
16 lines
1.0 KiB
Plaintext
{
|
|
"name": "geometries_to_array",
|
|
"type": "function",
|
|
"groups": ["Arrays"],
|
|
"description": "Splits a geometry into simpler geometries in an array.",
|
|
"arguments": [{
|
|
"arg": "geometry",
|
|
"description": "the input geometry"
|
|
}],
|
|
"examples": [{ "expression":"geometries_to_array(geom_from_wkt('MultiPoint (1 2, 5 21)'))", "returns":"An array containing 'Point (1 2)' and 'Point (5 21)'"},
|
|
{ "expression":"geometries_to_array(geom_from_wkt('GeometryCollection (Polygon ((5 8, 4 1, 3 2, 5 8)),LineString (3 2, 4 2))'))", "returns":"an array of a polygon and a line geometries"},
|
|
{ "expression":"geom_to_wkt(geometries_to_array(geom_from_wkt('GeometryCollection (Polygon ((5 8, 4 1, 3 2, 5 8)),LineString (3 2, 4 2))'))[0])", "returns":"'Polygon ((5 8, 4 1, 3 2, 5 8))'"},
|
|
{ "expression":"geometries_to_array(geom_from_wkt('MULTIPOLYGON(((5 5,0 0,0 10,5 5)),((5 5,10 10,10 0,5 5))'))", "returns":"an array of two polygon geometries"}],
|
|
"tags": [ "split", "convert", "separate", "collection", "multi", "part" ]
|
|
}
|