[gdal-dev] TIFs with TABs problem

Nick Hopton nhopton at gmail.com
Tue May 28 07:43:12 PDT 2013


A friend, a relative newcomer to GIS, is having problems loading some of
the TIFs created with Mapinfo into QGIS. Each TIF has a TAB file and in
some cases the TAB file is interpreted correctly and in other cases the TAB
file is (apparently) not recognised.

I think this might be a problem with Gdal rather than a problem with QGIS.
Taking just two of the TIFs, the output from gdalinfo when run on
33044061.TIF indicates that things are working as they should. However,
when gdalinfo is run on 33044071.TIF the spatial data in its TAB file is
not recognised. See the listings below.

The strange thing is that all of the TIFs can successfully be converted
from TIF to GeoTIFF using gdalwarp. (But it is important to my friend that
he should be able to open Mapinfo raster images directly.)

Any ideas?

Regards,
Nick.


Contents of 33044061.TAB:
------------------------
!table
!version 300
!charset WindowsLatin1

Definition Table
  File "33044061.tif"
  Type "RASTER"
  (582429,263569) (1,7594) Label "Pt 1",
  (582372,265177) (1,0) Label "Pt 2",
  (584784,265263) (11335,1) Label "Pt 3",
  (584841,263655) (11335,7594) Label "Pt 4"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000,
-100000
  Units "m"

Results of running gdalinfo on 33044061.TIF:
-------------------------------------------
nick at nick-6150M2MA:~/Desktop/tabstuff$ gdalinfo 33044061.TIF
Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription"
contains null byte in value; value incorrectly truncated during reading due
to implementation limitations
Driver: GTiff/GeoTIFF
Files: 33044061.TIF
Size is 11335, 7594
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["OSGB_1936",
            SPHEROID["Airy 1930",6377563.396,299.3249646],
            TOWGS84[375,-111,431,-0,-0,-0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",49],
    PARAMETER["central_meridian",-2],
    PARAMETER["scale_factor",0.9996012717],
    PARAMETER["false_easting",400000],
    PARAMETER["false_northing",-100000],
    UNIT["Meter",1]]
GeoTransform =
  582371.785312838, 0.2128106799708935, 0.007506419931892793
  265177.0453393974, 0.007597130759524194, -0.2117600570261751
Metadata:
  TIFFTAG_IMAGEDESCRIPTION=
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_MAXSAMPLEVALUE=1
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=CCITTFAX4
  INTERLEAVE=BAND
  MINISWHITE=YES
Corner Coordinates:
Upper Left  (  582371.785,  265177.045) (  0d40'19.83"E, 52d15'14.75"N)
Lower Left  (  582428.789,  263568.939) (  0d40'19.71"E, 52d14'22.68"N)
Upper Right (  584783.994,  265263.159) (  0d42'27.09"E, 52d15'14.63"N)
Lower Right (  584840.998,  263655.053) (  0d42'26.92"E, 52d14'22.57"N)
Center      (  583606.392,  264416.049) (  0d41'23.39"E, 52d14'48.66"N)
Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
  Image Structure Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255
nick at nick-6150M2MA:~/Desktop/tabstuff$

Contents of 33044071.TAB:
------------------------
!table
!version 300
!charset WindowsLatin1

Definition Table
  File "33044071.tif"
  Type "RASTER"
  (584841,263655) (1,7576) Label "Pt 1",
  (584784,265263) (1,0) Label "Pt 2",
  (587197,265349) (11335,1) Label "Pt 3",
  (587254,263740) (11335,7576) Label "Pt 4"
  CoordSys Earth Projection 8, 79, "m", -2, 49, 0.9996012717, 400000,
-100000
  Units "m"

Results of running gdalinfo on 33044071.TIF:
-------------------------------------------
nick at nick-6150M2MA:~/Desktop/tabstuff$ gdalinfo 33044071.TIF
Warning 1: TIFFFetchNormalTag:ASCII value for tag "ImageDescription"
contains null byte in value; value incorrectly truncated during reading due
to implementation limitations
Driver: GTiff/GeoTIFF
Files: 33044071.TIF
Size is 11335, 7576
Coordinate System is `'
GCP Projection =
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["OSGB_1936",
            SPHEROID["Airy 1930",6377563.396,299.3249646],
            TOWGS84[375,-111,431,-0,-0,-0,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",49],
    PARAMETER["central_meridian",-2],
    PARAMETER["scale_factor",0.9996012717],
    PARAMETER["false_easting",400000],
    PARAMETER["false_northing",-100000],
    UNIT["Meter",1]]
GCP[  0]: Id=Pt 1, Info=
          (1,7576) -> (584841,263655,0)
GCP[  1]: Id=Pt 2, Info=
          (1,0) -> (584784,265263,0)
GCP[  2]: Id=Pt 3, Info=
          (11335,1) -> (587197,265349,0)
GCP[  3]: Id=Pt 4, Info=
          (11335,7576) -> (587254,263740,0)
Metadata:
  TIFFTAG_IMAGEDESCRIPTION=
  TIFFTAG_XRESOLUTION=300
  TIFFTAG_YRESOLUTION=300
  TIFFTAG_MINSAMPLEVALUE=0
  TIFFTAG_MAXSAMPLEVALUE=1
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
  COMPRESSION=CCITTFAX4
  INTERLEAVE=BAND
  MINISWHITE=YES
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 7576.0)
Upper Right (11335.0,    0.0)
Lower Right (11335.0, 7576.0)
Center      ( 5667.5, 3788.0)
Band 1 Block=512x512 Type=Byte, ColorInterp=Palette
  Image Structure Metadata:
    NBITS=1
  Color Table (RGB with 2 entries)
    0: 255,255,255,255
    1: 0,0,0,255
nick at nick-6150M2MA:~/Desktop/tabstuff$

-- 
Nick Hopton, Caversham, Reading, England.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130528/562f242a/attachment.html>


More information about the gdal-dev mailing list