Spatial join
Adds the fields of features in one layer to features of another, matching by a spatial relationship.
Pitfall. A feature matching several features on the other side becomes several rows unless the engine aggregates them.
Pitfall. Features that share only a boundary count as intersecting.
| Also called | Join attributes by location, sjoin, location join |
|---|---|
| Group | vector/join |
| Checks | crs.agreement, join.unmatched, join.many_to_many |
| Pitfalls | 2 listed above |
| Columbus tool | vector_op · spatial_join |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
| Name | Type | Required | Default | Values | Note |
|---|---|---|---|---|---|
predicate | enum | no | intersects | intersects, within, contains, touches, crosses, overlaps | Not stated |
how | enum | no | left | left, inner | Not stated |
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | left | vector | Not stated | Not stated |
| Input | right | vector | Not stated | Not stated |
| Output | output | vector | Not stated | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
dask-geopandas | dask_geopandas.sjoin |
|
|
geopandas | geopandas.sjoin |
|
|
qgis | native:joinattributesbylocation |
|
Preset: {"METHOD":0} |
sf | sf::st_join |
| None noted |