-
Notifications
You must be signed in to change notification settings - Fork 7
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
add wk_trans_explicit() #187
Conversation
questions/discussion
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This is looking good!
worry about leaving objects in a bad state (e.g. not updating the crs)
I think wk_transform()
takes care of this and strips the CRS for anything it returns. You could always add a test of wk_coords(wkt("POINT (0 1)", crs = "EPSG:1234")) <- xy(1, 2)
to find out.
it can actually be any handleable with the same coordinate structure
It seems like any non-point replacement will fail at as_xy()
?
unsure how to structure the doc, getting code/doc order mismatch in wk_coords ...
I think it's because both wk_trans_explicit()
and wk_coords()
define value
. You could try removing @param value
from wk_coords()
or if that doesn't work, rename value
in wk_trans_explicit()
?
thanks! I'm getting back to this |
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
Co-authored-by: Dewey Dunnington <dewey@dunnington.ca>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #187 +/- ##
========================================
Coverage 99.03% 99.03%
========================================
Files 81 85 +4
Lines 5918 6035 +117
========================================
+ Hits 5861 5977 +116
- Misses 57 58 +1
☔ View full report in Codecov by Sentry. |
Merge branch 'trans-explicit' of https://github.com/mdsumner/wk into trans-explicit # Conflicts: # tests/testthat/test-transform.R
I got it! as explained in https://adv-r.hadley.nz/functions.html#replacement-functions it has to be |
Thank you for taking this on and polishing! I'm on vacation with a 2 and 3 year old and will take a close look + merge when I'm back! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took me so long to get to! I did a few minor shuffles but the code looks great!
as advised in #185 this migrates the base part of trans_explicit from crs2crs
wk_coords()<-
(it's actually amazing, I think I was confused about what it did in previous times)