Skip to main content
Question

How to Aggregate and Group By Non-Contiguous Features

  • January 18, 2018
  • 7 replies
  • 87 views

I have a dataset of bikeway segments that I want to aggregate and group by name and type. For example, I want all "Heather" and "Protected Bike Lanes" to be one group. However, the aggregator joins non contiguous lines when it groups. As shown, there is one feature for both segments that have this name and type.

What I would like is to have two segments here. In other words, group by name and type, but only join if segments are within some reasonable threshold, like 10 meters. Is it possible?

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.

7 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • January 18, 2018

Hi @jimo,

I think you might want to consider looking a the Snapper transformer here. You can snap by groups and also set a tolerance. This tolerance can be set to 10 m (or whatever you like) which will decide weather to Snap or not.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3430 replies
  • January 18, 2018

Have you looked at the neighbourhood aggregator?


takashi
Celebrity
  • 7843 replies
  • January 18, 2018

Hi @jimo,

I think you might want to consider looking a the Snapper transformer here. You can snap by groups and also set a tolerance. This tolerance can be set to 10 m (or whatever you like) which will decide weather to Snap or not.

The Snapper may not preserve some lines by default if their length are shorter than specified tolerance. If there could be shorter lines in the source geometries, try setting 'Yes' to the Save Short Lines parameter.

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • January 19, 2018

@jimo

I am not aware that the aggregator would be joining lines at all.

I think it is hard to see when the objects are in aggregated mode.

It seems you want to group by those attributes and a distance threshold.

You can have all endpoints get the distance by using a neighbourfinder (endpoints as candidates and candidate only mode) and use both these distances (each end) attributes as added group by values for the aggregator.

(don't use lines in neighbor search for obvious reasons..)


  • 0 replies
  • January 22, 2018

Have you looked at the neighbourhood aggregator?

The neighbourhood aggregator works but it seems to stop aggregating at a certain distance. Both of the selected features are grouped but both are "Dumphries" and "Local Street". The neighbourhood aggregator made two groups here.

 

 

 


  • 0 replies
  • January 22, 2018

Hi @jimo,

I think you might want to consider looking a the Snapper transformer here. You can snap by groups and also set a tolerance. This tolerance can be set to 10 m (or whatever you like) which will decide weather to Snap or not.

The Save Short Lines parameter preserves the short lines but it still adds new lines, as shown:

 


takashi
Celebrity
  • 7843 replies
  • January 23, 2018

Hi @jimo,

I think you might want to consider looking a the Snapper transformer here. You can snap by groups and also set a tolerance. This tolerance can be set to 10 m (or whatever you like) which will decide weather to Snap or not.

Possibly the Snapper Tolerance parameter value you've set is too large. Make sure that the parameter value is reasonable.