Skip to content

Commit 2e7a777

Browse files
committed
Update equals and overlay-* expression functions
1 parent 9447079 commit 2e7a777

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/user_manual/expressions/expression_help/GeometryGroup.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ Tests whether two geometries are equal. Note that the order of their vertices ma
747747
* **geometry2** - a geometry
748748
* - Examples
749749
- * ``equals( geom_from_wkt( 'POINT( 0 0 )' ), geom_from_wkt( 'POINT( 0 0 )' ) )`` → TRUE
750+
* ``equals( geom_from_wkt( 'POINT( 0 0 )' ), geom_from_wkt( 'MULTIPOINT( ( 0 0 ) )' ) )`` → FALSE
750751
* ``equals( geom_from_wkt( 'LINESTRING( 0 0, 1 1 )' ), geom_from_wkt( 'LINESTRING( 0 0, 1 1 )' ) )`` → TRUE
751752
* ``equals( geom_from_wkt( 'LINESTRING( 0 0, 1 1 )' ), geom_from_wkt( 'LINESTRING( 1 1, 0 0 )' ) )`` → FALSE
752753
* ``equals( geom_from_wkt( 'POLYGON(( 0 0, 0 1, 1 1, 0 0 ))' ), geom_from_wkt( 'POLYGON(( 0 0, 1 1, 0 1, 0 0 ))' ) )`` → FALSE
@@ -2282,7 +2283,7 @@ Tests whether a geometry overlaps another. Returns TRUE if the geometries share
22822283
overlay_contains
22832284
................
22842285

2285-
Returns whether the current feature spatially contains at least one feature from a target layer, or an array of expression-based results for the features in the target layer contained in the current feature.
2286+
Returns whether the current feature spatially contains at least one feature from a target layer, or returns an array of expression-based results for the features in the target layer contained in the current feature.
22862287

22872288

22882289

@@ -2317,7 +2318,7 @@ Read more on the underlying GEOS "Contains" predicate, as described in PostGIS `
23172318
overlay_crosses
23182319
...............
23192320

2320-
Returns whether the current feature spatially crosses at least one feature from a target layer, or an array of expression-based results for the features in the target layer crossed by the current feature.
2321+
Returns whether the current feature spatially crosses at least one feature from a target layer, or returns an array of expression-based results for the features in the target layer crossed by the current feature.
23212322

23222323

23232324

@@ -2352,7 +2353,7 @@ Read more on the underlying GEOS "Crosses" predicate, as described in PostGIS `S
23522353
overlay_disjoint
23532354
................
23542355

2355-
Returns whether the current feature is spatially disjoint from all the features of a target layer, or an array of expression-based results for the features in the target layer that are disjoint from the current feature.
2356+
Returns whether the current feature is spatially disjoint from all the features of a target layer, or returns an array of expression-based results for the features in the target layer that are disjoint from the current feature.
23562357

23572358

23582359

@@ -2387,7 +2388,7 @@ Read more on the underlying GEOS "Disjoint" predicate, as described in PostGIS `
23872388
overlay_equals
23882389
..............
23892390

2390-
Returns whether the current feature is exactly equal to at least one feature from a target layer, or an array of expression-based results for the features in the target layer that are exactly equal to the current feature. Note that the order of vertices matters.
2391+
Returns whether the current feature's geometry is exactly equal to at least one feature's geometry from a target layer, or returns an array of expression-based results for the features in the target layer whose geometry is exactly equal to the current feature's geometry. Note that the order of vertices matters.
23912392

23922393
.. list-table::
23932394
:widths: 15 85
@@ -2403,13 +2404,15 @@ Returns whether the current feature is exactly equal to at least one feature fro
24032404
* **limit** - an optional integer to limit the number of matching features. If not set, all the matching features will be returned.
24042405
* **cache** - set this to true to build a local spatial index (most of the time, this is unwanted, unless you are working with a particularly slow data provider)
24052406
* - Examples
2406-
- * ``overlay_equals('regions')`` → TRUE if the current feature is exactly equal to a region
2407-
* ``overlay_equals('regions', filter:= population > 10000)`` → TRUE if the current feature is exactly equal to a region with a population greater than 10000
2407+
- * ``overlay_equals('regions')`` → TRUE if the current feature's geometry is exactly the same as the geometry of a region
2408+
* ``overlay_equals('regions', filter:= population > 10000)`` → TRUE if the current feature's geometry is exactly the same as the geometry of a region whose population is greater than 10000
24082409
* ``overlay_equals('regions', name)`` → an array of names, for the regions exactly equal to the current feature
24092410
* ``array_to_string(overlay_equals('regions', name))`` → a string as a comma separated list of names, for the regions exactly equal to the current feature
24102411
* ``array_sort(overlay_equals(layer:='regions', expression:="name", filter:= population > 10000))`` → an ordered array of names, for the regions exactly equal to the current feature and with a population greater than 10000
24112412
* ``overlay_equals(layer:='regions', expression:= geom_to_wkt(@geometry), limit:=2)`` → an array of geometries (in WKT), for up to two regions exactly equal to the current feature
24122413

2414+
.. note:: This function requires exact equality of geometries, meaning that the geometries 'LINESTRING( 0 0, 1 1 )' and 'LINESTRING( 1 1, 0 0 )' are different.
2415+
24132416

24142417
.. end_overlay_equals_section
24152418
@@ -2418,7 +2421,7 @@ Returns whether the current feature is exactly equal to at least one feature fro
24182421
overlay_intersects
24192422
..................
24202423

2421-
Returns whether the current feature spatially intersects at least one feature from a target layer, or an array of expression-based results for the features in the target layer intersected by the current feature.
2424+
Returns whether the current feature spatially intersects at least one feature from a target layer, or returns an array of expression-based results for the features in the target layer intersected by the current feature.
24222425

24232426

24242427

@@ -2468,7 +2471,7 @@ Read more on the underlying GEOS "Intersects" predicate, as described in PostGIS
24682471
overlay_nearest
24692472
...............
24702473

2471-
Returns whether the current feature has feature(s) from a target layer within a given distance, or an array of expression-based results for the features in the target layer within a distance from the current feature.
2474+
Returns whether the current feature has feature(s) from a target layer within a given distance, or returns an array of expression-based results for the features in the target layer within a distance from the current feature.
24722475

24732476

24742477

@@ -2505,7 +2508,7 @@ Note: This function can be slow and consume a lot of memory for large layers.
25052508
overlay_touches
25062509
...............
25072510

2508-
Returns whether the current feature spatially touches at least one feature from a target layer, or an array of expression-based results for the features in the target layer touched by the current feature.
2511+
Returns whether the current feature spatially touches at least one feature from a target layer, or returns an array of expression-based results for the features in the target layer touched by the current feature.
25092512

25102513

25112514

0 commit comments

Comments
 (0)