Skip to main content
Best Answer

Loop overlay on route

  • June 5, 2019
  • 7 replies
  • 35 views

franco69
Contributor
Forum|alt.badge.img+10

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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+46
  • 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+10
  • 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+40
  • 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+10
  • Author
  • Contributor
  • June 6, 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

works perfectly...but onl yfor my knot in the brain...why +1 by calculation the number of shifts?


jdh
Contributor
Forum|alt.badge.img+40
  • Contributor
  • June 6, 2019

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.