getworldfilename - Derive worldfile name from image filename

Syntax

worldfilename = getworldfilename(imagefilename)

Description

worldfilename = getworldfilename(imagefilename) returns the name of the corresponding worldfile derived from the name of an image file.

The worldfile and the image file have the same base name. If imagefilename follows the ".3" convention, then you create the worldfile extension by removing the middle letter and appending the letter 'w'.

If imagefilename has an extension that does not follow the ".3" convention, then a 'w' is appended to the full image name to construct the worldfile name.

If imagefilename has no extension, then '.wld' is appended to construct a worldfile name.

Examples

Given the following image filenames, worldfilename would return these worldfile names:

Image File Name

Worldfile Name

myimage.tif

myimage.tfw

myimage.jpeg

myimage.jpegw

myimage

myimage.wld

See Also

mapshow, mapview, worldfileread, worldfilewrite

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS