Follow Eagle

Get Blog Updates By Email

Your email:

Learn More about Eagle Software and Services

Pipeline GIS Softwaredescribe the image

Eagle Pipeline GIS Blog

Current Articles | RSS Feed RSS Feed

Using ArcMap to Load APDM/PODS ESRI Spatial Online Features

  
  
  

In the last post we discussed pros and cons of event- and feature-based implementations of the APDM. Here, in the last post of this series, we concentrate on actually loading features (facilities data, etc.) into the geodatabase.

As with our initial example, assume that we already have some facilities data (valves) stored in a simple feature class, without measure/station information:

Raw Valves layer in ArcMap

Note the valves don't fall exactly on the centerline. This is a normal occurrence with real data; online features seldom fall exactly on the centerline.

Our initial task is to generate measure/station values for our valves. Recall that we have both continuous and engineering station series features in our geodatabase. Because continuous/engineering station series pairs are spatially identical, there's no reason to locate our valves on both. So let's restrict ourselves to just engineering station series. To do so, right-click on the StationSeries layer in the ArcMap Table of Contents window and select Properties from the context menu to open the Layer Properties window. Click the Definition Query tab, and click the Query Builder button therein to open the Query Builder window:

Query Builder Window

Enter [RefMode] = 'Engineering' into the ...WHERE: text box; press OK to close the Query Builder window; press OK again to close the Layer Properties window and apply the definition query to the StationSeries layer.

We'll use the ArcToolbox --> Linear Referencing Tools --> Locate Features Along Routes tool to generate measure/station values for our valves:

Locate Features Along Routes tool

Select Raw Valves in the Input Features pull down; select StationSeries in the Input Route Features pull down; select EventID in the Route Identifier Field pull down; Enter 5 (or a value appropriate to your data) into the Search Radius text input field; specify an appropriate location for the output table in the Output Event Table text input field, enter SeriesEventID in the output Route Identifier Field text input field, and enter StationValue into the output Measure Field text input field. Accept the defaults for the remaining check boxes and press the OK button. Our output RawValves_Events table looks like:

RawValves Events Table

Our valve events need their own EventIDs, and they'll also need RouteEventIDs, so add two new GUID fields to the RawValves_Events table named EventID and RouteEventID. Use the logic of How to Generate GUIDs in ArcMap to generate values for EventID.

To populate RouteEventID, we'll resort to a little chicanery. Right-click on the RawValves_Events table in the ArcMap Table of Contents window and select Joins and Relates --> Join to open the Join Data window:

Join Data Window

Select SeriesEventID from the Choose the field in this layer that the join will be based on pull down; select StationSeries in the Choose the table to join... pull down, and select EventID in the Choose the field in the table to base the join on pull down. Press the OK button to create the join. Open the RawValves_Events table and use the Field Calculator to calculate RouteEventID = [StationSeries.ParentStationSeriesEventID]. Then remove the join from RawValves_Events. The RawValves_Events table now looks like:

RawValves Events Table - Final

Here's the good news: If your implementation is event-based, simply use the Append tool to append the records from RawValves_Events to the APDM Valve table, and you're done! Since our example is feature-based, there's one more step to complete prior to performing the append.

Use the ArcToolbox --> Linear Referencing Tools --> Make Route Event Layer tool to display RawValves_Events records as features:

Make Route Event Layer Tool

Select StationSeries in the Input Route Features pull down; select EventID in the Route Identifier Field pull down; Select RawValves_Events in the Input Event Table pull down; select SeriesEventID in the event table Route Identifier Field pull down; select POINT in the Event Type pull down; select StationValue in the Measure Field pull down, and specify RawValves_Events Layer in the Layer Name or Table View text input field. Press the OK button to create the route event layer:

RawValves Events Layer Map View

Note that unlike the source features, the RawValves_Events Layer features fall exactly on the centerline.

Use the Append tool to load features from RawValves_Events Layer into the APDM Valve feature class:

Append Tool for the Valve Layer

Select RawValves_Events Layer in the Input Datasets pull down; select Valve in the Target Dataset pull down; select NO_TEST in the Schema Type pull down, and use these field mappings in the Field Map control:

  • Target Field - Source Field
  • EventID - EventID
  • OriginEventID - EventID
  • RouteEventID - RouteEventID
  • Measure - StationValue
  • SeriesEventID - SeriesEventID
  • Station - StationValue
  • InletDiameter - Diameter
  • OutletDiameter - Diameter
  • ValveFunction - Function
  • ValveNumber - ValveNumber

Press the OK button to load the APDM valve layer:

ArcMap Valve Layer

And that's it! BINGO! We have event data! Loading linear features is nearly identical, except that in the Locate Features Along Routes tool both begin and end (or from and to) station fields are specified. (We'll leave that as an exercise for the reader!)

Stay tuned! In our next series, we'll examine options for implementing geometric networks.

Comments

