Boundary files are imported in automation when creating a base map, importing a boundary file, or creating a thematic map. Depending on the file type and boundary properties, the following options may be combined when importing a boundary file.
FILE-SPECIFIC IMPORT OPTIONS
Each specific file type contains options that may be set. See the following links for more details on importing each file type.
Enhanced Metafile [.EMF] Import Options
ER Mapper [.ECW] Import Options
ESRI ArcInfo Export Format [.E00] Import Options
ESRI Shape [.SHP] Import Options
Golden Software Boundary [.GSB] Import Options
Golden Software Blanking [.BLN] Import Options
Golden Software Interchange [.GSI] Import Options
LizardTech MrSID [.SID] Import Options
MapInfo Interchange [.MIF] Import Options
PlotCall [.PLT] Import Options
USGS Digital Line Graph Import Options
USGS SDTS [.DDF] Import Options
Example
This example shows how to import a Golden Software Boundary file and convert areas to curves.
Set BaseMap = Plot.CreateBaseMap(FileName:= mvapp.ApplicationFolder + _
"\Samples\co2010.gsb", Options:= "AreasToCurves=1, PrimaryIDField=2, SecondaryIDField=1", _
AppendImage:= True)
IDs
The following ID and attribute options may be available for an imported boundary file:
Option |
Type |
Description |
PrimaryIDField |
Integer |
Primary ID assignment |
SecondaryIDField |
Integer |
Secondary ID assignment |
Attribute1Field |
Integer |
Attribute 1 assignment |
Attribute2Field |
Integer |
Attribute 2 assignment |
HyperlinkField |
Integer |
Hyperlink assignment |
The number assigned to each ID field corresponds to the list of available IDs in the particular file. The first available ID number is 1, not 0 (zero).
Example
This example shows how to assign IDs to a base map.
Doc.CreateBaseMap(FileName:= InPath$ + " test.gsb", Options:= "PrimaryIDField=2, SecondaryIDField=1,Attribute1Field=2,Attribute2Field=1")
PROJECTION AND INPUT UNIT OPTIONS
If you are creating a base map or importing a boundary file that contains an unknown projection, you may want to define a projection during import. Use the UnknownProjectionTo option to do this. If you decide to change an unknown projection to a defined projection, you need to specify the input data units with the InputDataUnits option.
Option |
Type |
Description |
UnknownProjectionTo |
MVProjectionType numeric value |
Convert an unknown projection |
InputDataUnits |
MVDistUnits numeric value |
Specify input data units |
You must define both the UnknownProjectionTo and the InputDataUnits options with the numeric value for the MVProjectionType and MVDistUnits enumerations.
Example
This example shows how to assign a projection and units to a base map.
Doc.CreateBaseMap( FileName:= InPath$ + " test.gsb", Options:= "PrimaryIDField=2, _
SecondaryIDField=1, UnknownProjectionTo=5, InputDataUnits=4" )
LIMIT IMPORT TO EXISTING MAP
If a map already exists in the map window, you can limit the imported objects to those that are at least partially within the limits of the existing map. This imports the entire object that touches the map limits so the map limits may be slightly adjusted after import.
Option |
Type |
Description |
LimitToExistingMap |
Boolean |
1 to limit to the existing map, 0 to import without limits |
Example
This example shows how to limit the import of a base map to an existing base map.
Doc.CreateBaseMap( FileName:= InPath$ + " test.gsb", Options:= "PrimaryIDField=2, _
SecondaryIDField=1, UnknownProjectionTo=5, InputDataUnits=4, LimitToExistingMap=1" )
STREET FILES
Street map files are imported with File | Import or Map | Base Map in the user-interface. In automation, this feature does not use the import option strings as listed above. Use CreateStreetMap to import these files
See Also