Skip to main content
Is there a way to determine which features share a common segment?  The CommonSegmentFinder just routs features as to whether there is a segment in common with any other feature or not. Whereas the SpatialRelator gives all the features that touch the feature.

 

 

What I would like is a cross between the two,  the list of related features as in the SpatialRelator, but the relation being shares a segment with
Hi,

 

 

If the geometry type of the features is polygon, the TopologyBuilder could be one of choices.

 

- Send the features to the Area port.

 

- Set Yes to the "Propagate All Attributes From Input" parameter.

 

 

With this setting, the output Lines will have a list attribute called "_polygons{}.*" which stores all the original attributes of the left and/or right polygon. If the line is a shared boundary of adjoining two polygons, the number of the elements will be two - i.e. left and right polygons.

 

Therefore, by checking the list contents, you can determine which two polygons have a shared segment if the source polygons had unique ID attribute.

 

 

If you set Yes to the "Assume Clean Data" parameter, shared segments (both end vertices of the line are also shared by the adjoining polygons) will be detected; otherwise, all parts of the shared boundaries will be detected.

 

 

Takashi

Reply