Skip to main content
Solved

Which features share a common segment

  • July 23, 2015
  • 1 reply
  • 22 views

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
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
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Influencer
  • 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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings