data("routes_fast")
proj4string(routes_fast) <- CRS("+init=epsg:4326")
new_crs <- crs_select_aeq(routes_fast)
plot(routes_fast)
rf_projected <- spTransform(routes_fast, new_crs)
plot(rf_projected)
bbox(rf_projected)
line_length <- rgeos::gLength(rf_projected, byid = TRUE)
plot(line_length, rf_projected$length)
cor(line_length, rf_projected$length)
Run the code above in your browser using DataLab