Skip to main content

Hi everybody,

I have a map with 'Layer A' (polygons district boundary) and 'Layer B' (lines roads).

I would like to add a field on my 'Layer B' table with the name of every district crossed by each road.

In this example, I would like my Road 1 attribute to tell me it crosses 'City A', 'City B', 'City C', and 'City D'. And my road 2 attribute to tell me it crosses ‘City A’.

Could you please show me how to make it? Thank you

 

 

Hello @hoa_le 

 

I suggest you to use te transformer LineOnAreaOverlayer and enable the List Attributes.


Hello @hoa_le 

 

I suggest you to use te transformer LineOnAreaOverlayer and enable the List Attributes.

Hello @danilo_fme ,

If I use LineOnAreaOverlayer, it will split multiple road based on polygon? Actually, I want to keep number records in Road.


Could you share your data?


I would suggest the SpatialRelator and Generate List of the cities. Then use the ListConcatenator to create the attribute that has all the city names for each road.


I would suggest the SpatialRelator and Generate List of the cities. Then use the ListConcatenator to create the attribute that has all the city names for each road.

Thank you so much, I did it :)


Hi everyody,
If I want to calculate length intersect with each city or scale length of each road in the each city if the road cross. I dont’ want to use LineOnOverlayArea, because it seperate line.
How can I do? Thank you


@hoa_le thats an interesting question. Although you dont want to use the LineOnArea Overlay tool, thats the tool you need in this case.

General Workflow
You need different transformers for this but the main steps are these ones:

  • Split the lines into sublines with LineonAreaOverlay
  • Compute the length of each subline
  • Join this information back to the original lines

You could include an attribute for example with the length distribution of the crossed cities in            your final dataset:
'Length per city':
1500 m - city A - 1000 m - city B - 2000 m - city C - 100m - city D

I can supply you with a workspace when needed :)


Reply