Question

I have a line which is made up of segments (segment Number) I have snipped the line at a specified distance and included a count. What I am trying to do is do a count for each segment, not the whole line.

  • 3 February 2014
  • 3 replies
  • 0 views

I have a line which is made up of segments (segment Number) I have snipped the line at a specified distance and included a count. What I am trying to do is do a count for each segment, not the whole line.

3 replies

Badge +2
The Chopper can snip lines by length, but it can also chop features into their vertices if a Maxim Vertex of 1 is used. Thus, if you are after the total number of nodes that a snipped segment has, try put it through a Goidgenerator -> Chopper with Max Vertices of 1 -> Aggregator by _goid with a _count atribute created -> FeatureMerger linked by _goid.

 

 

Such would end you up with a _count attribute containing the number of vertices each line segment has.
Badge
Attach a StatisticsCalculator to your workflow. In the GroupBy, use the lines unique id and clear out all the other output ports except for "Count." Then route the feature out through the "cumulative port."  

 

 

Next would be to add a FeatureMerger and basically merge on a common field and then keep only the the new cumulative count field.

 

 

Thanks seems the "cumlative port" was the winner, thanks all :)

Reply