DecodeENC User Guide
This document is an introduction to the use of the DecodeENC application for reformatting data from ENC files. It has been written by the British Oceanographic Data Centre (BODC) on behalf of the GEBCO community. It is hoped that the software will provide an easy means for hydrographic offices to extract some of the data held in ENC files into a simple ASCII format for use by the GEBCO project for improving the GEBCO One Minute Grid in shallow water areas.
For more technical information concerning the operation of the software, please see Appendix A at the end of this document.
You will be initially presented with a dialogue box as shown in figure 1.
|
Figure 1: The DecodeENC application dialogue box
The ENC data files must have the file extension ‘.000’ to be used with this application.
There are four ways to select the ENC data files:
Having made a file selection, click on the Extract Data button. This will create a batch file called GEBCOENC.bat. Two directories called Data and GEBCO are also created in the application’s directory.
The DecodeENC application opens a ‘DOS’ command window. The GEBCOENC.bat batch file is then executed automatically. As each line in the batch file is executed, the selected ENC data files are reformatted into simple ASCII format files in the Data directory.
Once the batch file has completed, the ‘DOS’ command window will close. You should click on the button in the dialogue box, as requested on screen, to continue the data extraction process.
Once the batch file has completed, each file in the Data directory has the designated features (from the GEO and Meta object class defined above) reformatted into simple ASCII files in the GEBCO directory. Each non-null attribute for the GEO and Meta object classes is retained in these reformatted files along with positional information. Information about the progress of the reformatting process is shown in the dialogue box, as shown in figure 2.
|
Figure 2
In order for GEBCO to make use of the reformatted data, please send the data files in the GEBCO directory to the GEBCO ENC data co-ordinator at the International Hydrographic Bureau, on CDROM or other suitable media.
Toolbar menu options explained
File - Open – select an ENC data file name to extract data from
File - Extract – extract data from the selected ENC data file
File - Exit – exit from the programme
Help - opens up the help file
About – information on the version number of the software
About the DecodeENC application
The DecodeENC application is a user-friendly wrapper for a software program called ogrinfo. This is part of the Open Source Geographic Information System (GIS) tools produced by Frank Warmerdam. This software has not been written by BODC but has proved to be a crucial tool in the reformatting of ENC data. The full software package that the ogrinfo.exe programme is taken from is available on the CDROM in the file FWTools099.exe. This is a self-extracting zip file. A full description and the latest information about this software are available from the following website http://fwtools.maptools.org.
What the DecodeENC application does
Having clicked on the Extract Data button, a batch file called GEBCOENC.bat is created. Two directories called Data and GEBCO are also created in the application’s directory. The DecodeENC application adds the following lines to the GEBCOENC.bat batch file for each ENC file:
ogrinfo.exe -ro fn.000 DEPCNT > Data\fn.DEP
ogrinfo.exe -ro fn.000 COALNE > Data\fn.COA
ogrinfo.exe -ro fn.000 SOUNDG > Data\fn.SOU
ogrinfo.exe -ro fn.000 M_VDAT > Data\fn.MVD
ogrinfo.exe -ro fn.000 M_SDAT > Data\fn.MSD
ogrinfo.exe -ro fn.000 M_QUAL > Data\fn.MQL
Format of the lines in the batch file:
ogrinfo.exe program name
-ro operate in read only mode
fn.0000 ENC file name, where ‘fn’ is the file name
DEPCNT, COALNE, SOUNDG,
M_VDAT, M_SDAT, M_QUAL
GEO or META object class to be extracted from the selected ENC files. The acronyms used are defined in the ‘Data types extracted from ENC files using this application’ section above.
Data\fn.DEP the name and directory location of the simple ASCII file extracted from the ENC file.
The DecodeENC application opens a ‘DOS’ command window. The GEBCOENC.bat batch file is then executed automatically. The batch file will run the ogrinfo software in read-only mode against the ENC file and extract the data for the defined GEO or Meta object classes into a simple ASCII data file located in the Data directory. One file is created for each GEO or Meta object class.
Once the batch file has completed, each file in the Data directory has the designated features (from the GEO and Meta object class defined above) reformatted into simple ASCII format files in the GEBCO directory. Each non-null attribute for the GEO and Meta object classes is retained in these reformatted files along with positional information.
Example
If data is extracted from an ENC file called 1B40401S.000 then in the Data directory the following files will be created:
1B40401S.COA – extracted coastline GEO object class data
1B40401S.DEP – extracted depth contour GEO object class data
1B40401S.SOU – extracted depth sounding GEO object class data
1B40401S.MVD – extracted vertical datum Meta object class data
1B40401S.MSD – extracted sounding datum Meta object class data
1B40401S.MQL – extracted quality of data Meta object class data
In the GEBCO directory the following files will be created:
1B40401S_COALNE.ENC – reformatted coastline GEO object class data
1B40401S_DEPCNT.ENC – reformatted depth contour GEO object class data
1B40401S_M_VDAT.ENC – reformatted vertical datum Meta object class data
1B40401S_SOUNDG.ENC – reformatted depth sounding GEO object class data
1B40401S_M_QUAL.ENC – reformatted quality of data Meta object class data
1B40401S_M_SDAT.ENC – reformatted sounding datum Meta object class data
Please note that a reformatted file is not created in the GEBCO directory if all the attributes for a particular GEO or Meta object class are null.