Importing data from CSV Files / Updating a network with CSV files

Files in CSV format can be used to import data onto a network, either to build a network from scratch or to update it.

This topic will take you through the CSV import of a new estate onto the example network. Network update by CSV can be performed in the same way and will not be illustrated here.

The example network covers a mainly urban region and includes a large number of nodes and links. This topic illustrates the addition of further nodes and links for a potential new housing estate on the west of the main urban area. The data for the additional objects is held in the form of a CSV file, which will be imported into the existing network.

This stage assumes that you have started InfoWorks WS Pro and that the Model Group window is open, showing the Newtown icon.

The tutorial dataset uses InfoWorks WS Pro native units (metric units). To import the tutorial data correctly, set the user units to metric by selecting Options from the Tools menu and clicking the Metric (Native) button on the Units tab.

Let us take the example of the Newtown Network network.

To import data from a CSV file:

  1. Create a new branch of the network. Right-click the network in the model group window and select Show commit history. Select the latest committed version in the list and click Branch on the right. Name the new network appropriately and click OK. Close the Commit history dialogue.

    ClosedShow image

    New Branch of a network

  2. Set the coordinate system to British National Grid [EPSG 27700].
    • To set the coordinate system, first use Tools | Options to set MapXtreme as the map control on the GeoPlan page of the Options dialog, then use GeoPlan | Set coordinate system to choose British National Grid [EPSG 27700] as the projection.
  3. Display the background map, that is make roads, building and general features visible on the GIS Layer Control dialog:
    1. Click the Go to XY Coordinates (Go to XY Coordinates) button. Type in 452289 for X and 159183 for Y.
    2. If required, click once or twice on the Zoom in button of the dialog to get the desired zoom level.
    3. Click OK. This takes you close to the new estate which is shown on the map but currently there are no nodes or links serving it.
    4. Right-click the GeoPlan and select Layer control.
    5. Click the Visible box for the Roads, Building and General layers.
    6. Click OK. If there are no background layers, you will need to add these layers. (The layers are in the tutorial data.)
  4. ClosedShow image

    New Estate isolated from the network

  5. Import the new part of the network from the CSV file:
    1. Select Network | Update from CSV files. The import dialog is displayed.

      ClosedShow image

      Import / Update from CSV Data dialog

    2. The defaults are acceptable, so click OK. You are asked to select a CSV file to import.
    3. From the Example Data Directory, select Tutorial Files/Import Files/CSV Updates/NewEstate.csv and click Open.

      ClosedShow image

      Open CSV File

      The CSV file is imported. You can see the nodes and links being added to the network as they are imported.

      ClosedShow image

      New Estate isolated from the rest of the network

    4. You are given the opportunity to import another CSV file. Click Cancel.

      A window is displayed, detailing the number of objects (nodes, pipes and customer points) that have been created. The screenshot below shows an example of results of CSV update window.

      ClosedShow image

      Results of CSV update

      Close this dialog.

    5. Switch off the display of the background map(s).

      You can now see that the imported data forms a small network connected to the existing network.

      ClosedShow image

      Imported Network

  6. Run Excel and open NewEstate.csv. From this you can easily apprehend the structure of the CSV file, and look at the imported data in more detail. Close Excel when you have finished inspecting the data. ClosedThe sample data also illustrates how easy it is to create a CSV file for import into InfoWorks WS Pro.

    ClosedShow image

    CSV file opened in Excel

  7. Commit the network updates to the master database.
    • If there are still some gaps within the data, you may need to add some nodes and links that could have been omitted from the CSV import.

Back Back to flowchart


Related Topics button