I have two GeoPandas DataFrames:
- points (long,lat) : 60,000 rows
- Jams segment (LineStrings) : 204,000 rows
I am trying to create a new DataFrame with the points that are located on LineStrings.
I tried using a buffer on the LineStrings and the predicate: contains,intersect but it didn't succeed
len(gdfTraffic_df)
201053
len(gdfAlerts_df)
58844
gdfTraffic_df.buffer(0.1)
merged = gdfTraffic_df.sjoin(gdfAlerts_df, predicate="contains")
len(merged)
474646
Something is not going as expected with the action of spatial join. Any ideas how to solve the problem?