worldfile-mtx.xl (World File/Matrix/Converter)
Author: Hirohisa Mori / joshua@globalbase.org +
[Transrate]Reiko Inoue Bendtsen c/o Suzaku Translations /
(http://www.suzaku-translations.com/) +
PROTOTYPE
exl worldfile-mtx.xl / [image-path] [worldfile-prefix] [destination-directory] [base-unit] [bib-file]
ARGUMENTS
[image-path] Specification of an image file
[worldfile-prefix] Extension of a world file
[destination-directory] Save destination directory
[base-unit] Unit of a coordinate file
[bib-file] File containining bibliographical information
option
-
bgcolor= [background-color] The default is 16777215.
-
backup=on,off,recover The default is off.
-
backuploop= [backuploop-count] The default is
-
add=on,off,info The default is off.
-
leveling=on,off The default is on.
ENVIRONMENT
Agent exl [UNDEF REF (exl)], Agent
gbmx
EXPLANATION
This command converts a world file into matrix format and generates a coordinate system file and mapping file so that the file can be viewed.
[image-path] specifies an image file; wild cards can be used. When using wild cards, it is necessary to enclose them with '' such that the shell does not recognize them. [worldfile-prefix] must start from ".". [base-unit] specifies the unit of the coordinate system, which is automatically assumed to be the unit of the coordinate system in which the world file data is specified. [bib-file] specifies the bib information to be embedded in a coordinate system file. The command might for example be invoked as follows.
% xl worldfile-mtx - - / '*/image/*.bmp' .bpw image m image/bib.xl
An example og the output in image/bib.xl is shown below.
<?xl version="0.1" encoding="EUC-JP"?>
<bib xmlns:gb="xlp://isjhp1.nichibun.ac.jp:8080/gb_metadata">
<gb:title type="text" data="Japan Ortho"/>
<gb:creator type="text" data="Osaka City University"/>
<gb:content.period type="W3C-DTF" data="2003-01-01 / 2003-01-01"/>
<gb:issue.period type="W3C-DTF" data="2006-06-01"/>
<gb:property type="gb-prop" data="photo"/>
<gb:homepage type="URL" data="http://www.osaka-cu.ac.jp/"/>
</bib>
The operations carried out by worldfile-mtx function can basically be divided into 2phases.
-
Phase one
The command scans the specified image file and world file to determine the size of the overall coordinate system based on the allocated positions and the size and generates img.crd,img.map,img.lst files.
-
Second phase
Next, the command actually reads the image file and saves it in the matrix file img.mtx.
Since the names of the files generated in the example above are determined to be img.crd, img.map, img.lst, and img.mtx,
the save location must be an empty directory.
bgcolor option
If you specify the bgcolor option, RGBA = 256* bgcolor + 255is specified as the mtx's default_color and transparent=bgcolor is set when reading a pnm file. If this option is not specified, the setting is automatically assumed to be bgcolor=0xffffff.
backup option
The backup option specifies whether or not to back up img.mtx in the second phase. If you specify off, the file is not backed up. If you specify on, backup is saved in img.mtx.b at regular intervals, and the backup information is saved in backup-list.xml at the same time. The frequency of backing up is specified by the backuploop option. If you specify backup=recover, the first phase is skipped and the operation starts from the stage where backup-list.xml is read and backed up at the end. Note that before using this functionality,
img.mtx.b must be copied to img.mtx in advance.
If you specify backup=recover, the file is backed up. A backup is required for the recover option.
backuploop option
The backuploop option specifies the frequency at which an image file is backed up during the writing to img.mtx. If you specify backuploop=1 or less, the file is backed up every time the file is written in img.mtx.
If the command is abnormally terminated or forcefully terminated, an img.mtx file may still be created in the destination folder, but it may be corrupted. In this case, it is necessary to copy the backup file img.mtx.b to img.mtx and start the processing from the top.
add option
The add option provides functionality for adding ( or overwriting) new image data to an existing matrix created by worldfile-mtx earlier. If you specify add=info, the first phase is executedn and information required for overwriting is acquired and saved in backup-list.xml. If the backup option was specified in pervious operation and backup-list.xml already exists, there is no need to execute add=info. If you specify add=on the next time, the first phase is skipped, backup-list.xml is read, the operation is started from the second phase and the data is overwritten.
leveling option
This option is valid for ver.B.b16.14 and later. If you set the leveling option to off, no layers are set. This option is useful when outputting a composed image in pnm format or similar and avoids carrying out unnecessary tasks.
[UP]
Go To Page Top
RETURN VALUE
-
[destination-directory]/image file
-
backup-list.xml backup information file
ERRORS
REFERENCE
BUGS
As of ver.B.b15, the command supports only world files mapped in parallel with coordinate axes. The operations cannot be guaranteed if files are mapped at an angle to the coordinate axes.
In ver.B.b16.12, it was found that the worldfile-mtx.xl script was not included in the installer. This problem was solved in ver.B.b16.13.
[UP]
Go To Page Top