Skip to main content

Hi,

I'm looking to produce a map which visualizes polygons based on an attribute value (e.g, population) and scales them high to low or low to high. Using FeatureColorSetter i can apply a random colour to each area based on an attribute, but i would like to apply a colour scale. For example, going from a dark red (highest population) to light green (lowest population). Is this something that can be done, without having to use a styling transformer for each different attribute?

Thanks

Hi @johnwk, possibly the RGBGradationCalculator from FME Hub could help you. This custom transformer generates a list attribute which stores color values based on specified two or more seed color values and number of colors. You can explode the list with the ListExploder and then merge an appropriate color value to each polygon using the list index (= rank of population) as Join On parameter.

Demo: rgb-gradation-calculator-example.fmwt (FME 2018.1.0.3)


one of many variants, you can find many creative ways to do it.

(this is actualy one line, I split it to keep it readable)

Get min/max using a statisticscalculator.


Reply