[FWTools] gdal_info gives different information vs reading from geotools GeoTiffReader

mzorova mzorova at yahoo.com
Wed Dec 12 16:06:22 EST 2007


I wrote the EXACT same boundary information via geotools geotiffwriter and
via gdal_translate. Then did a gdalinfo on both versions of the file. The
information output by the gdal version of the file is accurate. The
information output by the geotools version of the file is wrong. 

I did verify by reading the information back in geotools via the
geotiffreader and the information is coming back correctly. So that points
to some incompatibility between the geotools writer and the gdal reader? 

Any pointers on how I can get the two to see the same truth?


C:\temp>gdalinfo test.geotools.tif
Driver: GTiff/GeoTIFF
Files: test.geo.tif
Size is 465, 349
Coordinate System is:
GEOGCS["NAD83",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS 1980",6378137,298.2572221010002,
            AUTHORITY["EPSG","7019"]],
        AUTHORITY["EPSG","6269"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4269"]]
Origin = (-122.718829861072290,38.276280944573635)
Pixel Size = (0.000039549959133,-0.000031179321687)
Metadata:
  AREA_OR_POINT=Point
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-122.7188299,  38.2762809) (122d43'7.79"W, 38d16'34.61"N)
Lower Left  (-122.7188299,  38.2653994) (122d43'7.79"W, 38d15'55.44"N)
Upper Right (-122.7004391,  38.2762809) (122d42'1.58"W, 38d16'34.61"N)
Lower Right (-122.7004391,  38.2653994) (122d42'1.58"W, 38d15'55.44"N)
Center      (-122.7096345,  38.2708402) (122d42'34.68"W, 38d16'15.02"N)
Band 1 Block=465x8 Type=Byte, ColorInterp=Red
Band 2 Block=465x8 Type=Byte, ColorInterp=Green
Band 3 Block=465x8 Type=Byte, ColorInterp=Blue



C:\temp>gdalinfo test.gdal.tif
Driver: GTiff/GeoTIFF
Files: test.gdal.tif
Size is 465, 349
Coordinate System is:
GEOGCS["NAD83",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS 1980",6378137,298.2572221010002,
            AUTHORITY["EPSG","7019"]],
        AUTHORITY["EPSG","6269"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4269"]]
Origin = (-122.718849636051860,38.276296534234476)
Pixel Size = (0.000039549959133,-0.000031179321687)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-122.7188496,  38.2762965) (122d43'7.86"W, 38d16'34.67"N)
Lower Left  (-122.7188496,  38.2654150) (122d43'7.86"W, 38d15'55.49"N)
Upper Right (-122.7004589,  38.2762965) (122d42'1.65"W, 38d16'34.67"N)
Lower Right (-122.7004589,  38.2654150) (122d42'1.65"W, 38d15'55.49"N)
Center      (-122.7096543,  38.2708557) (122d42'34.76"W, 38d16'15.08"N)
Band 1 Block=465x5 Type=Byte, ColorInterp=Red
Band 2 Block=465x5 Type=Byte, ColorInterp=Green
Band 3 Block=465x5 Type=Byte, ColorInterp=Blue
-- 
View this message in context: http://www.nabble.com/gdal_info-gives-different-information-vs-reading-from-geotools-GeoTiffReader-tp14303913p14303913.html
Sent from the FWTools mailing list archive at Nabble.com.



More information about the FWTools mailing list