Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

A dataset with a set of points has an attribute called HEIGHTS which is filled with numbers like, 10.8, 0.4 and 150.6 etc... I want to transform this dataset to a shape file. In the transformation I want to add a new column to the shape file which will need to contain a color code.
How can I map the height values to this color code?
For example all heights between 5-10 should have the color dark blue, all heights between 10 and 20 should have the color light blue etc...... I tried to use the valuemapper transformer, but it only seems to work for 1:1 mappings.

I am using FME 2009.
This means that I cannot use the AttributeRangeMapper and AttributerRangeFilter transformers.
Can I conclude that what I want is not possible in FME 2009 and I should look at a newer version on FME.

Thanks for your efforts.

share|improve this question
1  
How about using the AttributeRangeFilter? Give each range it's own Output Port. Then use the StringFormatter to replace the numeric values with your color values. –  dchaboya Dec 21 '12 at 16:34
2  
Does 2009 have PythonCallers? If so, you could just write a function that runs the value through a set if if statements and set the color code that way. –  Chad Cooper Dec 27 '12 at 16:58
add comment

2 Answers

up vote 2 down vote accepted

FME 2009 supports Tester transformers; you could chain a bunch of those together (one for each range) and tag features that pass accordingly while passing fails onto the next tester for further evalutation.

share|improve this answer
    
I have tested it and it works. It's not pretty en can make your workspace really large if you have a large number of classes to go through, but it works. Thanks. –  Freeze Jan 27 '13 at 14:32
add comment

not ideal but as a bit of a fudge you could use an attribute range mapper on the height column - each output then going to a separate attribute creator for the colour column

share|improve this answer
1  
I am affraid both the attributeRangeFilter and AttributeRangeMapper only exist in FME 2010 and onward and not in FME 2009. Such a shame, because the do seem to give me what I want. –  Freeze Dec 27 '12 at 14:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.