luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
338 stars 20 forks source link

Add packageStartupMessage related to problems with old PROJ + new CRS #193

Closed agila5 closed 2 years ago

agila5 commented 2 years ago

See discussion in #190.

Output from my (old) VM:

sf::sf_extSoftVersion()
#>           GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>        "3.7.1"        "2.4.2"        "5.2.0"         "true"        "false"
library(sfnetworks)
#> Warning: It seems that you are using an old version of PROJ. If you use the built-in roxel dataset, please remember to reassign its CRS, i.e. sf::st_crs(roxel) = sf::st_crs("EPSG:4326"), before running any example.

Created on 2021-12-05 by the reprex package (v2.0.0)

Fell free to change the message

agila5 commented 2 years ago

Just one question: are you sure that we should test against PROJ v7? Since the checks have passed without any problem but the "testthat output" in GHA shows the "warning" message for old PROJ.

btw: I'm not really sure we should use the word "warning" in that message since it might be confusing. Feel free to remove that.

loreabad6 commented 2 years ago

I don't think PROJ v7 is necessarily required. old PROJ should be fine!

agila5 commented 2 years ago

I changed the default version to PROJ v6.0.0 instead of v7.0.0. I'm not sure about all the details but, IMO, when I read the discussion in the sf repo it looks like there are problems with PROJ < 6 and GDAL < 3. Moreover, the NEWS.md file of GDAL says:

GDAL/OGR 3.0.0 Release Notes

In a nutshell...

Finally, from the GHA, it looks like the tests are ok and no warning message is raised when running library(sfnetworks).