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 fails on Solaris #190

Closed
loreabad6 opened this issue Dec 1, 2021 · 5 comments
Closed

Test fails on Solaris #190

loreabad6 opened this issue Dec 1, 2021 · 5 comments
Assignees
Labels
testing ✅ Related to testing tasks

Comments

@loreabad6
Copy link
Collaborator

Tests that have to do with projections and transformations fail for older versions of GDAL and PROJ. This is the case for Solaris.
The reason is that our roxel data object was created with newer versions of these software and hence older version do not recognize the associated CRS.

See related CRAN-ERROR outputs here

The solution seems to be to reassign the CRS as explained here.

@luukvdmeer
Copy link
Owner

@loreabad6 How should we proceed now it seems CRAN does not check for Solaris anymore?

@loreabad6
Copy link
Collaborator Author

I see two options here:

  1. We can either include the line that reassigns the CRS on every test and example, assuming that although not on Solaris, people might still have older versions of GDAL and PROJ
  2. We take no action but do include in the ?sfnetworks::roxel page a note that the CRS should be reassigned for older PROJ versions, as proposed here.

I am happier with the second option.

@agila5
Copy link
Collaborator

agila5 commented Dec 4, 2021

I also vote for the second option since it's much simpler than changing all tests. Moreover, when I faced similar problems in osmextract, I added an if clause into .onAttach printing a message in case PROJ/GDAL versions were too old: https://github.com/ropensci/osmextract/blob/7b29afcbe08a47b69e07f49944d6bdd9b05bcffb/R/zzz.R#L13-L23 If you like the idea, I can add a PR also here (something like, It seems that you are using an old version of PROJ. If you use the roxel dataset, please remember to reassign its CRS, i.e. sf::st_crs(roxel) = sf::st_crs("EPSG:4326"), before running any example.

@loreabad6
Copy link
Collaborator Author

This is actually great @agila5 and sounds like the best solution! A PR here with those lines would be great!

@loreabad6
Copy link
Collaborator Author

Thank you @agila5 for the startup message. Closing this issue for now.

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

Successfully merging a pull request may close this issue.

3 participants