Skip to content
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

test against sf classes #84

Open
dcooley opened this issue May 13, 2020 · 0 comments
Open

test against sf classes #84

dcooley opened this issue May 13, 2020 · 0 comments

Comments

@dcooley
Copy link
Owner

dcooley commented May 13, 2020

I think you can stick

remotes::install_github("r-spatial/sf")

Before or after this (I forget which is more likely to work): https://github.com/dcooley/sfheaders/blob/master/.github/workflows/R-CMD-check.yaml#L68 ...in a copy of your R-CMD-check.yaml file.

If you're going return an object of class sf or sfc_*, you should probably expect_identical() your output with that of sf...they're sf's objects.

If there is an in-memory structure that's faster to create (from a data frame or otherwise), you could give it another class ("sfheaders"?) and implement st_as_sfc()/st_as_sf() using sf's constructors. You can dynamically register those methods to avoid requiring sf in Imports (see here: https://github.com/paleolimbot/geovctrs/blob/master/R/zzz.R#L21 ).

Originally posted by @paleolimbot in #49 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant