Skip to main content
Solved

Which features share a common segment

  • July 23, 2015
  • 1 reply
  • 36 views

jdh
Contributor
Forum|alt.badge.img+40
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

Best answer by takashi

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
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

takashi
Celebrity
  • Best Answer
  • July 24, 2015
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