[gdal-dev] gdalwarp - Erroneous Outputs

Bryant bryantcurto at gmail.com
Mon Apr 8 08:55:49 PDT 2019


Hello!

I've been trying to use /gdalbuildvrt/ and /gdalwarp/ to merge, project, and
crop a set of overlapping images with a new resolution.

However, I've been running into an issue where the edges of the resulting
image have nondeterministic, erroneous values (ie. very large and small
values) and values in regions that I would expect only NoDataValues. The
images are Float32, 1 banded, and have nodata =
-340282346638528859811704183484516925440.

My commands are:
gdalbuildvrt -r cubic -srcnodata -340282346638528859811704183484516925440
-vrtnodata -340282346638528859811704183484516925440 -te -122.445455
37.747147 -122.433587 37.756551 -tr 0.000031 0.000031 -input_file_list
file-list.txt ~/raster.vrt
gdalwarp --config GDAL_CACHEMAX 1024 -t_srs "+proj=utm +datum=WGS84 +zone=10
+units=m" -tr 2.709812 3.424375 -te 548854.456592 4177905.79342
549893.700272 4178955.41704 -r cubic -srcnodata
-340282346638528859811704183484516925440 -dstnodata 0 ~/raster.vrt
~/raster.tif

Input files:
file-list.txt
<http://osgeo-org.1560.x6.nabble.com/file/t384756/file-list.txt>  , 
raster1.img <http://osgeo-org.1560.x6.nabble.com/file/t384756/raster1.img> 
,  raster2.img
<http://osgeo-org.1560.x6.nabble.com/file/t384756/raster2.img>  , and 
raster3.img <http://osgeo-org.1560.x6.nabble.com/file/t384756/raster3.img>  

In the region bounded by my extents, two images (raster1.img and
raster3.img) have only NoDataValues, while the other has valid values for
part of the region.

In my testing, I've found that this issue does not arise when using gdal
v2.2.0 or v2.2.4, but does with v2.3.0 and v2.4.0. See output from  v2.2.4
<http://osgeo-org.1560.x6.nabble.com/file/t384756/output-gdal2-2-4.tif>  
and  v2.4.0
<http://osgeo-org.1560.x6.nabble.com/file/t384756/output-gdal2-4-0.tif>  .

Some other things I've discovered while attempting to debug this issue:
- Setting the resampling method of gdalbuildvrt to anything besides nearest
results in the issue.
- Initializing the destination image in gdalwarp via -wo "INIT_DEST=NO_DATA"
fails to resolve this issue.

Any help would be appreciated!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list