Skip to main content
Question

Find multi-part polylines where gaps exist between parts


Forum|alt.badge.img+1

Hello, can anyone help with this? I have a polyline dataset and need to create an output all multi-part features but only where there are gaps between the individual parts within a feature, i.e. at least one of the feature parts is not intersecting any of the other feature parts in any way.

 

Thanks in advance.

3 replies

mark2atsafe
Safer
Forum|alt.badge.img+43

So... I think you will have to deaggregate the features, because I can't see a way to do this as a multi-part feature.

Assuming each feature has a unique ID (if not, use a Counter to create one)...

One technique is the NetworkTopologyCalculator. Deaggregate the features (Deaggregator) and send them to a NetworkTopologyCalculator. Use Group-By the ID number.

If all features emerge with the same network ID value, then they all connect without gaps. You might find this by reaggregating the data (Aggregator, Group By feature ID) creating a list of network IDs in the process. If there is more than one entry in the list (ListElementCounter) then there is a gap.

The limitation here is that all parts of the multi-part feature must be in a network form. For example, two lines crossing each other without a node at that intersection, would count as separate networks.

Secondly... well - to be honest - I can't think of another method. The SpatialFilter will handle aggregates but can only check the aggregate against itself (so it's bound to pass).

Actually, the NeighborFinder might work. Send the data into the Candidates port (use the Candidates Only option in the parameters) and group by ID number. Create a list of nearest candidates. If _distance comes out as greater than 0 then you know something is dissconnected. But that's not hugely different from the Network method above.

I hope this helps. Actually I hope that someone can find something obvious that I'm missing, but in lieu of that I've got my fingers crossed that one of my techniques provides an answer.


mark2atsafe
Safer
Forum|alt.badge.img+43
mark2atsafe wrote:

So... I think you will have to deaggregate the features, because I can't see a way to do this as a multi-part feature.

Assuming each feature has a unique ID (if not, use a Counter to create one)...

One technique is the NetworkTopologyCalculator. Deaggregate the features (Deaggregator) and send them to a NetworkTopologyCalculator. Use Group-By the ID number.

If all features emerge with the same network ID value, then they all connect without gaps. You might find this by reaggregating the data (Aggregator, Group By feature ID) creating a list of network IDs in the process. If there is more than one entry in the list (ListElementCounter) then there is a gap.

The limitation here is that all parts of the multi-part feature must be in a network form. For example, two lines crossing each other without a node at that intersection, would count as separate networks.

Secondly... well - to be honest - I can't think of another method. The SpatialFilter will handle aggregates but can only check the aggregate against itself (so it's bound to pass).

Actually, the NeighborFinder might work. Send the data into the Candidates port (use the Candidates Only option in the parameters) and group by ID number. Create a list of nearest candidates. If _distance comes out as greater than 0 then you know something is dissconnected. But that's not hugely different from the Network method above.

I hope this helps. Actually I hope that someone can find something obvious that I'm missing, but in lieu of that I've got my fingers crossed that one of my techniques provides an answer.

Hmmm. Interestingly the StreamOrderCalculator might be another way to go. In reality it wouldn't be much different to the NetworkTopologyCalculator, but if it outputs Unused parts, then these are pieces that don't belong to the network, and so lines are not connected. Again, it needs deaggregating and also needs a point feature (CoordinateExtractor + VertexCreator) to set a "destination" point.


Forum|alt.badge.img+1
  • Author
  • July 30, 2019

Thanks @mark2atsafe, I have managed to achieve what I need via this route: Deaggregator - NeighborFinder - Tester (distance > 1) - Aggregator

Much appreciated.


Reply


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