Skip to main content
Solved

Loop overlay on route


franco69
Contributor
Forum|alt.badge.img+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

Best answer by jdh

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
View original
Did this help you find an answer to your question?

7 replies

jontyg
Contributor
Forum|alt.badge.img+2
  • Contributor
  • June 5, 2019

@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


ebygomm
Influencer
Forum|alt.badge.img+33
  • Influencer
  • June 5, 2019

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.


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • June 5, 2019

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


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • Best Answer
  • June 5, 2019

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

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • June 6, 2019

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


franco69
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • June 6, 2019
jdh wrote:

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?


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • June 6, 2019
franco69 wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings