Experimental
Join attributes from one vector layer to another based on spatial relationship. Uses spatial indexing for efficient processing.
vector join spatial
| Name | Description | Required | Default |
|---|---|---|---|
target | Target layer receiving joined attributes. | Required | target.shp |
join | Join layer providing attributes. | Required | join.shp |
predicate | Spatial predicate: intersects, within, contains, touches, crosses, overlaps, within_distance. | Required | intersects |
distance | Distance threshold for within_distance predicate. | Optional | — |
strategy | Join strategy: first, last, count, sum, mean, min, max. | Optional | first |
prefix | Prefix for joined field names (default JOIN_). | Optional | JOIN_ |
output | Output vector path. | Required | — |
Transfers join-layer attributes where geometries intersect.
wbe.spatial_join(join='join.shp', output='spatial_join.shp', predicate='intersects', prefix='JOIN_', strategy='first', target='target.shp')