[gdal-dev] Re: gdalwarp -co COMPRESS issues

Maciej Sieczka tutey at o2.pl
Fri Mar 14 19:19:25 EDT 2008


Craig Miller pisze:
> Could you post:
> - gdalinfo of the source image

$ gdalinfo M-33-21-A-b-4.tif
Driver: GTiff/GeoTIFF
Files: tmp/M-33-21-A-b-4.tif
Size is 12123, 12914
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.2572235629972,
                 AUTHORITY["EPSG","7030"]],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",15],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","32633"]]
Origin = (582099.959999999962747,5720171.540000000037253)
Pixel Size = (0.379999999999999,-0.380000000000023)
Metadata:
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  582099.960, 5720171.540) ( 16d11'9.91"E, 51d37'35.64"N)
Lower Left  (  582099.960, 5715264.220) ( 16d11'5.78"E, 51d34'56.83"N)
Upper Right (  586706.700, 5720171.540) ( 16d15'9.44"E, 51d37'33.15"N)
Lower Right (  586706.700, 5715264.220) ( 16d15'5.08"E, 51d34'54.34"N)
Center      (  584403.330, 5717717.880) ( 16d13'7.55"E, 51d36'15.01"N)
Band 1 Block=12123x1 Type=Byte, ColorInterp=Red
   Metadata:
     COLOR_TABLE_RULES_COUNT=1
     COLOR_TABLE_RULE_RGB_0=0.000000e+00 2.550000e+02 0 0 0 255 255 255
Band 2 Block=12123x1 Type=Byte, ColorInterp=Green
   Metadata:
     COLOR_TABLE_RULES_COUNT=1
     COLOR_TABLE_RULE_RGB_0=0.000000e+00 2.550000e+02 0 0 0 255 255 255
Band 3 Block=12123x1 Type=Byte, ColorInterp=Blue
   Metadata:
     COLOR_TABLE_RULES_COUNT=1
     COLOR_TABLE_RULE_RGB_0=0.000000e+00 2.550000e+02 0 0 0 255 255 255

> - gdalwarp command line + gdalinfo of resultant image

$ gdalwarp -co "COMPRESS=LZW" M-33-21-A-b-4.tif M-33-21-A-b-4_gw.tif

$ gdalinfo M-33-21-A-b-4_gw.tif
Driver: GTiff/GeoTIFF
Files: M-33-21-A-b-4_gw.tif
Size is 12123, 12914
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.2572235629972,
                 AUTHORITY["EPSG","7030"]],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",15],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","32633"]]
Origin = (582099.959999999962747,5720171.540000000037253)
Pixel Size = (0.380000000000012,-0.380000000000012)
Metadata:
   AREA_OR_POINT=Area
Image Structure Metadata:
   COMPRESSION=LZW
   INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  582099.960, 5720171.540) ( 16d11'9.91"E, 51d37'35.64"N)
Lower Left  (  582099.960, 5715264.220) ( 16d11'5.78"E, 51d34'56.83"N)
Upper Right (  586706.700, 5720171.540) ( 16d15'9.44"E, 51d37'33.15"N)
Lower Right (  586706.700, 5715264.220) ( 16d15'5.08"E, 51d34'54.34"N)
Center      (  584403.330, 5717717.880) ( 16d13'7.55"E, 51d36'15.01"N)
Band 1 Block=12123x1 Type=Byte, ColorInterp=Red
Band 2 Block=12123x1 Type=Byte, ColorInterp=Green
Band 3 Block=12123x1 Type=Byte, ColorInterp=Blue

> - gdal_translate command line + gdalinfo of resultant image

The original M-33-21-A-b-4.tif is an output of gdal_translate -co 
"COMPRESS=LZW".

Maciek


More information about the gdal-dev mailing list