|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.demo.filter.function.DynamicFillColor
public class DynamicFillColor
Demonstrates using a custom-written filter function to dynamically set the fill and outline color of polygon features based on the value of a specified feature attribute. Here we use the countries shapefile and the log of population size as the value to base color on.
Constructor Summary | |
---|---|
DynamicFillColor()
Construtor - just initializes our factory objects |
Method Summary | |
---|---|
Style |
createColorRampStyle(java.lang.String attrName,
float minValue,
float maxValue,
boolean logValues)
Creates a new Style object for polygon features in which the fill and outline stroke colors will be based on the specified feature attribute (a numeric field). |
static void |
main(java.lang.String[] args)
Main method, runs a demo displaying the countries shapefile with fill and outline colors based on population data |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicFillColor()
Method Detail |
---|
public Style createColorRampStyle(java.lang.String attrName, float minValue, float maxValue, boolean logValues)
attrName
- the name of the feature attribute to use as the
value fieldminValue
- the minimum expected feature valuemaxValue
- the maximum expected feature valuelogValues
- if true, calculations will use the log of feature
value (in this case min and max value parameters should be on
the log scale); if false feature values are used directly
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- ignored
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |