[Gdal-dev] Patch to get jpg driver to read world files with .tfw
extension
Eric Dönges
eric.doenges at gmx.net
Thu Oct 20 03:02:59 EDT 2005
It seems that some people use world files with a .tfw extension
instead of
the .jpgw and .wld extensions the jpeg driver looks for, so I've
patched it to
look for .tfw and .tifw as well. Which leaves me wondering - is this
the correct thing
to do ? Of all the other drivers that can read world files, only the
(Geo)TIFF
(obviously !) and PNG drivers search for .tfw and .tifw files. If the
JPEG driver should
look for .tfw and .tifw files, shouldn't all other drivers that can
read world files
do as well ?
With kind regards,
Eric
Index: jpgdataset.cpp
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/frmts/jpeg/jpgdataset.cpp,v
retrieving revision 1.38
diff -u -r1.38 jpgdataset.cpp
--- jpgdataset.cpp 14 Oct 2005 21:52:26 -0000 1.38
+++ jpgdataset.cpp 20 Oct 2005 05:38:52 -0000
@@ -1074,6 +1074,10 @@
|| GDALReadWorldFile( poOpenInfo->pszFilename, ".jpgw",
poDS->adfGeoTransform )
|| GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
+ poDS->adfGeoTransform )
+ || GDALReadWorldFile( poOpenInfo->pszFilename, ".tfw",
+ poDS->adfGeoTransform );
+ || GDALReadWorldFile( poOpenInfo->pszFilename, ".tifw",
poDS->adfGeoTransform );
return poDS;
More information about the Gdal-dev
mailing list