Skip to main content
Solved

How to create routes based on break attribute/value?

  • May 15, 2018
  • 5 replies
  • 42 views

Hi, I would like to convert a dataset with GPS tracking points to routes using the the LineBuilder transformer. My challenge is that I want to create separate routes based on break values/attributes. Each route start with zero (value) and ends with one (value). Based on break values/attributes I would like to add an unique routeID to each route (collection of points) and use this as connection break attribute in the LineBuilder. See attached example of attribute table.

Any idea how to acomplish this?

Thanks in advance,

Morten

Best answer by takashi

Hi @mortentj, if you want to generate RouteID based on the break-attribute as shown in your screenshot, I think you could apply a combination of the Advanced Attribute Value Handling parameters in the AttributeCreator or AttributeManager and conditional value setting effectively.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

david_r
Celebrity
  • 8394 replies
  • May 15, 2018

Have you tried simply using the RouteID as the connection break attribute in the LineBuilder?


takashi
Celebrity
  • 7843 replies
  • Best Answer
  • May 15, 2018

Hi @mortentj, if you want to generate RouteID based on the break-attribute as shown in your screenshot, I think you could apply a combination of the Advanced Attribute Value Handling parameters in the AttributeCreator or AttributeManager and conditional value setting effectively.


takashi
Celebrity
  • 7843 replies
  • May 15, 2018

Hi @mortentj, if you want to generate RouteID based on the break-attribute as shown in your screenshot, I think you could apply a combination of the Advanced Attribute Value Handling parameters in the AttributeCreator or AttributeManager and conditional value setting effectively.

Also this may be a good exercise to understand how you can use a global variable.

 

 


  • Author
  • 1 reply
  • May 16, 2018

Hi Takashi

Thanks, it works perfectly :-)

Cheers, Morten


takashi
Celebrity
  • 7843 replies
  • May 16, 2018

Hi Takashi

Thanks, it works perfectly :-)

Cheers, Morten

Good to hear.

 

Since the break attribute could have only 0 (continue) or 1 (start new route), this setting would also be possible.

 

 

----------

 

Interestingly, the StatisticsCalculator (Cumulative port) does the same.