In the previous post we added BeginStation and EndStation attributes to a hypothetical pipeline layer in ArcMap called Raw Pipelines. We learned how to calculate EndStation as pipeline length. Unfortunately, the shapes in Raw Pipelines store only X, Y and Z values. To enable Raw Pipelines for linear referencing (and use them in an APDM or PODS ESRI Spatial geodatabase), we need to add M values. In this post we learn how to do exactly that.
To add M values to Raw Pipelines, we need the right tool, and, as is often the case with ESRI technology, the right trick to get the tool to perform as desired. The right tool resides in ArcToolbox. To access ArcToolbox in ArcMap, press the ArcToolbox button on the Standard toolbar:
We'll use the ArcToolbox --> Linear Referencing Tools --> Create Routes tool to create a polyline feature class storing M values based on Raw Pipelines. Double-click on Create Routes in the ArcToolbox window to open the Create Routes tool window:
In the Create Routes window, we select Raw Pipelines as the Input Line Features layer. LineName, our unique identifer, is specified as the Route Identifier Field. The tool creates a new feature class, which we name Raw Pipeline Routes in the Output Route Feature Class text box. And now for the trick. We select TWO_FIELDS in the Measure Source pull down. Only this option guarantees that measure values will ascend in the direction of line digitization. With the other options, direction of ascending measure is determined by the Coordinate Priority option. Any of these end up being just about arbitrary, and are about as useful as teats on boar hog, as we say here in Texas. With the TWO_FIELDS measure source specified, we select Begin- and EndMeasure as the From-Measure Field and To-Measure Field, respectively.
Here's what the table from the resulting Raw Pipeline Route layer looks like:
Note that all fields other than LineName (the route identifier field) are dropped. (Isn't that a nice feature? GRRR!) More importantly, note that the value stored in the SHAPE column is now 'Polyline ZM'. This means that our pipeline shapes now include measure values. YAY!
If we get a little crazy and start an edit session, and use the Sketch Properties tool to examine the vertices of one of our pipelines, we can see the M values directly:
So our pipeline routes are just about ready to rock. The only significant task remaining to ready them for load into an APDM 5 or PODS ESRI Spatial 5 geodatabase is to add some GUID EventIDs and some additional attribution. And you already know how to do that! ;-)