[gdal-dev] Any hope of getting TAB-support on GDAL?

Frank Warmerdam warmerdam at p...
Mon Sep 24 13:33:22 EDT 2001


Petri J. Riipinen wrote:

> Hi folks,
...
> I would like to use GDAL to read the TIFF-files but it seems that it
> doesn't know how to use the .tab-file to set up the georeferencing. So, I'm
> thinking of just opening the TIFF-file with GDAL and then parsing the
> .tab-file manually and using the GDALDataset->SetGeoTransform according to
> the points that are given in the .tab-file.
> 
> Do I really have to do that? I'm not sure about the other stuff in
> GDAL-package, I've just used the GDALDataset and rasterbands so far, is
> there some other stuff that I should be looking into?


Petri,

I am somewhat familiar with the MapInfo tab files for georeferencing tiff
files, and obviously the best solution would be for the GDAL GeoTIFF code
to be updated to use it in a similar manner to how .tfw files can be used.

Reading the control points and setting the georeferencing internally wouldn't
be that hard; however, translating the MapInfo projections properly is a
bigger job. Luckily within gdal/ogr/ogrsf_frmts/mitab I already have code
for translating MapInfo Coordsys statements into WKT format, but I am somewhat
loath to make the GDAL GeoTIFF driver depend on the OGR MITAB library.

Also, I am not sure I will want to take the time to implement this all in
the near future.


If you don't need the projection information, just georeferencing transform,
my suggestion is that you write a small program or script to transform the
.tab files into .tfw files with the appropriate information. The .tfw format
is very simple, but I can provide pointers for it if needed.

I would also note that calling SetGeoTransform() on an existing TIFF/GeoTIFF
file will not likely have the desired effect. It is hard to update an existing
TIFF file with new GeoTIFF information and I don't think it can be done through
GDAL.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at p...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list