-
Notifications
You must be signed in to change notification settings - Fork 9
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
warp_raster
is missing an option to specify the overview level
#326
Comments
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Jun 24, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 27, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 27, 2023
Also adding a test for this functionality. RE:natcap#326
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 27, 2023
gdal.WarpOptions in GDAL < 3.4 did not handle all supported gdal.GRA_* resampling options, instead using the incomplete set of options under gdal.GRIORA_*. This was fixed in GDAL 3.4. The change introduced in this commit handles both approaches to interpreting the resample algorithm names available with this rough algorithm: 1. If gdal.WarpOptions() handles the name, use that. 2. Otherwise (if the name is unknown because of the gdal.GRIORA_* issue or if a shorthand is used instead, like '-rb' instead of '-r bilinear'), interpret the name from the GRA_* attribute name. Testing this solution on my computer works on GDAL < 3.4 (3.3 tested) and also on GDAL >= 3.4 (3.7 tested). RE:natcap#326
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 27, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 27, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 28, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 28, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 28, 2023
phargogh
added a commit
to phargogh/pygeoprocessing
that referenced
this issue
Aug 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If overviews are present in a raster, GDAL will automatically pick an overview level to use that it thinks is reasonable. This leads to unexpected results.
gdal.Warp
has an option to specify theoverviewLevel
, and ifoverviewLevel=0
, it uses the base raster. We should expose this in thewarp_raster
API.The text was updated successfully, but these errors were encountered: