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

Revdep error (sf 1.0.16, GDAL 3.9.0 beta1, R 4.4.0) #291

Closed
rsbivand opened this issue Apr 25, 2024 · 8 comments
Closed

Revdep error (sf 1.0.16, GDAL 3.9.0 beta1, R 4.4.0) #291

rsbivand opened this issue Apr 25, 2024 · 8 comments

Comments

@rsbivand
Copy link

There is an error detected when running revdeps on sf and terra for the forthcoming GDAL 3.9.0 for R CMD check on this package:
00check.log.

Stepping through the vignette code, I see:

Warning message:
In CPL_gdalvectortranslate(source, destination, options, oo, doo,  :
  GDAL Error 1: Field ' highway' not found in source layer.

then:

Error in sf::gdal_utils(util = "vectortranslate", source = normalizePath(file_path),  : 
  gdal_utils vectortranslate: an error occured

Is this the GDAL version, has something changed internally, or is highway actually absent?

@Robinlovelace
Copy link
Member

Thanks for the report Roger. Not sure what's going on... Thoughts Andrea?

@edzer
Copy link

edzer commented Apr 25, 2024

Unless this is a copy & paste error, the space in ' highway' looks suspicious.

@rsbivand
Copy link
Author

rsbivand commented Apr 25, 2024

The error is triggered at:

its_leeds = oe_get("ITS Leeds", vectortranslate_options = my_vectortranslate, quiet = FALSE)
, with the options set in the chunk above, and eventually appears from:
sf::gdal_utils(
after a fair number of steps.

@edzer
Copy link

edzer commented Apr 25, 2024

Removing the space before highway here:

"-select", "osm_id, highway",

resolves the vignette error.

@agila5 agila5 closed this as completed in 43f342e Apr 25, 2024
@agila5
Copy link
Collaborator

agila5 commented Apr 25, 2024

Thank you very much @rsbivand and @edzer for raising this issue and diagnosing/correcting the error in the vignette. Should be fixed now. Will submit to CRAN during the next week.

agila5 added a commit that referenced this issue Apr 25, 2024
@rsbivand
Copy link
Author

Yes, when the space is removed, this now is fixed:
00check.log

@Robinlovelace
Copy link
Member

Impressively fast problem identification, diagnosis, and fix! Many thanks.

@agila5
Copy link
Collaborator

agila5 commented Apr 26, 2024

Thanks again! Nice example that the new approach in GDAL 3.9.0 works 😅

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

4 participants