Two-layer operations · One-layer operations · Which geometry each takes
The two inputs
The first layer is five Natural Earth countries, each carrying a name and a pop_est. The second is one rectangle called rectangle, carrying a name and a note.
The rectangle is placed deliberately: it contains Ireland completely, cuts the United Kingdom, and never reaches the Netherlands, Belgium or France. So every spatial test below has a visible yes and a visible no in one picture.
| name | eu | pop_est |
|---|---|---|
| United Kingdom | no | 64769452 |
| Ireland | yes | 5011102 |
| Netherlands | yes | 17084719 |
| Belgium | yes | 11491346 |
| France | yes | 67106161 |
| name | note |
|---|---|
| rectangle | study area |
Both layers have a name. Where an operation carries both layers' attributes into one table, the second layer's colliding field is suffixed: name from the countries, name_2 from the rectangle. A field that does not collide — note — keeps its own name.
Clip
Keeps the parts of the countries that fall inside the rectangle. One country stays one feature, and only the countries’ own attributes come through.
Result attributes: name eu pop_est
| name | eu | pop_est |
|---|---|---|
| United Kingdom | no | 64769452 |
| Ireland | yes | 5011102 |
Erase
The opposite of clip: everything the rectangle covers is cut away. Ireland disappears entirely, because the rectangle contains all of it.
Result attributes: name eu pop_est
| name | eu | pop_est |
|---|---|---|
| United Kingdom | no | 64769452 |
| Netherlands | yes | 17084719 |
| Belgium | yes | 11491346 |
| France | yes | 67106161 |
Intersect
The same geometry as clip, but one feature per overlapping pair — and the rectangle’s attributes travel with it. Its name collides with the countries’ name, so it arrives as name_2.
Result attributes: name eu pop_est name_2 note
| name | eu | pop_est | name_2 | note |
|---|---|---|---|---|
| United Kingdom | no | 64769452 | rectangle | study area |
| Ireland | yes | 5011102 | rectangle | study area |
Union (overlay)
Every piece of both layers: the overlap, the countries outside the rectangle, and the rectangle outside the countries. part says which of the three a feature is, and a piece with no counterpart has NULL where the other layer’s fields would be.
Result attributes: name eu pop_est name_2 note part
| name | eu | pop_est | name_2 | note | part |
|---|---|---|---|---|---|
| United Kingdom | no | 64769452 | rectangle | study area | both |
| Ireland | yes | 5011102 | rectangle | study area | both |
| United Kingdom | no | 64769452 | NULL | NULL | first |
| Netherlands | yes | 17084719 | NULL | NULL | first |
| Belgium | yes | 11491346 | NULL | NULL | first |
| France | yes | 67106161 | NULL | NULL | first |
| NULL | NULL | NULL | rectangle | study area | second |
Select by location — touch or overlap
Keeps whole features that touch the rectangle at all. Geometry is untouched — this filters, it does not cut.
Result attributes: name eu pop_est
| name | eu | pop_est |
|---|---|---|
| United Kingdom | no | 64769452 |
| Ireland | yes | 5011102 |
Select by location — lie completely inside
Stricter: only Ireland qualifies, because the United Kingdom sticks out of the rectangle.
Result attributes: name eu pop_est
| name | eu | pop_est |
|---|---|---|
| Ireland | yes | 5011102 |
Select by location — do not touch
The negation: the three mainland countries, which the rectangle never reaches.
Result attributes: name eu pop_est
| name | eu | pop_est |
|---|---|---|
| Netherlands | yes | 17084719 |
| Belgium | yes | 11491346 |
| France | yes | 67106161 |
Spatial join — touches or overlaps
Every country keeps its own geometry and gains the rectangle’s attributes where the two meet. Countries that do not meet it keep their geometry and get nothing.
Result attributes: name eu pop_est name_2 note
| name | eu | pop_est | name_2 | note |
|---|---|---|---|---|
| United Kingdom | no | 64769452 | rectangle | study area |
| Ireland | yes | 5011102 | rectangle | study area |
| Netherlands | yes | 17084719 | NULL | NULL |
| Belgium | yes | 11491346 | NULL | NULL |
| France | yes | 67106161 | NULL | NULL |
Spatial join — lies inside
Only a country that lies entirely within the rectangle picks up its attributes.
Result attributes: name eu pop_est name_2 note
| name | eu | pop_est | name_2 | note |
|---|---|---|---|---|
| United Kingdom | no | 64769452 | NULL | NULL |
| Ireland | yes | 5011102 | rectangle | study area |
| Netherlands | yes | 17084719 | NULL | NULL |
| Belgium | yes | 11491346 | NULL | NULL |
| France | yes | 67106161 | NULL | NULL |
Spatial join — contains
The mirror image: the country would have to contain the rectangle. None does, so nothing is matched — the same layer back, with empty columns.
Result attributes: name eu pop_est name_2 note
| name | eu | pop_est | name_2 | note |
|---|---|---|---|---|
| United Kingdom | no | 64769452 | NULL | NULL |
| Ireland | yes | 5011102 | NULL | NULL |
| Netherlands | yes | 17084719 | NULL | NULL |
| Belgium | yes | 11491346 | NULL | NULL |
| France | yes | 67106161 | NULL | NULL |