-
Notifications
You must be signed in to change notification settings - Fork 285
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
Set CRS in a pipe - idea #64
Comments
This works:
|
Yes, I know - but this way is very unintuitive. I think there will be a large number of people using sf functions in pipes. For example just to read data:
|
We also don't want to break type stability as discussed here. I added
|
Looks great - thanks! |
No, this is really not OK:
Note:
so the pipeline makes it really easy to ignore the fact that the input shapefile has a CRS, which is correct because it is pre-WGS84, and imposing WGS84 is a major blunder. In a pipeline this should hard-fail by default, and only be permitted if an override is set actively. This is hard to do without option setting in a set method which typically only takes the opbject and value. Where is st_set_crs() defined? Is it autogenerated, it isn't in any file in R/? By the way, EPSG-guessing is not going to work - the OGR SRS mostly fails miserably. |
Hence the warning -- the "correct" example in this case would be
where, obviously, the
EPSG guessing is only implemented for 4326, or if |
Just picked up changed
|
Think of the first argument of a function following
|
Below you can find my broad idea how it should work. Basically, I think there should be a function to set a crs in a pipe, such as st_crs(sf_object, crs).
The text was updated successfully, but these errors were encountered: