Changeset 13801


Ignore:
Timestamp:
Feb 16, 2008 8:09:04 AM (8 years ago)
Author:
rouault
Message:

Simplify and harmonize how ESRI world file extensions are handled for BMP, GIF, JPEG, PNG and GTiff drivers (fix #1734)

Location:
trunk/gdal/frmts
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/gdal/frmts/bmp/bmpdataset.cpp

    r13687 r13801  
    12221222/* -------------------------------------------------------------------- */
    12231223    poDS->bGeoTransformValid =
    1224         GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
     1224        GDALReadWorldFile( poOpenInfo->pszFilename, NULL,
    12251225                           poDS->adfGeoTransform );
    12261226
    12271227    if( !poDS->bGeoTransformValid )
    12281228        poDS->bGeoTransformValid =
    1229             GDALReadWorldFile( poOpenInfo->pszFilename, ".bpw",
    1230                                poDS->adfGeoTransform );
    1231 
    1232     if( !poDS->bGeoTransformValid )
    1233         poDS->bGeoTransformValid =
    1234             GDALReadWorldFile( poOpenInfo->pszFilename, ".bmpw",
     1229            GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
    12351230                               poDS->adfGeoTransform );
    12361231
  • trunk/gdal/frmts/bmp/frmt_bmp.html

    r9914 r13801  
    1919band files could be saved in BMP file. Input values will be resampled to 8
    2020bit.<p>
     21
     22If an ESRI world file exists with the .bpw, .bmpw or .wld extension, it will be read and
     23used to establish the geotransform for the image.<p>
    2124
    2225<h2>Creation Options</h2>
  • trunk/gdal/frmts/frmt_various.html

    r13503 r13801  
    620620
    621621Text chunks are translated into metadata, typically with multiple lines per
    622 item.  <a href="#WLD">World files</a> with the extensions of .wld, .tfw or
    623 .tifw will be read.  Single transparency values in greyscale files will be
     622item.  <a href="#WLD">World files</a> with the extensions of .pgw, .pngw or .wld
     623will be read.  Single transparency values in greyscale files will be
    624624recognised as a nodata value in GDAL.  Transparent index in paletted images
    625625are preserved when the color table is read. <p>
  • trunk/gdal/frmts/gif/frmt_gif.html

    r13530 r13801  
    1616be returned as the NoData value for the band.<p>
    1717
    18 If an ESRI world file exists with the .wld extension, it will be read and
     18If an ESRI world file exists with the .gfw, .gifw or .wld extension, it will be read and
    1919used to establish the geotransform for the image.<p>
    2020
  • trunk/gdal/frmts/gif/gifdataset.cpp

    r13687 r13801  
    433433/* -------------------------------------------------------------------- */
    434434    poDS->bGeoTransformValid =
    435         GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
     435        GDALReadWorldFile( poOpenInfo->pszFilename, NULL,
    436436                           poDS->adfGeoTransform )
    437         || GDALReadWorldFile( poOpenInfo->pszFilename, ".gfw",
     437        || GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
    438438                              poDS->adfGeoTransform );
    439439
  • trunk/gdal/frmts/gtiff/frmt_gtiff.html

    r12575 r13801  
    3636information is available in the TIFF file itself, GDAL will also check for,
    3737and use an ESRI <a href="frmt_various.html#WLD">world file</a> with the
    38 extention .tfw, .tiffw or .wld, as well as a MapInfo .tab file (only control
     38extention .tfw, .tifw/.tiffw or .wld, as well as a MapInfo .tab file (only control
    3939points used, Coordsys ignored).<P>
    4040
  • trunk/gdal/frmts/gtiff/geotiff.cpp

    r13773 r13801  
    33143314        {
    33153315            bGeoTransformValid =
    3316                 GDALReadWorldFile( GetDescription(), "tfw", adfGeoTransform );
    3317 
    3318             if( !bGeoTransformValid )
    3319             {
    3320                 bGeoTransformValid =
    3321                     GDALReadWorldFile( GetDescription(), "tifw", adfGeoTransform );
    3322             }
     3316                GDALReadWorldFile( GetDescription(), NULL, adfGeoTransform );
     3317
    33233318            if( !bGeoTransformValid )
    33243319            {
  • trunk/gdal/frmts/jpeg/frmt_jpeg.html

    r10070 r13801  
    1313
    1414There is currently no support for georeferencing information or metadata for
    15 JPEG files. But if an ESRI world file exists with the .wld or .jgw suffixes,
     15JPEG files. But if an ESRI world file exists with the .jgw, .jpgw/.jpegw or .wld suffixes,
    1616it will be read and used to establish the geotransform for the image. Overviews
    1717can be built for JPEG files as an external .ovr file.<p>
  • trunk/gdal/frmts/jpeg/jpgdataset.cpp

    r13715 r13801  
    14551455/* -------------------------------------------------------------------- */
    14561456    poDS->bGeoTransformValid =
    1457         GDALReadWorldFile( poOpenInfo->pszFilename, ".jgw",
     1457        GDALReadWorldFile( poOpenInfo->pszFilename, NULL,
    14581458                           poDS->adfGeoTransform )
    1459         || GDALReadWorldFile( poOpenInfo->pszFilename, ".jpgw",
    1460                               poDS->adfGeoTransform )
    14611459        || GDALReadWorldFile( poOpenInfo->pszFilename, ".wld",
    14621460                              poDS->adfGeoTransform );
Note: See TracChangeset for help on using the changeset viewer.