Skip to main content

Hi,

 

I have two shape files. One containing roads and one containing the grade of the condition of the road based of an inspection. The shape files share two attributes, starting point of the road and ending point of the road. I would like to add an attribute in the road shape file, which is the grade from the other shape file. Not every road has been graded, but I would like to add the grade as a new attribute for those that have a grade. So, if there is a matching starting and ending point in both shape files, which means that it is the same road, the grade should be printed as a new attribute in the road shape file.

 

I hope this makes sense. Thanks a lot in advance! :)

 

 

Hi @filipfaust​ ,

 

One way to do it would be using a FeatureMerger Transformer. I would run the Roads into the Requestor port and the inspections into the Supplier port. Then in the transformer, pair the start and end points from the Roads (requestor) with the start and end points from the inspections (supplier). You'll also want to make sure the Feature Merge Type is set to Attributes and Geometry.

This will essentially join the inspections to the roads with the valid features coming out the Merged port. From there you may need to use an AttributeManager or other such transformer to clean up your attributes before writing the data back out to a shapefile. Hope this helps. :)


Reply