Summary
Converts a Standard or Optional formatted Digital Line Graph (DLG) file to a coverage.
Usage
Topology data contained in the DLG file is ignored. You can use the Build tool after running Import From DLG, creating topology on the newly created coverage. Sometimes the coverage will have arc intersections and will need to be cleaned using the Clean tool.
The feature attribute table NAT is automatically created and does not require an additional build for nodes.
The Output Coverage may require editing before polygons or lines can be built and feature attribute tables created. For example, checks should be made on the output coverage to ensure that label points occur within their polygons, arcs match at nodes, polygons close, arcs do not cross, and so on.
Feature numbers in the DLG area (A) records become label point User-IDs for polygons; feature numbers in line (L) records become User-IDs for arcs in the output coverage. The same User-IDs are written to the INFO table output coverage.ACODE and output coverage.PCODE.
The CODE files, output coverage.ACODE and output coverage.PCODE, hold line attribute codes and polygon attribute codes.
The DLG feature numbers for node (N) records become User-IDs for nodes in output coverage. There is no corresponding CODE file for node attributes. The User-IDs and attribute codes for node (N) records are stored directly in the output coverage.NAT feature attribute table.
For the Output Point Coverage, the DLG feature numbers in degenerate (zero-length) line (L) records become User-IDs for points in the Output Point Coverage. An Output Point Coverage.XCODE is created to hold degenerate line (L) attribute codes.
CODE files for a particular feature class are only created if feature attributes are found in the DLG.
The fields in the CODE files consist of a Cover-ID, major and Minor fields. The Cover-ID is each feature's unique identifier. MAJOR1 is the first major feature code in the DLG; MINOR1 is the first minor code. There are as many major/minor pairs in the table as the maximum number of pairs for that feature class in the DLG. If no value appears for a particular code, it will be set to -99999.
Import From DLG writes the projection parameters stored in the DLG file to a projection definition file (PRJ) stored in the output coverage subdirectory.
DLG header records may contain parameters of a transformation that are used to convert the internal file coordinates to the ground coordinate system. Import From DLG will automatically apply any transformation parameters found in the header records to the feature coordinates and control points (in addition to any specified shift).
The header records in the DLG file provide information used to determine the tic locations of the output coverages.
If the fields used to store control point information are blank, Import From DLG will generate tics for the output coverages.
DLG files usually provide four control points representing the four corners of the map area in the same map coordinate system used to store geographic features. Any transformation or x,y shift applied to the feature coordinates will apply to the control points as well.
A DLG category is equivalent to a layer.
Usually, only one category is included in a DLG file; however, some DLGs contain more than one category.
Categories are listed in DLG header records. Use of the tool's DLG Category parameter enables you to create a set of coverages for other layers or categories contained in the DLG.
The coordinate precision of the output coverage is determined by the current creation rule. If the precision setting has not yet been established during the current session, then the creation rule will be Single. This means the Import From DLG tool will create an output coverage in single precision. (Coordinate values in DLG files have a format definition of F12.2.)
Join Info Tables can be used to merge each coverage feature attribute table with the DLG code files—INFO table PCODE to Output Coverage.PAT, ACODE with Output Coverage.AAT, and XCODE with Output Point Coverage.PAT.
Syntax
DLGArc(in_dlg_file, out_cover, {out_point_cover}, {area_calculation}, {x_shift}, {y_shift}, {category})
Parameter | Explanation | Data Type |
in_dlg_file | The DLG file to be converted to a coverage. | File |
out_cover | The name of the coverage to be created from the DLG data. If the input DLG file contains data produced by the United States Geological Survey (USGS), the output coverage will usually contain line, polygon, and node features created from nondegenerate line (L) records, area (A) records, and node (N) records. An Output Coverage.NAT for node features will be created. This is the only feature attribute table that is created by Import From DLG. An INFO table named Output Coverage.ACODE will be created that contains the major/minor pair values for all line (L) records. Similarly, an INFO table named Output Coverage.PCODE will store the major/minor codes for area (A) records. | Coverage |
out_point_cover (Optional) | The name of an Optional point coverage to be created from degenerate line (L) records in the DLG. In a DLG, points are stored as zero-length arcs (that is, degenerate lines). These are optionally converted to points by specifying an output point coverage. An INFO table named Output Point Coverage.XCODE will be created, which contains all major and minor code pair values for degenerate line (L) records. No coverage will be created from degenerate line records unless an Output Point Coverage is specified. | Coverage |
area_calculation (Optional) | Determines how the area (A) records are written to the output coverage.
| String |
x_shift (Optional) | A constant value to be added to all x coordinates during DLG conversion. The default X Shift value is zero. | Double |
y_shift (Optional) | A constant value to be added to all y coordinates during DLG conversion. The default Y Shift value is zero. | Double |
category (Optional) | The optional name of a specific DLG category to be converted from the DLG file. Only the specified category will be converted if one is given. Otherwise, only the first category in the DLG will be written to the output coverages: output coverage, point coverage. | String |
Code sample
DLGArc example (stand-alone script)
The following stand-alone script demonstrates how to import a coverage from DLG format.
# Name: DLGArc_Example.py
# Description: Imports from DLG format to a coverage
# Requirements: ArcInfo Workstation
# Import system modules
import arcpy
from arcpy import env
# Set environment settings
env.workspace = "C:/data"
# Set local variables
inDlgFile = "509954.PL.opt.dlg"
outCover = "C:/output/954netcov"
outPointCover = "C:/output/954pointcov"
# Execute DLGArc
arcpy.DLGArc_arc(inDlgFile, outCover, outPointCover, "", "", "", "")
Environments
Licensing information
- Basic: No
- Standard: No
- Advanced: Requires ArcInfo Workstation installed