Skip to main content
Solved

maximum amount of non-neighbouring polygons

  • May 3, 2024
  • 2 replies
  • 49 views

lennertpronk
Contributor
Forum|alt.badge.img+1

Trying to find a  way to find the maximum amount (highest density) of polygons with the rule

the polygons must be non-neighbouring. Essentially selecting a polygon and jump to the next polygon which is not neighbouring and so fort and so on until you encounter a neighbouring one.

See attached picture which I hand-picked.

Best answer by tva

Hi @lennertpronk ,

 

Did you have a look at the FeatureColorSetter? https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/featurecolorsetter.htm

Especially the Color scheme: Map coloring. It should give a color id per group

 

This is a part off some clustered polygons:
 

And this whole workspace took 15.6 seconds at my side to complete so I find it a very convenient fast way for clustering (most time is taken up for reading/writing & topology building)

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.

2 replies

tva
Contributor
Forum|alt.badge.img+13
  • Contributor
  • Best Answer
  • May 3, 2024

Hi @lennertpronk ,

 

Did you have a look at the FeatureColorSetter? https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/featurecolorsetter.htm

Especially the Color scheme: Map coloring. It should give a color id per group

 

This is a part off some clustered polygons:
 

And this whole workspace took 15.6 seconds at my side to complete so I find it a very convenient fast way for clustering (most time is taken up for reading/writing & topology building)


lennertpronk
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • May 3, 2024

@tva thanks this worked for me