awips2/ncep/gov.noaa.nws.ncep.standalone/vgf-xmlConvertersInstruction.txt
Brad Gonzales af92e8d329 Issue #628 committing more PGEN code received from Plummer on 4-19-2012.
Former-commit-id: 22a29b98b2 [formerly a90d64e1fc] [formerly 0df0aa8663 [formerly bd658184b246452b5d3e2154d79f2179bdc12594]]
Former-commit-id: 0df0aa8663
Former-commit-id: e1f03d9369
2012-05-10 17:02:18 -05:00

114 lines
5.1 KiB
Text

Pgen Vgf and Xml Converters Instructions
These are the usage instructions for five command line converting applications.
Vgf converter--Convert Pgen Vgf binary files to Xml files.
Xml converter--Convert Pgen Xml files to Vgf binary files.
Vgf comparator--Compare a Vgf file with the converted Vgf file.
Xml comparator--Compare a Xml file with the converted Xml file.
Color map converter--Convert color map tbl files to cmap files.
1. Purpose.
The Pgen data Vgf files are used in legacy AWIPS system. The Pgen data Xml files are used
in the new AWIPSII system. The converters will convert the data files from one type of
format to another, so the data can be displayed in ether of the systems. Meanwhile,
the existing applications that use the Vgf files remain unchanged.
2. Command Line converting Vgf files to Xml files, and converting Xml files to Vgf files.
If running the Vgf Converter and the Vgf comarator, we need to copy libVgfXml.so to $AWIPS2/lib/ first.
If running the Xml Converter and the Xml comarator, we need to start the edex server first.
2.1 The Vgf converter.
1)Install the zip package. The zip package includes an executable jar application, and a
lib directory containing library jar and so files.
2)Then run the jar file:
java -jar vgfConverter.jar sourcePath[or sourceFile] destinationPath
Note 1. If using sourcePath, all the files in the directory will be converted. If using
sourceFile, only this source file on the path will be converted.
Note 2. Only *.vgf files can be converted.
Note 3. The converted files are renamed to *.xml and stored in the destination directory/path.
3)How to generate the zip package.
On the Eclipse package side, right click gov.noaa.nws.ncep.standalone | build-vgfConverter.xml,
and select Ant Build. The directory distVC is created. Put everything in that directory to
the zip package.
2.2 The Xml converter.
1)Install the zip package. The zip package includes an executable jar application, a lib
directory contains library jar files, a table directory contains tables used, cmlTag2Vgf application,
and tag2vgf application.
2)Modify the alonescript.csh. Change install_dir to the real install directory.Then run it.
source alonescript.csh
Note this only need to be run once in this terminal.
3)Then run the jar file:
java -jar xmlConverter.jar sourcePath[or sourceFile] destinationPath
Note 1. If using sourcePath, all the files in the directory will be converted. If using
sourceFile, only this source file on the path will be converted.
Note 2. Only *.xml file can be converted. It is better to separate source xml files and table xml files.
Note 3. The converted files are renamed to *.tag and stored in the destination directory/path.
4)Then run the cmlTag2Vgf script file:
./cmlTag2Vgf
Note 1. This will converters all the *.tag files in the directory to *A.vgf files.
Note 2. To convert one file, run ./tag2vgf, enter source file and destination file when prompt.
5)How to generate the zip package.
On the eclipse package side, right click gov.noaa.nws.ncep.standalone | build-xmlConverter.xml,
and select Ant Build. The directory distXC is created. Put everything in that directory to
the zip package.
3. Testing on converted files
3.1 The Vgf comparator.
1)Install the zip package. The zip package includes an executable jar application, and a lib
directory containing library jar and so files.
2)Then run the jar file:
java -jar compareVgf.jar sourceFile destinationFile
Note if the output ends with “The two files contain the same information”, it means that.
Otherwise it stops at the element in the first file that does not find match in the second file.
3)How to generate the zip package.
On the Eclipse package side, right click gov.noaa.nws.ncep.standalone | build-compareVgf.xml,
and select Ant Build. The directory distVT is created. Put everything in that directory to
the zip package.
3.2 The Xml comparator.
1) Install the zip package. The zip package includes an executable jar application, a lib
directory contains library jar files.
2) Modify the alonescript.csh. Change install_dir to the real install directory.Then run it:
source alonescript.csh
Note this only need to be run once in this terminal.
3) Then run the jar file:
java -jar compareXml.jar sourceFile destinationFile
Note if the output ends with “The two files contain the same information”, it means that.
Otherwise it stops at the element in the first file that does not find a match in the second file.
4) How to generate the zip package.
On the Eclipse package side, right click gov.noaa.nws.ncep.standalone | build-compareXml.xml,
and select Ant Build. The directory distXT is created. Put everything in that directory to
the zip package.
4. The Color map converter
1) Install the zip package. The zip package includes an executable jar application, a lib
directory contains library jar files.
2) Then run the jar file:
java -jar colormapConverter.jar sourcePath destinationPath lookupTable
Note 1. All the files in the directory will be converted.
Note 2. The lookup table is enhance.tbl.
Note 3. The converted files are saved to the Satellite, Radar and Other sub-directories of the destination directory accordingly.