(Legacy Archive) Shapefile Connections In WaterCAD and WaterGEMS


Product(s):WaterCAD, WaterGEMS
Version(s):07.00.XX.XX
Area:Modeling

NOTE: This is a legacy article written for WaterCAD and WaterGEMS Version 7.0 from 2006. The current releases of these products do not use the same steps. See article in the "See also" section if you are using V8 XM, V8i or CONNECT Edition.


WaterCAD and WaterGEMS Version 7 allow modelers to build a water model directly from GIS data in shapefile format. This article explains how to build to a model from shapefiles. (WaterGEMS with the ArcGIS interface also has a tool called ModelBuilder with which you can build a model from shapefiles, databases, spreadsheets, and geodatabases as well.)

Shapefile connections

GIS data in shapefile format can be imported using shapefile connections in WaterCAD/WaterGEMS (Modeler/CAD Interface) by selecting File>Import>Shapefile or by File>Synchronize>Shapefile Connection. You can define a shapefile connection and specify the source shape file in the Shapefile Connection Wizard as you step through it.

The first step is to select the modeling element that you would like to bring into your water model. Ideally, there should be a separate shapefile for each modeling element that is imported - Pressure Junction, PRV, PSV, TCV, GPV, FCV, Tank, Reservoir & Pumps (all node elements) and Pressure Pipe (link element). The next step is to specify spatial connectivity.

Specifying spatial connectivity in shapefile connection

To create a pipe from an external files such as shapefiles, the pipe must have a start node and stop node associated with it. Typically, these connectivity associations are created by synchronizing the + Start Node and + Stop Node attributes of the pipe. Since a shapefile contains spatial data, it is also possible to establish these associations based on the location of nodes relative to the end points of the pipe. The following options in the Shapefile Connection Editor (Figure 1) allow you to customize this behavior:

* Establish by Spatial Data- Check this box to configure the synchronization so that any missing connectivity data (start node, stop node, or both) for a pipe will be established from the spatial data if possible.

* Tolerance - This value represents the distance to be searched when trying to locate nodes for establishing connectivity for a pipe. All nodes within the tolerance of a pipe's end point will be collected, and the closest node will be selected for connection.

* Create Nodes if None Found - Check this box to have nodes created during the synchronization when no nodes are found within the specified tolerance of a pipe's end point. If this box is not checked, and no nodes are found within the tolerance, the pipe will not be created because it has insufficient connectivity data.


Figure 1

Note: Make sure that the shapefile types are simple shapefiles: Point, Polyline, and Polygon. There are other shapefile types - for example, Polyline ZM, Point ZM, and Polygon ZM shapefiles - that cannot be used for Shapefile Connections, although they can be used to build a model using the ModelBuilder tool available for WaterGEMS. These shapefile types can be converted to simple shapefiles (so the data can be imported using the method described here) using tools available in ArcGIS-ArcToolBox.

Import Shapefile Link Editor

In this step, the wizard lets you specify the source shapefile and the unique Label field present in the shapefile. This field is mandatory for any model element that is imported and there should not be duplicate entries. It is shown in Figure 2.

 


Figure 2

The Field-Link Editor allows matching of different attributes from the shapefiles to the attributes present in WaterCAD/WaterGEMS. This is also when you specify the spatial connectivity explicitly for node elements (X, Y coordinates) and link elements (Start Node, Stop Node, Length) when the box for Establish by Spatial Data is unchecked

Note: The Key/Label field should automatically be populated with attribute fields present in the shapefiles. If for some reason this field is not populated, there could be a problem with the source shapefile. To work around this, recreate the shapefile in the ArcGIS-ArcMap client.

Synchronization

The final step is to define your connection and synchronize your model into the software by clicking the Synchronize In button as shown in Figure 3. Your water model is then generated from the shapefiles.

 


Figure 3

When WaterCAD works with shapefile connections, it is using a file with an .HSC extension, which stores the information regarding the shapefiles and field mapping for each element type. To go back to the connection that you just saved, click File>Synchronize>Shapefile Connection. This can be edited or modified so that you can bring in additional attributes or change your options in spatial connectivity. When you re-synchronize it, the changes you made will be reflected.

 


Figure 4: Illustration of the shapefile in ArcGIS software before synchronization


Figure 5: Illustration of a water model in WaterCAD after synchronization

See Also

OpenFlows Product Tech Notes And FAQs