Opened 13 years ago

Closed 13 years ago

#1964 closed defect (fixed)

Error appears in 1.4.3 which wasn't in 1.4.2

Reported by: sprice Owned by: warmerdam
Priority: normal Milestone: 1.4.4
Component: Utilities Version: 1.4.3
Severity: normal Keywords: gdalwarp
Cc:

Description (last modified by warmerdam)

This seems to have appeared in 1.4.3. It seems to be having a problem with my '-dstnodata "0 0 20"' option. With the current version, GDAL errors out and produces a 4KB GeoTIFF. With v1.4.2, no error is produced and the GeoTIFF is as expected. I can post a link to the source file on request, but it is 267MB compressed.

v1.4.2:
$ ./gdalwarp -dstnodata "0 0 20" -of GTiff -ts 256 256 -t_srs '+proj=merc +a=6378137.0 +b=6378137.0 +wktext +units=m' -te -8233185.1903991 1110477.1468928 -8228293.220589 1115369.1167029 N010W074_x1.merc.tif 1_03868.srs.tif
Creating output file that is 256P x 256L.
Processing input file N010W074_x1.merc.tif.
:0...10...20...30...40...50...60...70...80...90...100 - done.

v1.4.3:
$ ./gdalwarp -dstnodata "0 0 20" -of GTiff -ts 256 256 -t_srs '+proj=merc +a=6378137.0 +b=6378137.0 +wktext +units=m' -te -8233185.1903991 1110477.1468928 -8228293.220589 1115369.1167029 N010W074_x1.merc.tif 1_03868.srs.tif
Creating output file that is 256P x 256L.
Processing input file N010W074_x1.merc.tif.
ERROR 1: Invalid nBandCount or bMaskIsFloat argument in SourceNoDataMask

$ ./gdalinfo N010W074_x1.merc.tif
Driver: GTiff/GeoTIFFSize is 11651, 11797
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed ellipse",
        DATUM["unknown",
            SPHEROID["unnamed",6378137,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-8237642.318702000193298,1118889.974857999943197)
Pixel Size = (19.109001938546044,-19.108775438247005)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=219
  TIFFTAG_YRESOLUTION=222
  TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
Corner Coordinates:
Upper Left  (-8237642.319, 1118889.975) ( 74d 0'0.00"W, 10d 0'0.00"N)
Lower Left  (-8237642.319,  893463.751) ( 74d 0'0.00"W,  8d 0'0.00"N)
Upper Right (-8015003.337, 1118889.975) ( 72d 0'0.00"W, 10d 0'0.00"N)
Lower Right (-8015003.337,  893463.751) ( 72d 0'0.00"W,  8d 0'0.00"N)
Center      (-8126322.828, 1006176.863) ( 73d 0'0.00"W,  9d 0'4.98"N)
Band 1 Block=512x512 Type=Byte, ColorInterp=Red
  Overviews: 3884x3933, 1942x1967, 971x984, 486x492, 243x246, 122x123
Band 2 Block=512x512 Type=Byte, ColorInterp=Green
  Overviews: 3884x3933, 1942x1967, 971x984, 486x492, 243x246, 122x123
Band 3 Block=512x512 Type=Byte, ColorInterp=Blue
  Overviews: 3884x3933, 1942x1967, 971x984, 486x492, 243x246, 122x123

Change History (2)

comment:1 Changed 13 years ago by warmerdam

Component: defaultUtilities
Description: modified (diff)
Keywords: gdalwarp added
Milestone: 1.4.4
Status: newassigned
Version: unspecified1.4.3

comment:2 Changed 13 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

Patched in trunk as r12612, and 1.4 branch as r12613.

The basic problem is that no testing was done after the fix for #1610 for 1.4.3 for the case of -dstnodata specifications, and multi band images. This case was left badly broken.

Note: See TracTickets for help on using tickets.