@franco69,
You probably need to investigate converting what you have done so far to a custom transformer. You can use looping with custom transformers as described here,
http://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Workbench/Workbench/transformers_custom_looping.htm
Hope that helps
jontyg
As an alternative to looping, you could look at chopping your route into the same length sections as the shift and working out the related buildings either side, then use this information to create the information for the segments.
That could be difficult becuase i have to classify the Segments in relation how many Buildings are in the Buffer....or?
I'm not a fan of looping in FME, particularly when it involves a spatial comparison of other features.
What I would do is calculate the length of the pipe feature, and determine how many "shifts" it would need d1+(length-segment)/offset)] and clone the feature that many times. Snipper to trim the feature to the start tcopynum*offset] and end dcopynum*offset + segment length].
So a 2000m feature with 200m offset and a segment of 1000, would have 6 'shifts'.
_copynumstartend00100012001200240014003600160048001800510002000
@franco69
Make the route a LRS.
Buffer the entire route, do the spatialquery whilst passing the LRS info and then query this by distance starting from ...begin to create the shifting.
You can facilitate this by using prior/subsequent record.
I'm not a fan of looping in FME, particularly when it involves a spatial comparison of other features.
What I would do is calculate the length of the pipe feature, and determine how many "shifts" it would need d1+(length-segment)/offset)] and clone the feature that many times. Snipper to trim the feature to the start tcopynum*offset] and end dcopynum*offset + segment length].
So a 2000m feature with 200m offset and a segment of 1000, would have 6 'shifts'.
_copynumstartend00100012001200240014003600160048001800510002000
works perfectly...but onl yfor my knot in the brain...why +1 by calculation the number of shifts?
works perfectly...but onl yfor my knot in the brain...why +1 by calculation the number of shifts?
for the first pass without any shifting (features exactly or less than the segment length.
depending on how you want to handle the last short segment, you main want to add a ceiling or floor to that calculation.