The read_dlg user macro reads DLG (.dlg) format files and outputs a group structure containing this data.
Name | Type | Description | UI Control |
filename | string | Name of the DLG file to be read. | File Dialog |
Name | Type | Description | |
out | DlgData | group representing the DLG data read from the file. | |
file_info | string | Meta-data about the read DLG file. | |
The read_dlg user macro reads DLG data files. DLG is a digital line graph system for the storage of vector GIS data. A DLG file specifies areas and shapes. The reader module parses this file, and populates a DLG data structure in AVS/Express. This group structure is called DlgData. A further processing macro, outline_dlg, converts this data structure into AVS/Express field data containing a polyline cell-set. The outline_dlg macro also outputs a directly renderable DataObject. The read_dlg user macro expects the input DLG data to be in ASCII format.
The United States Geological Survey (USGS) Digital Line Graph (DLG) format stores line map information in a digital form. DLG files include information on planimetric base categories, such as transportation, hydrography, and boundaries. More information on Digital Line Graph data can be found on the DLG Geospatial Data clearing-house page. You can also look at the Digital Line Graph standard.
filename
String parameter that contains the name of the DLG file that should be read. The filename can either by relative or absolute and it can contain AVS/Express environment variables (i.e. $XP_ROOT, $XP_PATH<1>).
out
A custom group of DlgData type representing the data read from the DLG file. This DlgData can be converted into AVS/Express field data by the outline_dlg user macro.
file_info
A string output that contains general information read from the DLG file. This is intended to give background about the read DLG file and be displayed to the user.
The functional macro ReadDlgFunc uses the low-level module ReadDlgCore. This functional macro and the ReadDlgUI user interface macro are used by the read_dlg user macro. None of these macros uses a parameter block.
The project includes the DlgTookitEg example application that demonstrates how the three user macros can be used. The read_dlg macro is used to read a sample DLG file. An example DLG file containing the boundaries of Florida is included. The outline_dlg macro is used to convert the read data into field data that can then be displayed on a 2D viewer. Finally the write_dlg macro can be used to write the DLG data back to a file.
iac_proj/dlgtools/read/rd_mods.v contains the V definition of the ReadDlgCore module.
iac_proj/dlgtools/read/rd_macs.v contains the V definitions of the ReadDlgUI UI macro, the ReadDlgFunc functional macro and the read_dlg user macro.
The low-level module implementation makes use of a set of header definitions and utilities to aid further module development. These are contained in the dlg.h and gen_proc.h header files. Part of this module implementation is support for the XP_DEBUG environment variable. Setting the XP_DEBUG to 1 will cause the module to report a great dealing of debugging information.
The low-level ReadDlgMods library containing the low-level module ReadDlgCore does not specify a process. By default the express process will be used.
anonymous
Jens Lorenz, Manchester Visualization Centre Andrew Dodd, International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL