This example shows how you can use information from your network, combined with data from GIS layers, to identify critical pipes in the network. A series of SQL statements refines a selection until we have identified the pipes that meet all the criteria. We then use SQL to set values in the selected pipes.
Figure 1 below shows the GIS and network data:
In this example we are looking for large damaged pipes in difficult ground. Specifically we are going to select any such pipes near a hospital, as a failure in such a pipe could be a major problem.
Figure 1 above shows the area of interest.
The various roads and buildings of interest are described in the stages below.
Step | Step Description | Query | Example Image |
---|---|---|---|
A |
The first SQL object selects a number of pipes based on the following criteria:
After an SQL object is applied to the network, any network objects that meet the criteria in the SQL statements are selected. |
SQL query context:
width >= 300 AND material = "CO" AND gislayer.STRUCTURE = "B Road" AND user_number_7 >= 2 |
|
B |
The second SQL object refines the selection made by the first SQL object. Note that Apply Filter to Current Selection is checked. This limits the network objects to which the SQL is applied to those already selected. This is a powerful feature.
|
SQL query context:
gislayer.WRAPCLASS = 1 OR gislayer.WRAPCLASS = 3 |
|
C |
The third SQL object tests our selected pipes to see if any of them are near a hospital. A pipe collapse near a hospital that blocked access or released wastewater in the area would probably be a major problem, and therefore repairing damaged pipes in this sort of situation will be more critical than elsewhere.
|
SQL query context:
SET criticality = 5, criticality_flag = "AA" WHERE gislayer.STRUCTURE = "Hospital" |
|
D |
SQL Queries can be grouped together and executed automatically to make the process even more efficient. Here, the three queries described above have been placed in the same Stored Query Group. If you drag this group onto a network, all the queries it contains will be executed in alphabetical order. So, with a little care when naming the individual queries, you can create powerful, multi-step queries. |
|