-
Notifications
You must be signed in to change notification settings - Fork 298
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
Add gdal_footprint support to gdal_utils #2305
Conversation
src/gdal_utils.cpp
Outdated
#if GDAL_VERSION_NUM < 3080000 | ||
Rcpp::CharacterVector ret; | ||
Rcpp::stop("gdalfootprint util requires GDAL >= 3.8.0"); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be an #else
, and the #endif
should go after line 284.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think I now use #if
properly.
R/gdal_utils.R
Outdated
@@ -112,6 +112,7 @@ gdal_utils = function(util = "info", source, destination, options = character(0) | |||
"-te", "-tr", "-tap", "-ts", "-ot")) # https://gdal.org/programs/gdal_rasterize.html | |||
CPL_gdalrasterize(source, destination, options, oo, doo, config_options, overwrite, quiet) | |||
}, # nocov end | |||
gdalfootprint = CPL_gdalfootprint(source, destination, options, oo, config_options, quiet), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to call the util footprint
, rather than gdalfootprint
, in line with the others. Also above in the doc section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Great, thanks! |
I added a few more commits to clean up. |
Cool, thanks for the help. I'll close the issue then. |
Hi,
as discussed in #2304 this PR adds support for the gdal_footprint utility requiring GDAL >= 3.8.0.
I am very new to C++, so please double-check if everything is ok. I used the script below to check the functionality:
Created on 2024-01-01 with reprex v2.0.2