write_dlg

WARNING

The write_dlg user macro and associated modules do not currently work correctly. The DLG files written by this macro cannot be read by the read_dlg macro or by other external software. The source code to this module is provided so that if user wishes they can attempt to correct this problem. However by default all the data output components contained in this project have been disabled and should not be used.

Synopsis

The write_dlg user macro takes a group structure as input and writes DLG (.dlg) format files that contain this data.

Input Ports

Name Type Description

in DlgData group representing the DLG data to be written.

Parameters

Name Type Description UI Control

filename string Name of the DLG file to be written. File Dialog

Description

The write_dlg user macro writes 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 writer module takes a DlgData group structure, parses the data contained in this group and writes a DLG file that contains this data. The DLG file that is written is in ASCII format.

The DlgData group structure is output by the read_dlg user macro. None of the other macros provided with this project alter the DlgData structure. Therefore unless the user alters the DlgData structure themselves the output DLG file will contain the same data as the input DLG file.

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.

Inputs

in

A custom group of DlgData type representing the data that should be written to the DLG file.

Parameters

filename

String parameter that contains the name of the DLG file that should be written to. The filename can either by relative or absolute and it can contain AVS/Express environment variables (i.e. $XP_ROOT, $XP_PATH<1>).

Utility Macros

The functional macro WriteDlgFunc uses the low-level module WriteDlgCore. This functional macro and the WriteDlgUI user interface macro are used by the write_dlg user macro. None of these macros uses a parameter block.

Example

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.

Files

iac_proj/dlgtools/write/wr_mods.v contains the V definition of the WriteDlgCore module.

iac_proj/dlgtools/write/wr_macs.v contains the V definitions of the WriteDlgUI UI macro, the WriteDlgFunc functional macro and the write_dlg user macro.

Other Notes

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 WriteDlgMods library containing the low-level module WriteDlgCore does not specify a process. By default the express process will be used.

Author

anonymous

Modifications

Jens Lorenz,
Manchester Visualization Centre
Andrew Dodd,
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also