The purpose of this blog is to discuss interesting issues in the use of analysis tools in Intergraph's GeoMedia Pro Product. Analysis tools include Spatial Query, Spatial Difference, Spatial Intersection, Function Attribute, Analytical Merge, and Aggregation. It was launched on August 19, 2008. This blog is related to the newly launched GeoMedia Wishlist Blog.

A few weeks back, I asked if anyone had ever used GeoMedia to identify which shutoff valves should be turned off in the event of a water main break. My data consisted of water main line features and valve points snapped to the main lines.

Thank you very much to everyone that provided solutions to the problem.

As it turned out, we ended up using parts of the various solutions in order to solve our problem. We had some data issues that kept us from using the provided solutions in their entirety. Shahid finally developed the workflow that we used. Here are the steps:

Perform an Analytical Merge of the water main features using the “All” option.

Create a small buffer zone (1 or 2 centimeters) around each valve

Perform a Spatial Difference between the merged mains (output from 1.) subtracting the buffered valves (output from 2.)

Take the output from 3. and apply Functional Attributes using the Geometries option.

Take the output from 4. and apply an Analytical Merge using the Touching option.

Take the output from 5. and perform an Aggregation using the output from 5. as the “Aggregate to summary features in”, and the buffered valves (output from 2.) as “From detail features in”, using “Touch” for the spatial aggregation. For the output, use the concatenate option specifying a comma for the separator and the valve id number to concatenate.

This will then allow the user to double click on a main which will expose the attribute window indicating which valve ids need to be turned off. The valve ids have previously been labeled on the map. This solution will allow us to use GeoMedia Viewer on field laptops to find which valves need to be turned off.

I plan to post this to both Shahid Mujtaba’s blog http://geomedia-analysis.blogspot.com and Jeff Hobb’s blog http://jeffhobbs.net.

Thanks again to everyone that offered advise. Your help made the difference!

Saturday, August 23, 2008

The Problem: Given a network of line and point features representing pipes and valves respectively, how to determine the stopvalves associated with a given pipe segment?

Business Purpose: If there is a break in a pipe, which valves must be shut off in order to isolate the break, and therefore prevent excess water loss.Some definitions:

A pipe section is a series of pipes joined end to end in a straight or continuous smooth line.

Each pipe section has a unique PipeID associated with it.

Each valve has a unique ValveId associated with it.

Each valve should have 1 or 2 pipe sections attached to it.

A valve controls amount of flow, not direction of flow: the direction of flow is determined by pressure values at different parts of the network. Consequently, water may flow in opposite directions through a valve, an in a pipe section at different times.

A pipe segment is a set of pipe sections joined to one another so that the sections are topologically connected, and isolated from other pipe segments. It follows that each pipe section can belong to one and only one pipe segment.

A pipe segment will have 2 or more ends to it. There are no pipe segments with 0 or 1 end (Actually a pipe segment with 0 end may exist if it is a ring or a closed polygon without any valves in it).

Within a pipe section, individual pipes may meet end to end only. A T-junction would therefore be a place where 3 pipe sections join together in the pipe segment.A pipe junction could have more than 3 pipe sections coming together.A series of pipe sections may meet one another at angular junctions, so that any of the sections can be isolated by turning off 2 valves. These pipe sections make up a pipe segment.

The Problem described in abstract terms: For a given pipe segment, provide a list of ValveIDs at the ends of the segment.

Possible exception conditions:A valve may not have any pipe segments associated with it. This would be a standalone valve which does not control any pipes.A valve may show only one pipe segment associated with it. This means that the valve controls consumption of water flowing through it, or that the other segment possibly associated with it is not of current interest in the network.The end of a pipe segment may not have a valve; this could mean that we are not interested in what happens at the end of that pipe segment.

Apply [SPATIAL DIFFERENCE] with input qry_merge_PIPES subtracting qry_VALVES_Buffered to create a query qry_PSEGMENTS which is still a single feature consisting of joined and unjoined pipe (See Note 3)

Apply [AGGREGATION] with the summary feature in qry_PIPE_SEGMENTS from the detail features qry_VALVE_Buffered with spatiallty aggregation where the summary features [TOUCH] the detail features. Create an Output [FUNCTIONAL ATTRIBUTE] called [STOP_VALVES] which uses the function [CONCATENATE] function on the Detail.VALVE_IDs, separating them using a suitable separator such as a comma or a semi-colon. The resulting qry will be called PIPE_SEGMENTS. (See Note 6)

Display PIPE_SEGMENTS. When the attributes of a particular PIPE_SEGMENT are displayed, the only attribute shown will be the list of STOPVALVES. (See Note 7)

Technical difficulties:

Note 1 This merges all the pipe segments together to get one or more unconnected pipe networks.Note 2 This makes the valves to small circular areas and why we do so will become clearer at the end of the next step.Note 3 In theory it should be possible to subtract the VALVES directly from PIPE_NETWORK so that there is a break where the valve is located. In practice, GeoMedia will not allow [SPATIAL DIFFERENCE] between line and points, only between lines and lines or lines and areas.Note 4 What we want here is to separate each pipe segment. However, Geomedia will do this, and in addition, will also break apart pipe segments where pipe sections meet at an angle, and at T-junctions.Note 5 By comparing the number of pipe segments together with the original pipe segments, we can get an idea of any inconsistent network.Note 6 This is a means of associating the valve buffers with the pipe segments they each helped to create. The CONCATENATE function works because the VALVE_IDs were text rather than Numbers.Note 7 To generate Valve Segment IDs, we need to output the query to a feature.

Data Quality issues:

1 valve with no ID

some valves do not touch pipes - suggests (a) valve does not exist in reality (b) linework error 3) some pipe sections appear in multiple segments - this means that some of the original pipe linework had valves sitting on a continuous pipe.Since original data came from CAD system, it is necessary to correct the data at the CAD level, rather than update at the Geomedia level.