Peter Veenstra of TRC Solutions is using the AttributeCreator transformer to automate linear referencing tasks including the calculation of cumulative values to increase the accuracy of measurements in his pipeline dataset.

“The AttributeCreator transformer allows a user to create new attributes using values obtained from previous or subsequent rows in an ordered input table,” explains Peter Veenstra.

An avid FME user, Peter works for TRC Solutions, an engineering, environmental consulting and construction management firm that provides services to the power, environmental, infrastructure and oil and gas markets.

“In a call with Safer Mark Stoakes, I asked ‘I have all my points ordered. Do you have a transformer that can go to my previous point?’ He showed me the AttributeCreator and my jaw hit the floor,” Peter recalls. “This solves a lot of common tasks we have when preparing pipeline route data and inline inspection or other inspection data.”

Automating Cumulative Values

“With the ability to access N or more previous and subsequent attributes you can perform calculations including vector direction, bend direction and amount, total cumulative footage, 3D distance between previous and subsequent points… this is crunchy magical goodness.”

For example, Peter regularly needs to calculate the cumulative length of pipe between two welds. He has created an FME workspace to create measure or station values, so that when maintenance is needed, field crews can be confident that the location identified for the work is accurate.

In ArcGIS, Peter can build the pipeline and create measure values for it, but when it comes to cumulative values, he would need to use Python.

Instead, he created an FME workspace that takes the CSV file, creates vertex point features using XYZ, sorts them according to the ID, and performs some statistics calculations to acquire cumulative distances.

“I just did in three steps what I would have otherwise had to code,” he describes.

His workspace then creates an attribute called begin distance and end distance.

“I can get all of the attributes from the previous point in the list. As a result, I can calculate the distance between the two points.”

He uses another StatisticsCalculator to identify the cumulative distance and assign it to every single point. In the AttributeCreator he rounds the numbers, finds the maximum cumulative distance he needs, and sets the measure value of every point.

The coordinate has now been set to xyz, and the actual coordinate now adds an M (measure) value as an m-aware point feature. The workspace creates a polyline, and all of those point features comprises the m-aware vertices of the polyline. The cumulative maximum distance attribute is now assigned to an attribute of the polyline.

The following images provide a step by step explanation of each stage of Peter’s cumulative length calculating workspace.

This Is When the Fun Begins

With FME, Peter can then perform complex calculations.

“Now I can deal with much more complicated stuff,”  Peter emphasized. “I can calculate the true 3D distance when Z values are available; tell how this vector deviates to the next one based on the angle of the turn; QA/QC to evaluate if field measured distance is equal to the calculated distance between two points; and calculate rhumb distance compared to measured distance, for just a few examples.

“Knowing the true length of installed pipe is huge for transmission pipeline companies.

“I can now solve a whole bunch of problems that I couldn’t before because it took too much time,” Peter observed. “There is a lot of functionality in this one transformer that would otherwise take a lot of Python to resolve.”

To discover more ways you can use the AttributeCreator to meet your needs, visit the AttributeCreator page in the Transformer Gallery. To find custom transformers that have been created for linear referencing projects, visit the FME Hub.

ArcGIS Attributes CSV Customers FME Desktop Oil And Gas Spatial Data

Erin Lemky

Erin leads the Product Marketing team at Safe Software and enjoys connecting people with the information they need. As a Ravenclaw, she is always seeking knowledge that can help customers improve the world with their innovation. After work, she can be found tending to her permaculture homestead or reading a fantastic adventure with her family.

Comments

3 Responses to “AttributeCreator: How TRC Solutions Calculates Cumulative Length of Pipe”

  1. Martin Huber says:

    Hi Erin
    there is a much simpler alternative to “go back and forth” in a set of ordered points in FME. I presented this on the FME User Conference 2014 in Vancouver.
    1) Sort your points in the order that is relevant to your problem at hand
    2) Add a counter to count “basecounter” e.g. from 1 to n (as a programmer you might prefer starting from 0, but that is not relevant)
    3) Add a second counter “followcounter” to count from 2 to n+1
    4) Use a FeatureMerger in which you enter your points on both entries (requestor and supplier), merge on “basecounter” = “followcounter” and you get a combination of “this” feature and “the next in line” feature (first and last will not find a partner, that’s logic!). Make sure to rename the relevant attributes on one of the input streams so they are not overwritten. If you need both geometries, pack them into an attribute e.g. as WKT or FME Binary or whatever.
    5) Now do all you want with the combination of “this” and the “next” point
    I’ve used this in GPS tracks of police cars as well as for the topological completion of an electricity network. Works effectively and reliably.

    • Erin Lemky says:

      Thanks for sharing your insights, Martin. Yes, each scenario is unique, it’s great to hear additional real-world approaches!

Leave a Reply to Martin Huber Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts