I need to use the roads to compare GPS positions to verify that they are no errors in the data.
I downloaded the map.osm from a site that have information of City of Rome and had it transformed to Spatial Lines in R.
src <- osmsource_file(file = "rome.osm") bb <- center_bbox(41.9, 12.3, 1000, 1000) rome <- get_osm(bb, src) ways <- find(rome, way(tags(k == "highway"))) ways <- find_down(rome, way(ways)) ways <- subset(rome, ids = ways) hw_lines <- as_sp(ways, "lines")
So with the Spatial Lines Object I tried to use distm function but It's accused that the spatial object can't be used (not is in a suitable format).
There is another way using OSM to get information of only roads that I can compare with GPS data in R?