-
Notifications
You must be signed in to change notification settings - Fork 299
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_as_sf should mention what column it used as geometry #255
Comments
adds a parameter to st_sf, "sf_column_name" to specify the column with the simple feature geometries to consider "active", in case there are multiple of such columns.
I think this issue is mostly resolved, however the warning still feels weirder now that # test multiple geom columns
library(sf)
library(tidyverse)
#> lag(): dplyr, stats
nc <- st_read(system.file("shape/nc.shp", package="sf"), "nc", crs = 4267, quiet = TRUE)
nc <- nc %>%
mutate(geog = st_transform(geometry, 4326))
#> Warning in st_sf(x, ..., agr = agr): more than one geometry column: taking
#> `geometry'; use `sf_column_name=' to specify a different column. Also not clear to me what |
What did you expect to be the active geometry of The warning message reveals from which function it was called, did you look up its docs? |
It's true that If the universal |
When it guesses the geometry column, I think the message could be more precise by mentionning the name of the column it picked.
I suggest something like:
The text was updated successfully, but these errors were encountered: