-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st_length #30
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There may be an error with the 'meters' column of bike boulevard.
{r}
bart_lines$len_mi <- units::set_units(st_length(bart_lines), mi)
bart_lines$len_km <- units::set_units(st_length(bart_lines), km)
bart_lines$len_m <- units::set_units(st_length(bart_lines), m)
bart_lines$len_m <- units::set_units(st_length(bart_lines), m)
head(bart_lines)
When you calculate the lengths by transforming to various CRS'
bart_lines$len_NAD83 <- units::set_units(st_length(st_transform(bart_lines,26910)), m)
bart_lines$len_WebMarc <- units::set_units(st_length(st_transform(bart_lines,3857)), m)
bart_lines$len_WGS84 <- units::set_units(st_length(st_transform(bart_lines,4326)), m)
you see that Web Marc outputs the closest length to the 'meters' column. The transformation to WGS84 is redundant and was done just to verify how the st_length function is working. So in theory both these outputs should be the same as the 'meters' column.
Caused some confusion during the workshop.
The text was updated successfully, but these errors were encountered: