Open Data Export Centre dialog

The Open Data Export Centre allows you to export data from InfoWorks WS Pro in a variety of formats. These are:

You can map the fields in the master database onto specific fields in the output files. Data can be manipulated using SQL or VBScript during the export process.

You can export:

The Open Data Export Centre can be opened in several different ways:

Note: In the Select version and scenario dialog, select the scenario that you want to export from the drop-down menu and then click OK.

ClosedShow image

Open Data Import Centre

Item Description

Table to Export Data From

Table dropdown list

For selecting a table to export data from.

Unlike the Open Data Import Centre, this does NOT include arrays within tables. These are handled in a different way by the Export Centre.

There are two additional options - All Nodes and All Links. If these are selected then all nodes and all links will be exported, or all selected nodes or links if the Selection only option is selected. If either of these options is selected then all fields available for one or more node or link types will be available. If a field is selected in the field list which is not available for one or more node or link types, then that field will be blank whenever a node or link for one of those types is exported.

Selection Only

Enabled if the network / results are open in a GeoPlan.

If checked, exports the current selection only.

Time For Results

Choose Time button

Enabled if the Open Data Export Centre is invoked by right-clicking a simulation when the results are not currently open in a GeoPlan.

(If the results are currently open in a GeoPlan, the button will be disabled and the current time displayed in the GeoPlan will be used.)

Selects the time for which results values will be exported.

Time

Time for which results values will be exported.

If the results are currently open in a GeoPlan, this will be set to the current time displayed in the GeoPlan.

Export Data To

Export Type

For selecting the type of data file to which you want to export your data.

The ESRI Shape files and MapInfo MIF file options are available regardless of which GIS component you are using within InfoWorks WS Pro.

The Personal GeoDatabase option will only be available if you have a licenced copy of the ESRI software on your computer.

File

For entering the name of the file to which data is to be exported. Either type in the path of the file or use the ellipsis button to browse for the file location.

When exporting to an Oracle database, this will display the Select Oracle Data dialog.

Feature Class

Enabled when exporting to Jet Database, Oracle Database, Personal GeoDatabase or XML.

JET Database

The Feature Class box corresponds to the table in the database.

When the export is performed, if the JET database does not exist it will be created and the table added. If the database already exists, the table will be added to the existing database.

Existing tables cannot be replaced or updated.

Oracle Database

Type the name of the Feature Class to which data is to be exported into this box.

When the export is performed, if the Oracle Feature Class does not exist, it will be created and the Feature Class added.

An existing Feature Class can also be selected for updating. Only tables for which the user has the appropriate updating permissions in Oracle will be available for selection.

See the Exporting data to Oracle topic for further information.

Personal GeoDatabase

Type the name of the Feature Class to which data is to be exported into this box.

When the export is performed, if the Geodatabase (or Feature Dataset if it is specified) does not exist, it will be created and the Feature Class added. If a Feature Dataset is specified, and exists, the Feature Class will be added to the existing Dataset.

An existing Feature Class can also be selected for updating when browsing for a Geodatabase from the File field.

See the Exporting Data to GeoDatabase topic for further information.

XML

The Feature Class is used to define the top level tag defining the start and end of the exported data. See the Exporting Data to XML topic for further information.

Feature Dataset

Enabled when exporting to Personal GeoDatabase or XML.

Personal GeoDatabase

You can type the name of the feature dataset to which data is to be exported into this box. You will also need to define a feature class.

When the export is performed, if the Geodatabase does not exist it will be created and the feature dataset and feature class added. If the database already exists, the feature dataset will be added to the existing database.

An existing Feature Dataset can be selected when browsing for a Geodatabase from the File field.

See the Exporting Data to GeoDatabase topic for further information.

XML

The Feature Dataset is used to define the second level tag defining the start and end of exported data for a single object, such as a node or a link. See the Exporting Data to XML topic for further information.

ArcSDE Keyword

This is the Output CONFIG keyword used when importing data to ArcSDE via a script. Look up OutputCONFIGKeyword in the ArcGIS help.

Script File (optional)

Scripts can be used to refine the export process. This is an advanced option. See Using a script to control export of data for more information.

Units Behaviour

User - exports values using the current display units.

InfoWorks - exports values as InfoWorks WS Pro native units.

Field Mapping Configuration buttons

Used to apply saved mappings to the field mapping grid.

Load Config

Loads the grid settings from a configuration (CFG) file.

Save Config

Saves the grid settings to a configuration (CFG) file. Grid settings for all tables will be saved.

Note: Only settings for the grids and Updating Options settings are saved. Other dialog options should be set to appropriate values before export.

Clear Config

Clears the settings of the currently displayed grid.  Settings for other tables will be retained.

Auto-Map

Populates the field mapping grid with all available fields for export, excluding flag fields.

This will include all the available fields for the object available in the pull down list, including joined fields and results fields if appropriate.

Auto-mapping will not allow you to map fields in arrays stored within a network object. You will have to use the Add Row button and map these fields manually. See the Exporting array data topic for more information on array fields.

Titles for the fields are automatically generated. If you hit one of the Auto-Map buttons with ESRI Shape files as your selected output, the names will be truncated to the maximum allowable length for Shape files. If you use Auto-Map, and then change the output type to Shape files later, the field titles may be too long for export.

Note: This list can easily get very large, particularly if you select All Nodes and/or All Links. Including all possible fields for all object types (including joined and results fields) could easily exceed the number of columns that can be displayed in Microsoft Excel or ArcView 3 for example.

Auto-Map (with flags)

As Auto-Map, but with flag fields included.

Field Mapping Grid

The field mapping grid allows the mappings for individual data fields to be set up.

The grid contains a variable number of columns. Some columns only appear for some data types, and some columns will be disabled depending on the values of other columns.

Column Description

Export Field Name

The name used for the column, either in the database or file for GIS or database files, or in the first row for CSV and tab separated data files.

If this field is left blank, a sensible name will be generated when the file is exported. Therefore you only need to put something in here if you do not like the default value.

Field Type

Field

A value from a field in the database for the object being exported, for example name, x coordinate, y coordinate

SQL

An SQL expression that can be evaluated and return a value.

Constant

A constant value – a value that you choose that will be the same for every object in the table.

This is typically useful if you:

  • want to import the data into some other system and want to import a value that is the same for everything in this particular table
  • need such a value for a report
  • want a placeholder that you can then replace with an Excel formula

Special

There are only a few special values:

  • simulation time if you are exporting results
  • the table name for the object being exported - the internal version of the name
  • the table description - a user friendly version of the table name

These are likely to be particularly useful if you are exporting things of more than one type, such as All Nodes or All Links

VBScript

A VBScript function from the loaded BAS file can be executed

Geometry

The geometry type (e.g. point, polyline, polygon) of the object being exported.

Applicable to Geodatabase only.

Data Type

The data type column allows you to override the normal export data type for this data field.

This column is hidden for comma and tab separated variable files. Data is always exported to these file types as text.

The possible data types are:

  • Boolean
  • Date
  • Text - up to 100 characters
  • Memo - text type field normally used for strings longer that 100 characters. Can hold about 10,000 words
  • Short - 2 byte integer
  • Long - 4 byte integer
  • Single - 4 byte floating point
  • Double - 8 byte floating point
  • GUID

By default, fields are exported in the same format as they are held in InfoWorks WS Pro. These formats are predominantly Text and Double.

You can choose to export any field in any format. If you try to export a string that cannot be represented as a number in one of the number formats, you will get a warning message after the export. You will get a warning message for every failure, so if you have a long list of objects it could be a long list.

It may be perfectly legitimate for you to export text fields as numbers. For example, if:

  • your node IDs are all numeric
  • you have stored numbers in the user text fields

If you export a text or numeric field as a Boolean value, the Boolean value will be set to true if:

  • a string field is not zero length
  • a numeric field has a value and the value is not zero

Otherwise, the Boolean will be set to false.

Length

Applicable to fields of Data Type Text only.

This column is hidden for comma and tab separated variable files.

The default length for text fields is the maximum length of the field in InfoWorks WS Pro. If you are exporting something using SQL or VBScript into a text field, InfoWorks WS Pro scans the exported text, and sets the length of the longest string as the default.

If you choose a length for a text field and try to export strings that are longer than this maximum, the exported text will be truncated and you will receive a warning for each occurrence.

Precision

Applicable to fields of Data Type Text only.

There are two reasons for changing the default precision:

  • InfoWorks WS Pro may store a value at a higher precision than you want to export.
  • If you are calculating the value with VBScript or SQL, InfoWorks WS Pro cannot calculate a sensible precision for the value. It is up to you to set an appropriate precision.

Internal Field (or other data)

The entry in the Internal Field column will vary depending on the value selected in the Field Type column.

Field Type Description

Field

The dropdown list contains all the available fields. These fields include:

  • fields for the selected object type
  • fields for any object that can be "joined" to the selected object type

For example, joined fields may include:

  • the upstream and downstream nodes for a link
  • simulation results if results are loaded
  • simulation results at a joined object such as upstream and downstream nodes of a link

You are also allowed to export fields from arrays. This is the tabular data that can only be viewed in grids on an objects property sheet.

Constant

For entering a constant value.

SQL

For entering an SQL expression.

VBScript

For choosing one of the available functions in the loaded script file.

Special

A set of special values to choose from.

SimulationTime - simulation time if you are exporting results

TableName - the table name for the object being exported - the internal version of the name

TableDescription - a user friendly version of the table name

Geometry

Disabled for this field type. The geometry type of the object will be exported.

Applicable to Geodatabase only.

Add Row

Adds a row to the field mapping grid to allow another field to be specified.

Use report mode for arrays

When exporting a value array, all the data values are exported. There are two methods of organising exported value data, and these are controlled by this check box.

When exporting a structure array to XML, the check box controls the format of this exported array.

For further information, see the Exporting array data topic.

Updating and Delete Options

The Updating options apply when exporting to Personal Geodatabase or Oracle only.

The options will be enabled if an existing feature class is selected in the Export Data To section of the dialog. See the Exporting data to GeoDatabase and Exporting data to Oracle topics for further information.

Update Based On

For selecting the field(s) to be used to locate objects to be updated in the specified feature class.

Asset ID

Used to locate objects in the feature class.

Primary Key Field(s)

Used to locate objects in the feature class, for example

  • Nodes - Node ID
  • Links - From Node ID, To Node ID, Suffix

Geodatabase OID

Applicable to Geodatabase only.

You can use the field in the Internal Field column of the Field Mappings Grid with the Export Field Name of OID to locate objects in the feature class.

Row objects where the value in the specified Internal Field matches the Geodatabase OID will be updated. If the Internal Field value of an object does not match the Geodatabase OID, it will be treated as a new object.

Only Update Existing Objects

If checked, updates only objects that exist in the specified feature class.

If this box is unchecked, objects that do not exist in the specified feature class will be added.

Delete Missing Objects

If this option is checked, InfoWorks WS Pro will search for missing objects of the relevant type and delete them from the external data table at the end of the export process. (A missing object is an object that is in the external data source table but is NOT in the InfoWorks WS ProTable To Export Data From.)

The update key selected from the Update Based On dropdown will be used to search for missing objects.

All missing objects found will be listed and a prompt for confirmation of deletion will be displayed before any objects are deleted.

Export

Validates the field mapping grid and then does one of the following:

  • exports the data if there were no errors or warnings
  • brings up a list of warnings and asks you if you want to continue, and then exports the data if you say yes
  • brings up a list of errors and possibly some warnings – typical errors include:
    • loading a configuration containing results fields when you do not have results open
    • loading a configuration containing VBScript fields but not loaded the script

Once the data is exported, any errors encountered are displayed in a dialog


Exporting SQL expressions

Exporting array data

Exporting data to XML

Exporting data to GeoDatabase

Exporting data to Oracle

Using a script to control export of data