Â
Â
I've been playing around with the Looper transformer to try and extract out peaks from a height dataset. Â It's quite hard to explain(!) so I've saved a PDF of screenshots here:Â
Â
http://db.tt/MehXB4zJÂ
Â
I have a point DTM Â dataset that I have derived from a previous workbench. Â In the previous workbench I had a pair of rail strings (one for each direction) for which I generated perpendicular lines and extracted out the points where the perpendicular lines intersected a contour dataset, image p1.Â
Â
Each "line" of points is derived from two sets of perpendicular lines, one for each direction so if you imagine a set of tracks down the middle, I'm only looking at the points one perpendicular line at a time (in the screenshot, it's the set to the south-west of the rail line)Â
Â
As an example, on image p2 & p3 I have selected one of four points I want to interrogate via the Looper.  Each set of points along the rail string has a common count value (so they can grouped), all the points along this perpendicular line have the unique count 2483.  They also have a mitigation distance which is the distance from the original rail string.Â
Â
I want the Looper to go through each unique set of points (i.e. grouped by the unique count value) and pick out peaks, using the mitigation distance to order the points (ascending).  There could be an number of points to interogate, not just four as in the screenshots, eg. if the height values are:Â
Â
10Â
20Â
>30Â
20Â
10Â
>40Â
10Â
>50Â
30Â
Â
I want the ones highlighted extracted, i.e. where the next value is lower than current value, write out that value.  Again, mitigation attribute to feed the points into the transformer in the right order.ÂÂ
Â
Image p4 shows by main workbench where I have used the Sorter to puts all mitigation heights in order and also created a _value attribute to feed into the Looper.Â
Â
Image 5-7 show the Looper and its parameters.  I'm using a Tester to try and extract out the max values.  When I run the workbench it runs, gets past the Sorter but then just keeps runnning, without completing (log doesn't move).  If I don't create the _value attribute in the main workspace it also hangs it the same place.  Have I created an infinte loop??  The point dataset has 124,000 points approx, so not huge.Â
Â
Sorry for the long explanation, but any help gratefully received!Â
Â
Thanks, Amit