Spatial Join
spatial_joinPerform spatial joins by location, matching features based on intersects, contains, touches, and more. Control matching with one-to-many, first match, or largest overlap methods.
Instructions
Join attributes by location (native:joinattributesbylocation). predicates int list: 0=intersects 1=contains 2=equals 3=touches 4=overlaps 5=within 6=crosses (default [0]). method: 0=one-to-many 1=first match (default) 2=largest overlap. First match keeps one arbitrary match per target feature and drops the others; use 0 when several can match. join_fields = copied columns (default all). No output_path = in-memory layer. Returns joined_count (target features that found a match, whatever the method) next to target_features. warnings/warning_count report features QGIS skipped, e.g. invalid geometries under the Processing setting that skips them; fix them first (native:fixgeometries) or those features never match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | ||
| prefix | No | ||
| join_layer | Yes | ||
| predicates | No | ||
| join_fields | No | ||
| output_path | No | ||
| target_layer | Yes |