[gdal-dev] gdalwarp integer overflow

Vincent Schut schut at sarvision.nl
Tue Dec 3 06:52:24 PST 2013


Hi,

I get the following error (integer overflow) when running gdalwarp on a 
very large vrt to reproject to a very small tif:

gdalwarp -overwrite -t_srs epsg:4326 -te -180 -90 180 90 -ts 36 18 -r 
near ${YEAR}/world_${YEAR}_sinu.vrt ${YEAR}/world_${YEAR}_ll_overview.tif
Creating output file that is 36P x 18L.
Processing input file 2013/world_2013_sinu.vrt.
Using internal nodata values (e.g. 0) for image 2013/world_2013_sinu.vrt.
Copying nodata values from source 2013/world_2013_sinu.vrt to 
destination 2013/world_2013_ll_overview.tif.
0...10...20...30...40...50...60ERROR 1: Integer overflow : 
nSrcXSize=22358, nSrcYSize=9601

I also tried -r average, which gives the same error.
Note that this might be a less than average usecase: I am running 
gdalwarp on a vrt (built with gdalbuildvrt) of dimensions 172800, 33600 
and sinusoidal projection, to create a tif with dimensions of 36, 18 (10 
deg/pixel) and latlon wgs84 projection. This because ultimately I want 
to create latlon tiles of 10x10 degrees, but want to avoid creating 
empty tiles, so I'll use gdallocationinfo on the 36x18 tif to check if 
this 10x10 degree square actually has data.

Any insights or tips on what could be wrong or how to debug/prevent this 
are welcome (e.g. should I try some specific warpoptions?)

Thanks in advance,
Vincent.


More information about the gdal-dev mailing list