Solved

Loop overlay on route


Badge +6

I have a pipeline route and make an areaonarea overlay with a buffer to analyze how many buildings are in this buffer beneath both sides of the route to classify this segment (for example 1 mile long and 220 yards on both sides....thats clear so far

but i want a loop to shift the buffer (for example 200meters along the route) to get a new classification...

so first overlay for example from 0 to 1000meters on the route...next from 200 to 1200meters and so on...

how can i build this looping? (or do i need a looping?)

simple for you i think

Cheeers Franco

icon

Best answer by jdh 5 June 2019, 16:44

View original

7 replies

Badge

@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

Userlevel 1
Badge +21

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.

Badge +6

That could be difficult becuase i have to classify the Segments in relation how many Buildings are in the Buffer....or?

Badge +22

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 [1+(length-segment)/offset)] and clone the feature that many times. Snipper to trim the feature to the start [copynum*offset] and end [copynum*offset + segment length].

 

 

So a 2000m feature with 200m offset and a segment of 1000, would have 6 'shifts'.

 

 

 

_copynumstartend00100012001200240014003600160048001800510002000
Badge +3

@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.

Badge +6

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 [1+(length-segment)/offset)] and clone the feature that many times. Snipper to trim the feature to the start [copynum*offset] and end [copynum*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?

Badge +22

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.

Reply