Solved

How to create routes based on break attribute/value?


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

icon

Best answer by takashi 15 May 2018, 16:55

View original

5 replies

Userlevel 4

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

Userlevel 2
Badge +17

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.

Userlevel 2
Badge +17

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.

 

 

Hi Takashi

Thanks, it works perfectly :-)

Cheers, Morten

Userlevel 2
Badge +17

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.

 

 

 

Reply