Matching / Joining SpatialPoints with SpatialLines using R
问题 Question I have a set of shapefiles for different Bus Routes (Each route has 2 Trips) for Cairo. I wanted to check if they pass by certain stations using R: Stops_Data <- readOGR("Stackoverflow Data/","Stops_Data") Trips_Data <- readOGR("Stackoverflow Data/","Trips_Data") plot(Trips_Data) points(Stops_Data, col = "red") I try to match them using over(). First, I make sure the Projections are identical. proj4string(Trips_Data) <- proj4string(Stops_Data) over(Stops_Data, Trips_Data) This only