I have many vehicles GPS data points, which consist of "timestamp, longitude, latitude, fuel consumption and distance" and the data is OSM(open street map) based. I want to match the data points to OSM, divide it by road type, so that I could get road type specific data in groups (e.g, highway group, local roadway group). Then I could calculate the fuel efficiency corresponding to different road type.
I'm wondering if R has any packages could handle this type of task?
snapPointsToLines()from the maptools package useful. Have a look at this post: http://geotux.tuxfamily.org/index.php/en/component/k2/item/296-snapping-points-to-lines-in-rsnapPointsToLines()allows you to get the line id each point lies on. Then you could query a specific line attribute using the line id. – Germán Carrillo Dec 20 '15 at 12:57