USGS Digital Line Graph .DLG, .LGO, .LGS Import Automation Options

 

When the program is driven from an automation script, an options string can be specified in the script that acts as the import options dialogs do in the program. The string consists of comma-separated parameters, which specify the behavior of the various import options.

 

Parameter

Type

Description

Filter

string

DLG

AllAreas

1 or 0

Whether to consider all images when processing the dlg file. 1 does not use all images. 0 does.

AllLines

1 or 0

Whether to consider all lines when processing the dlg file. 1 does not use all lines. 0 does.

AllNodes

1 or 0

Whether to consider all nodes when processing the dlg file. 1 does not use all nodes. 0 does.

AreasToCurves

1 or 0

Whether to convert areas to closed curves. 1 does not convert areas to curves. 0 does.

AttribSelListBox

1 or 0

Whether to use an attribute list or a range selection. 1 uses a range selection. 0 uses an attribute list.

Deviation

Number

Set the deviation angle to any number. Default to 0.0.

FreeLines

1 or 0

Whether to consider only free-standing lines when processing the dlg file. This is related to the AllLines option. 1 does not use free standing lines. 0 does.

FreeNodes

1 or 0

whether to consider only free-standing nodes when processing the dlg file. This is related to the AllNodes option. 1 does not use free standing nodes. 0 does.

IDSel

Blank or range of integers

Only consider entities with IDs in the specified range. Default is to leave it blank.

MajorSel

Blank or  range of integers

Only consider entities with Major Attributes numbered within the range. Default is to leave it blank.

MinorSel

Blank or range of integers

Only consider entities with Minor Attributes numbered within the range. Default is to leave it blank.

NoMapFrame

1 or 0

Whether to consider the area that makes up the map frame when processing the dlg file. 1 does use the map frame. 0 does not.

Projection

0, 1, 2

0 = coordinates are UTM or Albers Equal Area projected. This is the default.

1 = coordinates are converted to Lat/Long.

2 = coordinates are not projected.

Synthesize

1 or 0

Whether to synthesize the IDs for nodes, areas and lines. 0 does not synthesize the IDs. 1 does.

ThinAuto

1 or 0

Whether to automatically thin the vertices. 0 does not automatically thin. 1 does.

 

Example 1

This example shows how to import a USGS LGS file with the various options on single line.

 

CommandApi.Construct("Import")

  CommandApi.Option("GuiEnabled", "False")

  CommandApi.Option("ProgressEnabled", "False")

  CommandApi.Option("UndoRedoEnabled", "True")

  CommandApi.Option("AutoConnect", "True")

  CommandApi.Option("ClearOptions", "False")

  CommandApi.Option("Filter", "dlg")

  CommandApi.Option("Options", "AllAreas=4;AllLines=0;AllNodes=0;AreasToCurves=8;AttribSelListBox=0;Deviation=0.0;FreeLines=32;FreeNodes=0;IDSel=;MajorSel=;MinorSel=;NoMapFrame=2048;Projection=0;Synthesize=0;ThinAuto=1024")

  CommandApi.Option("Path", "C:/Path/To/Import/file.lgs")

  CommandApi.Option("PersistOptions", "True")

CommandApi.Do()

 

Example 1

This example shows how to import a USGS DLG file with the various options on multiple lines.

 

CommandApi.Construct("Import")

  CommandApi.Option("GuiEnabled", "False")

  CommandApi.Option("ProgressEnabled", "False")

  CommandApi.Option("UndoRedoEnabled", "True")

  CommandApi.Option("AutoConnect", "True")

  CommandApi.Option("ClearOptions", "False")

  CommandApi.Option("Filter", "dlg")

  CommandApi.Option("Options", "AllAreas=4")

  CommandApi.Option("Options","AllLines=0")

  CommandApi.Option("Options", "AllNodes=0")

  CommandApi.Option("Options", "AreasToCurves=8")

  CommandApi.Option("Options", "AttribSelListBox=0")

  CommandApi.Option("Options", "Deviation=0.0")

  CommandApi.Option("Options", "FreeLines=32")

  CommandApi.Option("Options", "FreeNodes=0")

  CommandApi.Option("Options", "IDSel=")

  CommandApi.Option("Options", "MajorSel=")

  CommandApi.Option("Options", "MinorSel=")

  CommandApi.Option("Options", "NoMapFrame=2048")

  CommandApi.Option("Options", "Projection=0")

  CommandApi.Option("Options", "Synthesize=0")

  CommandApi.Option("Options", "ThinAuto=1024")

CommandApi.Option("Path", "C:/Path/To/Import/file.dlg")

CommandApi.Option("PersistOptions", "True")

CommandApi.Do()

 

Used by: Import

 

 

See Also

Automation Model