Opened 10 years ago

Closed 10 years ago

#3478 closed defect (fixed)

GTIFF_DIR does not support georeferencing.

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.8.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: gtiff
Cc:

Description

It appears that georeferencing is not read properly when accessing "GTIFF_DIR" subdatasets even though the coordinate system information works fine as shown here:

warmerda@gdal64[251]% gdalinfo GTIFF_DIR:1:/home/warmerda/utm.tif
Driver: GTiff/GeoTIFF
Files: /home/warmerda/utm.tif
Size is 512, 512
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.9786982139006,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","26711"]]
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  512.0)
Upper Right (  512.0,    0.0)
Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)
Band 1 Block=512x16 Type=Byte, ColorInterp=Gray
warmerda@gdal64[252]% gdalinfo /home/warmerda/utm.tif
Driver: GTiff/GeoTIFF
Files: /home/warmerda/utm.tif
Size is 512, 512
Coordinate System is:
PROJCS["NAD27 / UTM zone 11N",
    GEOGCS["NAD27",
        DATUM["North_American_Datum_1927",
            SPHEROID["Clarke 1866",6378206.4,294.9786982139006,
                AUTHORITY["EPSG","7008"]],
            AUTHORITY["EPSG","6267"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4267"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-117],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","26711"]]
Origin = (440720.000000000000000,3751320.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  440720.000, 3751320.000) (117d38'28.21"W, 33d54'8.47"N)
Lower Left  (  440720.000, 3720600.000) (117d38'20.79"W, 33d37'31.04"N)
Upper Right (  471440.000, 3751320.000) (117d18'32.07"W, 33d54'13.08"N)
Lower Right (  471440.000, 3720600.000) (117d18'28.50"W, 33d37'35.61"N)
Center      (  456080.000, 3735960.000) (117d28'27.39"W, 33d45'52.46"N)
Band 1 Block=512x16 Type=Byte, ColorInterp=Gray

Change History (2)

comment:1 Changed 10 years ago by Even Rouault

This dates back to r3834 apparently ! When opening with GTIFF_DIR, OpenOffset?() receive the bBaseIn = FALSE parameter, which cause geotransform not to be read. I imagine this is to avoid reading geotransform in overviews as bBaseIn = FALSE is also passed in that later case

comment:2 Changed 10 years ago by Even Rouault

Milestone: 1.8.0
Resolution: fixed
Status: newclosed

Fixed in trunk (r19519) and tested in r19520. The change will only try reading the geotransform when OpenOffset?() is called from the main Open() method or from OpenDir?() (and not in other internal use case such as overviews and masks)

Note: See TracTickets for help on using tickets.