Skip to main content

Hi all,

 

 

I have to classify polygons without attribute values, according to neighbouring attribute values. However, this has to be based on the neighbour with the largest shared boundary . A comparisation of shared lengths is necessary when the polygon shares boundaries with two others for example.

 

 

I have used a geometrycoercer to first make a line of both sets. Then a lineonline overlayer, since I don't think the common segment finder will help me. However, I cannot get to calculate the percentages of different shared boundary so im looking for suggestions.

 

 

I hope I made myself clear. Thank you in advance!

I don't have access to FME right now, so I may not get all the port/parameter names right.

The way I would do this is send the original data into a TopologyBuilder, generate list form input edges (all attributes).

Use a LengthCalculator on the Edges. Tester to filter out any edges where the _left_face or _right_face is 0 (universe polygon)

Then send both the Faces (Requestor) and Edges (Supplier) to a ListBasedFeatureMerger.

 

The Requestor List attribute would be the _edge_list{}._edge_id, and the supplier attribute would be _edge_id, and a generate a list with the _left_face, right_face and _length attributes.

You want both the merged and unmerged ports.

You now have your polygons with a list containing each common edge and the face_id of the adjoining polygon (either left or right face, which ever is not the same as the _face_id).

You can then sort your list based on the longest edge length, or manipulate it and create a histogram in the cases where you have multiple adjoining segments, and it's the combined length you want.

Then a regular FeatureMerger to transfer the attributes you want based on the determined face_id.


Reply