Tracy, do we need to build relationships after that?
Posted @ Wednesday, November 17, 2010 6:13 PM by Olga Ingerman
Olga - Nope, the relationships to StationSeries are good to go, as you can see in the Identify results. We got the foreign key to the engineering station series when we ran the Locate Features Along Routes tool, and the foreign key to the continuous station series when we did the join. (BTW, all the images are stored at full resolution; they're just shrunk for display. You can right-click on them to save 'em, and open them up in the Windows Image Viewer or Paint to see full detail. If you're running a more capable browser, like Chrome, you can just open at full resolution in a new tab.)
Posted @ Wednesday, November 17, 2010 8:49 PM by Tracy Thorleifson
Hello-  
I was a bit confused about event based implementation. The otherwise very detailed instructions seem to gloss over that part. I understand that records from the events table are appended to the valves table in the APDM. I get lost at that step. Is the valves table the same as the valves feature class? How does one make the events appear in ArcMap? 
 
Posted @ Thursday, September 08, 2011 9:38 AM by Glenn Vorhes
Glenn, good question. In an event-based implementation, your valves would not actually be a feature class, but rather an object class. (In an event-based implementation all your online events are posted as route event layers in ArcMap.) So basically, you just use the Append tool to copy the event table output from Locate Features Along Routes into your Valves object class. It's actually a simpler workflow than the feature-based implementation, because you get to skip that last Make Route Event Layer step in the workflow. Hope this helps; if you need more input ping me and we can chat on the phone.
Posted @ Thursday, September 08, 2011 11:18 AM by Tracy Thorleifson
Tracy- 
 
Thanks for the quick response. I believe your answer was one sentence short of giving me a complete understanding of the process. I follow the idea of events but what I'm missing is the implementation of object vs. feature classes. Following the APDM object model diagram, the abstract class from which the 'OnlinePointFacility' classes are derived have an icon that indicates that it can be implemented as either a feature or object class. I'm not grasping where this differentiation happens. I know the feature classes are in the APDM transmission dataset. Where are the object classes. I would assume they would be outside the feature dataset as they are just tables, right? If I need to make a 'Valves' object class, where does it go such that the relationship are maintained?  
 
Thanks again for your help. 
 
Posted @ Thursday, September 08, 2011 11:35 AM by Glenn Vorhes
Glenn, even better question! The abstract class hierarchy for an even-based implementation differs from a feature-based implementation. In an event-based implementation, OnlineFeature inherits from ObjectArchive, rather than FeatureArchive (as in a feature-based implementation). So when the geodatabase is created, online features become object classes, rather than feature classes. These object classes do fall outside of the Transmission feature dataset; only feature classes can appear within a feature dataset. It sounds like this is something the APDM crew ought to document a little better...
Posted @ Thursday, September 08, 2011 12:16 PM by Tracy Thorleifson
Thanks again for the follow up. It's becoming more clear now but I'm still missing something. It sounds like that in order to have an event based implementation, I would need to change the inheritance of OnlineFeature to ObjectArchive instead of OnlineFeature. This seems pretty messy and a deviation from the idea of a template. I went through CASE Tools with the xmi file downloaded from apdm.net, hoping that there was an option to select for feature or event based implementations. To ask another way, where should the 'valves' table be found which is mentioned in the how to? I have a valves feature class but no so named table. Do I have the geodatabase set up differently? 
 
I think we're getting there. Once again, I appreciate your help. 
 
Posted @ Thursday, September 08, 2011 1:28 PM by Glenn Vorhes
Glenn, changing the inheritance structure is something you have to do on the UML side in Visio; you can't do it in the XMI XML file. (Actually, theoretically you could, but it would be as much fun as a self-administered root canal.) It occurs to me we probably ought to have event-based XMLs available for download. At any rate, if you have Visio available, I'd be happy to run you through the process via GoToMeeting.
Posted @ Thursday, September 08, 2011 3:11 PM by Tracy Thorleifson
Tracy- 
 
We do have Visio and I spent a little time poking around the UML. It would be fantastic to go through it together. Can we set up something for next week? My schedule is flexible. Also, could I get a direct contact from you so I don't have to post to the how to?  
 
Thanks a million.
Posted @ Thursday, September 08, 2011 3:17 PM by Glenn Vorhes
Tracy, Glenn, 
 
 
 
What you are planning to do can be very educational for a lot of people who are struggling with APDM implementations. Do you think there is way to include larger audience, Webinar style presentation maybe?
Posted @ Thursday, September 08, 2011 3:52 PM by Olga Ingerman
Awesome blog. I have a question about the UML inheritance structure changes you were describing. I moved the OnlineFeature parent to ObjectArchive, which seemed to work but the Schema Wizard in Arc complains about tables existing in a FeatureDataset. How do you (in Visio) move the OnlineFeatures out of the Transmission FeatureDataset. 
 
Thanks
Posted @ Monday, December 19, 2011 10:31 AM by Shane Helm
Shane, 
 
Thanks for the kind words. Your question is a great one, and important for anybody doing event-based implementations. Only feature classes may appear in a Feature Dataset folder in the Model Explorer in Visio. Since you have changed OnlineFeature to inherit from ObjectArchive, all of your online features are now object classes, rather than feature classes. This means you must move them out of the Transmission folder and into the EventSupport folder in the Model Explorer in Visio. You can do this simply by dragging and dropping items in the Visio Model Explorer. You will find this to be tedious and time consuming. If you are using a standard APDM 5 template, I've got an event-based template already prepared. Let me know if you would like it, and I'll email it to you.
Posted @ Monday, December 19, 2011 10:44 AM by Tracy Thorleifson
Thanks for the direction. I am now going to spend the next 3 hours moving them to that EventSupport folder (talk about painful). If you could, please send me the APDM 5.0 template. 
 
Cheers 
 
 
Posted @ Monday, December 19, 2011 10:55 AM by Shane
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics