Looking for a way to run GeoDataFrame.sjoin()
with more than one predicate.
For example, on QGIS' "Join by location" tool, there is a check box of predicates to mark as needed.
When trying to run predicates as a list :
my_sjoin = gdf_1.sjoin(gdf_2, predicate=['within', 'intersects'])
The function wont accept a list:
"TypeError: unhashable type: 'list' "
Best Answer
As I understand it, intersects will also find the withins:
Returns True if the boundary or interior of the object intersect in any way with those of the other.
Which looks correct, A is completely within a grid cell:
Otherwise you would chain the joins, first one predicate/op, then the other