Search code examples
pythongeospatialgeopandas

trying to merge 2 GeoDataFrames with sjoin and ran for infinity


I have 2 geopandas dataframe

gdfTraffic_df - contains polygon in geometry column num of rows = 1,916,560

enter image description here

gdfAlerts_df - contains point in geometry column num of rows = 632,259

enter image description here

im trying to merge the 2 geodataframe to a new df that give me the rows only with the polygon that contains point i execute this code

merged = gdfTraffic_df.sjoin(gdf, predicate="contains")

unfortunately it looks like its never stop runing

merged = gdfTraffic_df.sjoin(gdf, predicate="contains")

expected to get new df that contains df with polygon and the points he contains


Solution

  • i solved it for anyone who will meet it in future i devied it to weeks and did the action on small group of dates and it worked ! thanx