Skip to main content
Hi All,  i have a city wide road centreline shpfile and i have gps trail data gathered by buses. I need to select the roads that the gps trails on them. IE the bus routes.

 

 

I have tried a range of options. Select within roads within x of the gps trail, but this selects side roads that buses dont travel down. 

 

 

I have tried selecting any road that the gps trail intersects with but again the side road problem defeats me. 

 

 

I have tried the Anchor Snapper but all my records passed thru unsnapped?

 

 

Does anyone have any suggestions that im missing ?I was thinking about some conviluted approach using the angle of the intersection. if its > x then its a side road ?

 

 

Many Thanks Steve
Hi,

 

 

this is a rather common but unfortunately not always an easy task.

 

 

One approach might be to buffer the roads, intersect the GPS trails using a SpatialRelator and then iterating over the related candidates and selecting the GPS section with the longest overlap in each buffer (road) zone.

 

 

The AnchoredSnapper might be a good idea and should work, but just remember to make sure that all the features are tagged and projected to the same coordinate system.

 

 

David
The key thing is to only ever give the AnchoredSnapper what you actually want to allow snapping to, so dealing with that challenge is the first step. You need a mechanism to select out the appropriate roads.

 

 

When it comes to snapping I'd recommend using the Densifier to add node density to the roads so that the points snap as close to the perpendicular as possible.

 

 

Thinking about this some more, have you tried joining the trail points to create bus routes? Use the PointConnector and join in the order of the timestamp, use a connection break attribute such as the bus service name/number. Then try to snap the route itself to the road centreline.

Reply