I'm trying to spatially join smaller polygons that make up larger polygons/multipolygons using GeoPandas and the code below.
joined_gdf = gpd.sjoin(sua_2016_gdf, sa2_2021_gdf, how="left", predicate="intersects")
The sua_2016_gdf
file is of my larger polygon boundaries and sa2_2021_gdf
contains the smaller ones. The sa2 boundaries when combined will share a boundary with the sua ones.
I tried all the different predicate types (intersects
, contains
, within
, touches
, crosses
, overlaps
) but unfortunately the best I could manage was with intersects
, which provided all the smaller polygons within, as well as all the smaller polygons touching the border outside, the larger polygon/multipolygon.
Is there a way I can strip out the smaller polygons that only touch the outside of the larger polygon's border so that only the polygons within remain?