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

GDALAutoCreateWarpedVRTEx(): do not set padfSrcNoDataReal/padfDstNoDataReal if already set in passed-in options (fixes mapbox/rasterio#2233) #4646

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

rouault
Copy link
Member

@rouault rouault commented Oct 13, 2021

No description provided.

for( int i = 0; i < psWO->nBandCount; i++ )
if( psWO->padfSrcNoDataReal == nullptr &&
psWO->padfDstNoDataReal == nullptr &&
psWO->nSrcAlphaBand == 0 )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rouault in rasterio/rasterio#2233 we'd like the arrays to be NULL, have no source alpha band, but then use the source's internal mask band. I haven't had a chance to try this PR yet, but I think my use case will pass that test above, and shouldn't.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but then use the source's internal mask band

use of the source's internal (non-alpha) mask band is something that has no direct control in the psWO structure. It should trigger automatically in the WarpOperation logic at https://github.com/OSGeo/gdal/blob/master/gdal/alg/gdalwarpoperation.cpp#L2149

@rouault rouault merged commit be0fc0e into OSGeo:master Oct 15, 2021
github-actions bot pushed a commit that referenced this pull request Oct 15, 2021
GDALAutoCreateWarpedVRTEx(): do not set padfSrcNoDataReal/padfDstNoDataReal if already set in passed-in options (fixes rasterio/rasterio#2233)
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

Successfully merging this pull request may close these issues.

2 participants