Skip to main content
Solved

Railway crossings

  • November 25, 2024
  • 4 replies
  • 58 views

arild_f
Contributor
Forum|alt.badge.img+4

Hello community!

I am working on an analysis to calculate the percentage of incline or decline from railway level crossings. This means the incline or decline along the road that crosses the railway.

The desired result is six percentage values. Three for each side of the track (viewed in increasing kilometer (M-value)). The three intervals are 0-4.5 meter, 4.5-8 meter and 8-18 meter, measured from the outer edge of the railway track.

It is desirable that the length is measured along the road.

Decline from the level crossing should be shown as a negative percentage value, and incline as a positive percentage value.

 

Based on the client's wishes, I have divided the analysis into smaller tasks:

  1. Add a property that shows whether the road lines are on the right or left side of the railway, viewed in increasing kilometer (M-value).

    I have tested the LeftRightSpatialCalculator, but for some unknown reason it always gives me the same side on both sides.
    I see that TopologyBuilder is mentioned in the forum as another possibility.
     
  2. Check which direction the road line goes and correct this so that the road line on both sides of the railway track starts at the railway track and moves away from the railway.
     
  3. Measure distance along the road line and clip it into the given intervals.
     
  4. Calculate the percentage of incline/decline for each line segment.

 

I have managed to find a working solution for point 4, but not for points 1-3.

 

I don’t know if this make sense to anybody other than me. But if it does - do you have any good suggestions of how to do it?

 

If you want to take a look, I have uploaded a file geodatabase with test data here: https://github.com/aferagen/fme_railway_crossings

Best answer by ebygomm

For the left right calculator to work correctly you need to ensure that you’re only considering the road position relative to the nearest bit of railway, probably with a group by

That should solve point 1

Then something like this for point2, extract the line geometry, create a point feature that represents the start point, measure the distance of this point from the railway line, restore the original line geometry and then reorientate the line depending on the distance of the start point from the line.

 

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+34
  • Influencer
  • Best Answer
  • November 25, 2024

For the left right calculator to work correctly you need to ensure that you’re only considering the road position relative to the nearest bit of railway, probably with a group by

That should solve point 1

Then something like this for point2, extract the line geometry, create a point feature that represents the start point, measure the distance of this point from the railway line, restore the original line geometry and then reorientate the line depending on the distance of the start point from the line.

 


liamfez
Influencer
Forum|alt.badge.img+34
  • Influencer
  • November 25, 2024

What ​@ebygomm said looks good for those first two points, so I think that just leaves step 3. For breaking up a line at given lengths the Chopper transformer should do the trick


arild_f
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 26, 2024

Thank you ​@ebygomm  and ​@liamfez for your answers!

I have a working part 2 now, but the LeftRightSpatialCalculator is still a mystery to me.

@ebygomm: If you got it working, can you share a screenshot of the settings you have used?

And for part 3, I tested the Chopper, but I think the Snipper is a better solution.


ebygomm
Influencer
Forum|alt.badge.img+34
  • Influencer
  • November 26, 2024

I just used a single rail line and associated roads for my example, to work with your dataset you would need to use the group processing option so that each road is only considered next to the rail line you are interested in. There was nothing in your data to use for this, but you should be able to assign an attribute when you are generating your related road lines and railline segments


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