DLG Codes Explained

DLG attribute codes were developed by the U.S. Geological Survey to classify features in their DLG (Digital Line Graph) data files. Water-GIS Hydrography is based on these DLG files, and uses the same DLG attribute codes. DLG codes exist for many types of features including hydrography, transportation, and hypsography (elevation contours). Water-GIS Hydrography uses only hydrography DLG codes.

  • Each arc (line) and polygon (area) object in a data layer has four "code pairs." These code pairs identify and describe the hydrography feature that a particular object is a part of.
  • Each code pair consists of two parts, a "major code" and a "minor code." The two parts are separate items (fields) in the attribute tables, so each attribute table has eight items to represent the four code pairs.
  • In the graphic at left, "Major1" and "Minor1" represent one code pair, "Major2" and "Minor2" represent a second code pair, etc.
  • Each row under the code pair headings contains the actual attribute codes for one object (arc or polygon). Each code pair contains one attribute code, split into major and minor parts.
  • Each object can have between zero and four attribute codes, one per code pair . Values of -99999 indicate a "null" value. This means that there is no attribute code for that particular code pair. -99999 is the same as a blank item.
  • In the graphic at left (and in Water-GIS Hydrography), major codes have two digits and minor codes have three or four digits. These are not true DLG code pairs. A true DLG code pair always has three digits for the major code and four digits for the minor code, separated by a period. The reason for this discrepancy is that many DLG codes start with a zero, but the leading zeroes have been dropped in processing. The leading zeroes must be assumed for codes that are not the correct length. For example, the true DLG code pair representation for the first row (in yellow) would be 050.0421 (reading the -99999 items as blank).
  • See "DLG Code Format" below for information on how to interpret DLG code pairs.

DLG Code Format:

DLG Codes Lookup