Skip to content

Commit

Permalink
Merge pull request #40093 from DelazJ/geomOverlayAsList
Browse files Browse the repository at this point in the history
Add a string output for overlay-* functions
  • Loading branch information
m-kuhn committed Nov 17, 2020
2 parents aeb9463 + 9ac32de commit 9708edb
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 2 deletions.
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_contains
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_contains('regions', name)",
"returns": "an array of names, for the regions contained in the current feature"
},
{
"expression": "array_to_string(overlay_contains('regions', name))",
"returns": "a string as a comma separated list of names, for the regions contained in the current feature"
},
{
"expression": "array_sort(overlay_contains(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions contained in the current feature and with a population greater than 10000"
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_crosses
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_crosses('regions', name)",
"returns": "an array of names, for the regions crossed by the current feature"
},
{
"expression": "array_to_string(overlay_crosses('regions', name))",
"returns": "a string as a comma separated list of names, for the regions crossed by the current feature"
},
{
"expression": "array_sort(overlay_crosses(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions crossed by the current feature and with a population greater than 10000"
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_disjoint
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_disjoint('regions', name)",
"returns": "an array of names, for the regions spatially disjoint from the current feature"
},
{
"expression": "array_to_string(overlay_disjoint('regions', name))",
"returns": "a string as a comma separated list of names, for the regions spatially disjoint from the current feature"
},
{
"expression": "array_sort(overlay_disjoint(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions spatially disjoint from the current feature and with a population greater than 10000"
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_equals
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_equals('regions', name)",
"returns": "an array of names, for the regions spatially equal to the current feature"
},
{
"expression": "array_to_string(overlay_equals('regions', name))",
"returns": "a string as a comma separated list of names, for the regions spatially equal to the current feature"
},
{
"expression": "array_sort(overlay_equals(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions spatially equal to the current feature and with a population greater than 10000"
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_intersects
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_intersects('regions', name)",
"returns": "an array of names, for the regions intersected by the current feature"
},
{
"expression": "array_to_string(overlay_intersects('regions', name))",
"returns": "a string as a comma separated list of names, for the regions intersected by the current feature"
},
{
"expression": "array_sort(overlay_intersects(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions intersected by the current feature and with a population greater than 10000"
Expand Down
8 changes: 6 additions & 2 deletions resources/function_help/json/overlay_nearest
Expand Up @@ -47,11 +47,15 @@
},
{
"expression": "overlay_nearest('airports', name)",
"returns": "the name of the closest airport to the current feature"
"returns": "the name of the closest airport to the current feature, as an array"
},
{
"expression": "array_to_string(overlay_nearest('airports', name))",
"returns": "the name of the closest airport to the current feature, as a string"
},
{
"expression": "overlay_nearest(layer:='airports', expression:= name, max_distance:= 5000)",
"returns": "the name of the closest airport within a distance of 5000 map units from the current feature"
"returns": "the name of the closest airport within a distance of 5000 map units from the current feature, as an array"
},
{
"expression": "overlay_nearest(layer:='airports', expression:=\"name\", filter:= \"Use\"='Civilian', limit:=3)",
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_touches
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_touches('regions', name)",
"returns": "an array of names, for the regions touched by the current feature"
},
{
"expression": "string_to_array(overlay_touches('regions', name))",
"returns": "a string as a comma separated list of names, for the regions touched by the current feature"
},
{
"expression": "array_sort(overlay_touches(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions touched by the current feature and with a population greater than 10000"
Expand Down
4 changes: 4 additions & 0 deletions resources/function_help/json/overlay_within
Expand Up @@ -43,6 +43,10 @@
"expression": "overlay_within('regions', name)",
"returns": "an array of names, for the regions containing the current feature"
},
{
"expression": "array_to_string(overlay_within('regions', name))",
"returns": "a string as a comma separated list of names, for the regions containing the current feature"
},
{
"expression": "array_sort(overlay_within(layer:='regions', expression:=\"name\", filter:= population > 10000))",
"returns": "an ordered array of names, for the regions containing the current feature and with a population greater than 10000"
Expand Down

0 comments on commit 9708edb

Please sign in to comment.