Opened 17 years ago

Closed 16 years ago

#1734 closed defect (fixed)

[PATCH] Fix documentation related to worldfile extensions and add a few more extensions

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 1.6.0
Component: GDAL_Raster Version: 1.4.2
Severity: normal Keywords: worldfile extensions
Cc:

Description

Some trivial patches to add a few more worldfile extensions and make documentation consistent :

  • JPEG : Add support for '.jpw' and '.jpegw'. Documentation didn't mention '.jpgw' which was supported. Updated with '.jpw' and '.jpegw'
  • BMP : Add support for '.bpw'. Documentation didn't mention support for worlfile. Fixed
  • GIF : Add support for '.gifw'. Documentation didn't mention '.gfw' which was supported. Updated, and with '.gifw' also.
  • PNG. This one is a bit weird. Code and documentation mention tfw and tifw ?? Patch to replace them with '.pgw' and '.pngw'
  • TIF. Add support for '.tiffw'. Documention didn't mention '.tifw' which was supported, but '.tiffw' which wasn't... Updated.

That's all !

Attachments (5)

gdal-1.4.2-bmp-worldfile-extensions.patch (1.2 KB ) - added by Even Rouault 17 years ago.
gdal-1.4.2-gif-worldfile-extensions.patch (1.3 KB ) - added by Even Rouault 17 years ago.
gdal-1.4.2-jpg-worldfile-extensions.patch (1.6 KB ) - added by Even Rouault 17 years ago.
gdal-1.4.2-png-worldfile-extensions.patch (1.6 KB ) - added by Even Rouault 17 years ago.
gdal-1.4.2-tif-worldfile-extensions.patch (1.3 KB ) - added by Even Rouault 17 years ago.

Download all attachments as: .zip

Change History (7)

by Even Rouault, 17 years ago

by Even Rouault, 17 years ago

by Even Rouault, 17 years ago

by Even Rouault, 17 years ago

by Even Rouault, 17 years ago

comment:1 by warmerdam, 17 years ago

I'd like to hold these changes a bit. Some of the additions (ie. .bmw) do not seem like a good idea. The "rule" for world file naming is supposed to be that the full unix name is the old extension with "w" added. The windows 3 character extension is the first and last character of the original extension with "w" added.

I don't like adding unnecessary checks because each variation results in addition open() calls to the filesystem.

If NULL is passed as the extension to GDALReadWorldFile() it will apply the standard rules. It may well be that these drivers can be simplified to depend on that behavior.

comment:2 by Even Rouault, 16 years ago

Milestone: 1.6.0
Resolution: fixed
Status: newclosed

In r13801, I've commited a few changes in code and documentaion that should harmonize how ESRI world file extensions are handled. First, a GDALReadWorldFile() call is made with the NULL argument to check the .bpw or .bmpw for a .bmp file for example, and then a GDALReadWorldFile with the default .wld extension.

Note: See TracTickets for help on using tickets.