Skip to main content
Question

Chaining Logic to Select Same Group Roads And Upgrade


parashari
Forum|alt.badge.img+2

Hi Community,

 

I have a road network where roads are defined in road classes (1-5). While comparing the road from two different geometries(local and client), I need to upgrade my road network on the basis of client's road class.

 

In the image attached, the yellow lines are road class 4 and grey ones are road class 5. So, I need to upgrade road class 5 to class 4.

In the image shared, the one selected road element (in cyan), needs to be upgraded from the top (hanging geometry) to till the yellow line in the down south, and rest all data remains same.

In other situations, one side of the road can be a hanging geometry, so the road selection can be unidirectional to bidirectional. But, the upgradations has to be limited to only one road class update (4 to 3, 3 to 2 etc.,) This is because road class 1 (road of international importance) can directly only be connected to class 2(national/regional importance) and so on.

So there has to be a chaining logic where I can select the road elements of same road class that needs to be upgraded to a higher one.

 

I've tried recursive python scripts to perform this but no luck.

Any idea of how can we do this with FME/SQL/Python. Sharing a sample dataset.

 

Thanks.

ChainPrep

5 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • January 15, 2021

The image is missing


parashari
Forum|alt.badge.img+2
  • Author
  • January 15, 2021
ebygomm wrote:

The image is missing

Ahh! Missed it. Updated now.


Forum|alt.badge.img+2
  • January 15, 2021
parashari wrote:

Ahh! Missed it. Updated now.

@parashari​ can you attach a sample dataset?

I think you can resolve your 'chaining' problem by making a new 'grouping attribute on both datasets for comparison purposes. So for th 4-5 comparison on both datasets create a new attribute _group = 4-5 (when local = 4 & client = 5). Most FME transformers have a Group By so this will restrict the comparisons to data in th common groups.


parashari
Forum|alt.badge.img+2
  • Author
  • January 18, 2021
parashari wrote:

Ahh! Missed it. Updated now.

Attached a sample data @Mark Stoakes​ 

Thanks.


Forum|alt.badge.img+2
  • January 21, 2021
parashari wrote:

Ahh! Missed it. Updated now.

@parashari​ are you also able to share the original roads for the same region?

 


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