Skip to main content

Hello FME Users,

I have Road Dual carriage way do anyone have idea how to identify or flag Right and left side /part of Dual carriage way how It can be accomplish ?

@Takashi Iijima​ @david_r​ 


The LeftRightSpatialCalculator transformer may help you here. For any particular feature, it will calculate whether all other features are to the left or right of it.

There doesn't appear to be a distance or tolerance parameter, but there is a group-by option. So if your roads have an ID number (like A46, A607, etc) then you could do a group-by so that you aren't having to compare every road against every other road, just where they are part of the same dual carriageway.

I hope that helps to get you started. Let us know if it doesn't 👍


The LeftRightSpatialCalculator transformer may help you here. For any particular feature, it will calculate whether all other features are to the left or right of it.

There doesn't appear to be a distance or tolerance parameter, but there is a group-by option. So if your roads have an ID number (like A46, A607, etc) then you could do a group-by so that you aren't having to compare every road against every other road, just where they are part of the same dual carriageway.

I hope that helps to get you started. Let us know if it doesn't 👍

Thank you @mark2atsafe​ for suggestion i have tried with "LeftRightSpatialCalculator" because transformer doesn’t have distance or tolerance parameter it’s really default to find relevant edges after populating list attributes do we have any other ways ? processing data for entire country.


The LeftRightSpatialCalculator transformer may help you here. For any particular feature, it will calculate whether all other features are to the left or right of it.

There doesn't appear to be a distance or tolerance parameter, but there is a group-by option. So if your roads have an ID number (like A46, A607, etc) then you could do a group-by so that you aren't having to compare every road against every other road, just where they are part of the same dual carriageway.

I hope that helps to get you started. Let us know if it doesn't 👍

Well, the NeighborFinder is the obvious answer. But I don't know how well that will be able to determine features that cross or connect shouldn't be included. But it could be the foundation for a solution that finds features within X distance and perhaps compares direction of line.

Another starting point might be the OffsetCurveGenerator. You could create an offset on one side of a line and then try and match that offset to another line feature (ChangeDetector or NeighborFinder again). That could even help you determine which direction the other feature is (left or right).

A more offbeat solution could be the ShortestPathFinder. You could try travelling from A to B (nodes on a section of carriageway) but against the flow of traffic. The algorithm would probably use the opposite carriageway for the shortest route.

 

So, in brief:

  • Work on the nearest neighbor being the matching carriageway
  • Generate an approximation of the other carriageway and look for similar features
  • Use a routing algorithm to identify the matching carriageway as being the shortest route backwards

 

Those are a few suggestions. This is quite a tough requirement and I don't believe that there's a definitive transformer designed for this exact scenario. I'm sure it's possible and perhaps I could experiment a bit, but overall you have the data and I think you're going to have to try a few different transformers and see what helps you in the right direction. Sorry I don't have a full solution for you.


Well, the NeighborFinder is the obvious answer. But I don't know how well that will be able to determine features that cross or connect shouldn't be included. But it could be the foundation for a solution that finds features within X distance and perhaps compares direction of line.

Another starting point might be the OffsetCurveGenerator. You could create an offset on one side of a line and then try and match that offset to another line feature (ChangeDetector or NeighborFinder again). That could even help you determine which direction the other feature is (left or right).

A more offbeat solution could be the ShortestPathFinder. You could try travelling from A to B (nodes on a section of carriageway) but against the flow of traffic. The algorithm would probably use the opposite carriageway for the shortest route.

 

So, in brief:

  • Work on the nearest neighbor being the matching carriageway
  • Generate an approximation of the other carriageway and look for similar features
  • Use a routing algorithm to identify the matching carriageway as being the shortest route backwards

 

Those are a few suggestions. This is quite a tough requirement and I don't believe that there's a definitive transformer designed for this exact scenario. I'm sure it's possible and perhaps I could experiment a bit, but overall you have the data and I think you're going to have to try a few different transformers and see what helps you in the right direction. Sorry I don't have a full solution for you.

@mark2atsafe​ 

tryed the following thing

 

from Road Network created Area between Road and replaced with centerline. I am using Centerline to identify Read Network Geometry on which side Right or Left using “LeftRightSpatialCalculator” but could not able to calculate properly Could you help me. I have attached FME WB with Data 


Reply