-
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
Patch wk_crs_projjson for GDAL < 3.1 #214
base: master
Are you sure you want to change the base?
Patch wk_crs_projjson for GDAL < 3.1 #214
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #214 +/- ##
==========================================
+ Coverage 98.85% 98.87% +0.01%
==========================================
Files 85 85
Lines 6208 6208
==========================================
+ Hits 6137 6138 +1
+ Misses 71 70 -1 ☔ View full report in Codecov by Sentry. |
Ok that doesn't quite work. {sf} is inserting a |
Good catch that GDAL <3.1 is the problem though...I'll take a closer look soon! |
This could actually be an {sf} bug and NA_STRING should be wrapped in All my attempts to test for this value in R failed. We could create a C util to test for NA_STRING, but not sure we should. |
It should definitely be fixed in sf (but if it's not too much trouble to fix we should do it here, too). |
Ok. The only workable solution I could come up with required a bit of C to use for the is.na() test. SEXP wk_c_is_na_string(SEXP x) {
return Rf_ScalarLogical(TYPEOF(x) == CHARSXP && x == NA_STRING);
} |
Fixes
wk_crs_projjson()
forcrs
objects when GDAL < 3.1.Closes #212