Skip to main content

Hi All, I have a highway network polyline and some point events. I have snapped these to the highway centreline. I have been asked to create sections of the highway centreline 1km downstream and 2km upstream of these points. note some of these point events are < 1km apart so the resulting section maybe less thank 1km if the line runs into another event

I have used the pointonline to cut the highway centreline at the points. then i have been trying using the snipper to cut the highway into the 1km section. Here is my work flow.

  1. Aggregate highway into 1 entire piece (is 2000 sections) ,
  2. Cut this 1 piece highway into two sections using the PointOnLine overlayer at the event point.
  3. use snipper to snip the resulting lines to 1km and 2km.

issues im having are:

  1. how do i feed the aggregated highway back into the loop so each point event gets to cut the aggregated highway not the cut up one.
  2. how do i workout which section of the two highway pieces to make 1 or 2 kms (maybe _segment_id)

any suggestions appreciated, am i on the right track or is there a better method?

Thanks as aways. Steve

Initially I would say your approach is correct, but after toying with it for a bit I think I have an easier solution:

I'm not actually overlaying the points on the lines (that would cut up the lines and introduce some additonal complexity) but rather I'm using the LengthToPointCalculator to calculate the length along the line to the point (on the line) closest to the supplied coordinates. Then a Snipper to cut from 1 km behind to 2 km ahead of that point. This way you don't need to snap the points to the line.

Hope this helps.

none2none.fmw


Initially I would say your approach is correct, but after toying with it for a bit I think I have an easier solution:

I'm not actually overlaying the points on the lines (that would cut up the lines and introduce some additonal complexity) but rather I'm using the LengthToPointCalculator to calculate the length along the line to the point (on the line) closest to the supplied coordinates. Then a Snipper to cut from 1 km behind to 2 km ahead of that point. This way you don't need to snap the points to the line.

Hope this helps.

none2none.fmw

Many Thanks for your help

 

This works perfectly where the 2km section that is snipped is less than the entire length of the underlying section. ie if point 500m from the end of section A and we need 2000m, we need 1500m to be snipped from the next section also. This confuses me as i have never dealt with LRS where the end value is greater than the length of the section. ie FROM (road ID1 Start 500m) TO(road ID2 END 1500m). Is it feasible to run across sections like this with LRS processes. I have never run into it.

 

 

As always, many thanks for your suggestions and input.

 

 

Steve

 

 


Many Thanks for your help

 

This works perfectly where the 2km section that is snipped is less than the entire length of the underlying section. ie if point 500m from the end of section A and we need 2000m, we need 1500m to be snipped from the next section also. This confuses me as i have never dealt with LRS where the end value is greater than the length of the section. ie FROM (road ID1 Start 500m) TO(road ID2 END 1500m). Is it feasible to run across sections like this with LRS processes. I have never run into it.

 

 

As always, many thanks for your suggestions and input.

 

 

Steve

 

 

I'd recommend joining the lines (LineCombiner) as much as you can to circumvent this. Was also wondering about situations where lines branch off, can that happen in your dataset?

 

 


Reply