OpenCities Map CONNECT Edition Help

Map Interoperability Key-ins

Some functions of the interoperability system are available through key-ins. However, in some cases, the interface may still need to be used to select features, their properties and to define symbology.

File Based Operations Key-ins

The gdi family of key-ins is used for file based import and export operations.

gdi open to specify a storage name and files or folders for importing.

gdi import to import specific features from a named storage defined by gdi open.

gdi export to export specific features

Import Operations Key-ins

To import SHP, TAB, MIF, Esri File Geodatabase, Oracle and GML, use the gdi open key-in to create a storage name and associate the file or folder to that name. If the storage name, file name or folder names have spaces, enclose the string in double quotes.

gdi open name=STORAGE_NAME file=[file or folder name]

The following are valid examples:

gdi open name=Blocks file=d:/incoming/blocks.shp
gdi open name=Blocks file=d:\incoming\blocks.shp
gdi open name="City Blocks" file=d:\incoming\blocks.shp
gdi open name="City Blocks" file="d:/incoming data/blocks.shp

For Oracle:
gdi open name=STORAGE_NAME user=Oracle User Name password=password server=Oracle service name

An example for Oracle is:

gdi open name=EastCity user=cityGIS password=cityGIS2018 server=orcl
For GML:
gdi open name=STORAGE_NAME storage=gmlstorage file=GML_filename schema=schema_filename

If the schema depends on other non-OGC schemas, they must be resolved by specifying the correct relative path.

Once the storage name has been defined, use the gdi import key-in to invoke the import process. This command specifies the storage name, the feature, and optionally specifies the feature properties, level, color, weight, class, transparency, fill, cell, cell library, scale and more. Refer to the Command Line Options section below.

The gdi import keyin can be used to import previously saved import settings files (IMPX) files. For information on creating IMPX files, refer to the Import Settings File section below.

gdi import d:/incoming/utilities.impx

Command Line Options

To import features from a named storage, use gdi import storage=storage_name options.

To export features use gdi export filename.ext options

To apply an option to a specific feature, preface it with the feature name.

The following options are valid for importing and exporting:

  • feature | features | class | classes=[ feature1 [as newFeature1][, feature2[as newFeature2][, ...] ] – specifies one or more features to import from the data source with option name mapping
  • property | properties | column | columns=[ property1 [as newProperty1][, property2[as newProperty2][, ...]] – specifies which properties to import and optionally specify their name mapping. Property names are case sensitive.
  • where=[where clause] – a simple SQL fragment that filters the data to be imported. Can be prefixed by feature.
  • fence=[true | false]

  • selection=[true | false]

  • view=[view number 1-8]

The following options are valid for importing:

  • level | lv=[name | number]

  • co | color=[0-255 | [r,g,b] with values 0-100 | bylevel | bycell | standardColorName]

  • wt | weight=[integer | bylevel | bycell]

  • ls | style=[integer | bylevel | bycell]

  • elemclass=[primary | construction]

  • priority=[integer]

  • transparency=[double]

  • fill | fillco | fillcolor=[0-255 | [r,g,b] with values 0-100 | bylevel | bycell | standardColorName]

  • filltrans | filltransparency=[double]

  • textstyle=[text style name]

  • pba | textpba=[valid pba expression with square brackets where needed ]

  • cell=[cellName]

  • celllibrary | celllib | lib | library=[cell library file]

  • cellx | cellscalex=[double]

  • celly | cellscaley=[double]

  • cellz | cellscalez=[double]

Import example:

gdi import storage=MyTown feature=MyLots as Lots properties=Name as PropName,Block as PropBlock wt=MyLots:6 where="MyLots:Block = 5 or Block = 6" co=MyLots:1

  • Import a feature MyLots renamed to be Lots from storage MyTown.
  • Import the Name property and rename it PropName.
  • Import the Block property and rename it PropBlock.
  • Set the weight for MyLots to 6.
  • Set the where clause for MyLots to be ="MyLots:Block = 5 or Block = 6".
  • Set the color for MyLots to 1.

Export Operations Key-ins

The key-ins available for import are generally available for export as well. The extension of the file name determines the format. The following extensions are supported:

  • SHP

  • TAB

  • MIF

  • MID

  • CSV

To Export Features

To export features to SHP, TAB, MIF, MID, CSV use the gdi export key-in. For supported options refer to the Command Line Options section.

gdi export file=filename.ext feature=feature options


gdi export d:/outgoing/parcels.shp feature=lots

gdi export d:/outgoing/ features=Blocks,Lots

gdi export d:/outgoing/hydrants.csv feature=Hydrants properties=HydrantID,Drawing

gdi export file=d:/outgoing/Parcels.shp feature=Lots fence=true

To Export GML

gdi export storage=GMLStorage file=filename.xml schema=filename.xsd feature=feature_name options

Refer to the Command Line Options section above to specify options.

To Run a Saved Export Process

The gdi export key-in can run an export process by specifying a previously saved export settings file.

gdi export file=file.expx options

If the saved Spatial Critera in the settings file was set to All, the gdi export key-in can overwrite that by specifying a fence or view. Refer to the Command Line Options section above.


gdi export file=Parcels.expx fence=true

Interoperability Key-ins

Key-in Required arguments Optional arguments Notes
GDI IMPORTEXPORTS - hide show toggle Hides, opens or toggles the Map Imports/Exports dialog.
GDI NEW IMPORT - directory file gdb gmlfile oracle sqlserver wfs Creates a new import node in the Map Imports/Exports dialog for the specified format The following are read only: Oracle, SQL Server, WFS and Esri File Geodatabase.
GDI NEW EXPORT - csfile gdb gml miffile shpfile tabdir tabfile Creates a new export node in the Map Imports/Exports dialog for the specified format.
GDI OPEN name=storageName file=file or folder name name=storageName user=OracleUser password=OraclePassword server=OracleServiceName schema=fileName Opens the specified file or folder and associates it with a storage name. Examples:
  • gdi open name=Blocks file=d:/incoming/blocks.shp
  • gdi open name=mytown file=$(_USTN_WORKSPACEROOT)Projects\Examples\Geospatial\mytown\imp
  • gdi open name=STORAGE_NAME user=Oracle User Name password=password server=Oracle service name
  • gdi open name=PARCELS user=JIM password=FOO server=ORCL
  • gdi open name=STORAGE_NAME storage=gmlStorage file=GML_fileName schema=schema_fileName

Schema refers to the schema belonging to GML file to be imported. Note that if this schema depends on other schemas (not OGC-related), they must be resolvable. This can be done in two ways:

  1. Includes and imports to schemas on the web (http)
  2. All those schemas are supplied as well, and includes and imports have correct relative paths to them.
The file or folder name cannot have spaces.
GDI CLOSE name=storageName Closes the named storage.
GDI INFO name=storageName Provides class information for the open storage in the Message Center.
GDI IMPORT storage=storageName feature=featureName file=fileName Additional options: Refer to "Command Line Options" above Imports the open storage. To import a saved import: gdi import file=fileName.impx
GDI EXPORT file=fileName.ext feature=featureName The extension of the file name determines the format. The following extensions are supported: SHP, TAB, MIF, MID, CSV

Example: gdi export file=buildings.shp feature=eastcity_buildings

To export a saved export process: gdi export file=fileName.expx [fence=yes] [view=viewNum]

To export as GML: gdi export storage=GMLStorage file=mygmlfile.xml schema=myschemafile.xsd feature=featureName

To export as GML and define decimal precision: gdi export storage=GMLstorage PrecisionFormat=F3 file=c:\temp\ThreeDigit.gml

Where: precision format can be: F0, F1, F2, F3, F4, F5

Refer to:

GDI TIME - - Displays the current date and time in the Message Center

Note: Make sure there are no spaces before and after the = sign in the above keyins.