Is there a tool to join by interest and then for those that are not joined, join by nearest - all in one calculation? If not, maybe this is a valid feature request, to combine these two tools together instead of having to run then separately?
-
2isn't an intersecting feature also the nearest one?– JGHMar 22, 2022 at 21:00
-
That was my thought also. The intersection is somewhat redundant, unless a one-to-many relationship is desired.– MattMar 22, 2022 at 21:05
-
Apologies for lack in clarification with the software; was thinking of QGIS. @JGH - wasn't aware of that "Intersecting feature also the nearest one".– dudeastronautMar 25, 2022 at 12:05
1 Answer
I do not think there are direct tool. However there are approaches that solve this.
there are 2 approaches:
- utilise model builder in ArcGIS or QGIS, create your own tool, use the if conditional and everything. It is a GUI drag and drop algorithm builder and it is quite intuitive as long as you have those process back in mind.
- use python Geopandas, define the interest in a function (by distance? intersect? touches? etc...), and use spatial join by nearest.
-
this is great, I actually never knew about the model builder. The alternative with Python is also a great answer, thank you! Mar 25, 2022 at 12:06