Skip to main content
Solved

maximum amount of non-neighbouring polygons


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)

View original
Did this help you find an answer to your question?

2 replies

tva
Contributor
Forum|alt.badge.img+12
  • 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


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