Opened 16 years ago
Closed 16 years ago
#2338 closed defect (duplicate)
assigned nodata values incorrect
Reported by: | sprice | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
Assigned 'nodata' values don't seem to be correctly read by gdalinfo. In the code below, I set the nodata value as '0 0 20', but then it is read back as '20 20 20', as near as I can tell. Note that I can't tell if this is a problem with gdalwarp or gdalinfo, because one might be setting the value wrong, the other might be reading it back wrong. If requested I can attach my files.
$ gdalinfo z1440.tif Driver: GTiff/GeoTIFF Files: z1440.tif Size is 1440, 1440 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.250000000000000,-0.125000000000000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S) Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N) Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S) Center ( 0.0000000, 0.0000000) ( 0d 0'0.01"E, 0d 0'0.01"N) Band 1 Block=1440x1 Type=Byte, ColorInterp=Red Band 2 Block=1440x1 Type=Byte, ColorInterp=Green Band 3 Block=1440x1 Type=Byte, ColorInterp=Blue $ gdalwarp -q -dstnodata '0 0 20' z1440.tif z1440.cs.tif $ gdalinfo z1440.cs.tif Driver: GTiff/GeoTIFF Files: z1440.cs.tif Size is 1821, 911 Coordinate System is: GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]] Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.197642353760524,-0.197642353760524) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N) Lower Left (-180.0000000, -90.0521843) (180d 0'0.00"W, 90d 3'7.86"S) Upper Right ( 179.9067262, 90.0000000) (179d54'24.21"E, 90d 0'0.00"N) Lower Right ( 179.9067262, -90.0521843) (179d54'24.21"E, 90d 3'7.86"S) Center ( -0.0466369, -0.0260921) ( 0d 2'47.89"W, 0d 1'33.93"S) Band 1 Block=1821x1 Type=Byte, ColorInterp=Red NoData Value=20 Band 2 Block=1821x1 Type=Byte, ColorInterp=Green NoData Value=20 Band 3 Block=1821x1 Type=Byte, ColorInterp=Blue NoData Value=20
Note:
See TracTickets
for help on using tickets.
This problem was already reported as bug #2083 and is indeed specific to the GTiff driver