I have a geodataframe with 8000 rows based on the joining and intersection of two geodataframes. One contains 8000 points and the other 12 polygons. See below the code used to join these two geodataframes; this gives the desired result.
I then use dissolve() to dissolve and sum the rows based on the the previous sjoin. This also gives the required result but the run time is extremely long and this process needs to be carried out on different intersections. Is there a way to speed up this process?
#intersection
df_join = df_points.sjoin(df_polygons[['name', 'geometry']],
how= 'right',
predicate='intersects'
)
#dissolving polygons
df_dissovle = df_join.dissolve(by= 'name',
aggfunc= 'sum',
as_index= False
)