I have a shape file of the road network of the UK. I also have the lat-longs of a GPS tracking device connected to a vehicle. I can convert the GPS lat-longs to a SpatialLine for each trip. There are however some erroneous data points in the GPS tracking device. Each consecutive lat-long pair is about 2 minutes apart from each other. When plotting the lat-longs on a map, it is quite easy to notice the "erroneous" points visually. Is there a way to do this programmatically by assessing the intersection of created spatial line vs the road network shape-file? I.e. is there a function within any of the R packages that will be able to assess this given that we know that the points should roughly follow the shape of the road?
I know of gInterserct
, but I am not just looking for a true or false... result...i am trying to work out which points from a series of points are "erroneous"...