|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.brewer.color.StyleGenerator
public class StyleGenerator
Generates a style/featureTypeStyle using ColorBrewer.
WARNING: this is unstable and subject to radical change.
Field Summary | |
---|---|
static int |
ELSEMODE_IGNORE
|
static int |
ELSEMODE_INCLUDEASMAX
|
static int |
ELSEMODE_INCLUDEASMIN
|
Constructor Summary | |
---|---|
protected |
StyleGenerator()
|
Method Summary | |
---|---|
static FeatureTypeStyle |
createFeatureTypeStyle(Classifier classifier,
org.opengis.filter.expression.Expression expression,
java.awt.Color[] colors,
java.lang.String typeId,
org.opengis.feature.type.GeometryDescriptor geometryAttrType,
int elseMode,
double opacity,
Stroke defaultStroke)
Merges a classifier, array of colors and other data into a FeatureTypeStyle object. |
static boolean |
isRanged(java.lang.String styleExpression)
Determines if a string is an instance of a ranged expression or unique values. |
static void |
modifyFTS(FeatureTypeStyle fts,
int ruleIndex,
java.lang.String styleExpression)
|
static org.opengis.filter.Filter |
toExplicitFilter(java.lang.String styleExpression,
org.opengis.filter.expression.Expression attribExpr)
Creates a filter with each value explicitly defined. |
static org.opengis.filter.Filter |
toExplicitFilter(java.lang.String styleExpression,
org.opengis.feature.simple.SimpleFeatureType featureType,
java.lang.String attributeTypeName)
Creates a filter with each value explicitly defined. |
static org.opengis.filter.Filter[] |
toFilter(java.lang.String[] styleExpression,
org.opengis.feature.simple.SimpleFeatureType[] featureType,
java.lang.String[] attributeTypeName)
Converts an array of styleExpressions and attributes into Filters |
static org.opengis.filter.Filter |
toRangedFilter(java.lang.String styleExpression,
org.opengis.feature.simple.SimpleFeatureType featureType,
java.lang.String attributeTypeName,
boolean upperBoundClosed)
Creates a filter for a range of values. |
static java.lang.String |
toStyleExpression(org.opengis.filter.Filter filter)
|
static java.lang.String[] |
toStyleExpression(org.opengis.filter.Filter[] filter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ELSEMODE_IGNORE
public static final int ELSEMODE_INCLUDEASMIN
public static final int ELSEMODE_INCLUDEASMAX
Constructor Detail |
---|
protected StyleGenerator()
Method Detail |
---|
public static FeatureTypeStyle createFeatureTypeStyle(Classifier classifier, org.opengis.filter.expression.Expression expression, java.awt.Color[] colors, java.lang.String typeId, org.opengis.feature.type.GeometryDescriptor geometryAttrType, int elseMode, double opacity, Stroke defaultStroke) throws IllegalFilterException
classifier
- colors
- typeId
- semantic type identifier, which will be prefixed with
"colorbrewer:"geometryAttrType
- elseMode
- opacity
- defaultStroke
-
IllegalFilterException
public static void modifyFTS(FeatureTypeStyle fts, int ruleIndex, java.lang.String styleExpression) throws IllegalFilterException
IllegalFilterException
public static java.lang.String toStyleExpression(org.opengis.filter.Filter filter)
public static java.lang.String[] toStyleExpression(org.opengis.filter.Filter[] filter)
public static org.opengis.filter.Filter[] toFilter(java.lang.String[] styleExpression, org.opengis.feature.simple.SimpleFeatureType[] featureType, java.lang.String[] attributeTypeName) throws IllegalFilterException
Converts an array of styleExpressions and attributes into Filters
styleExpression[0] = "1..5";
styleExpression[1] = "5..10";
styleExpression[2] = "11, -13";
--->
filter[0] = [[1 <= attr] AND [attr < 5]]
filter[1] = [[6 <= attr] AND [attr <= 10]]
filter[2] = [[attr = 11] OR [attr = -13]]
styleExpression
- strings of ranged expressions "lowValue..highValue" or
explicit values "value1, value2"featureType
- attributeTypeName
-
IllegalFilterException
public static org.opengis.filter.Filter toRangedFilter(java.lang.String styleExpression, org.opengis.feature.simple.SimpleFeatureType featureType, java.lang.String attributeTypeName, boolean upperBoundClosed) throws IllegalFilterException
Creates a filter for a range of values.
Examples:
"1..5", closed=true --> [[1 <= attr] AND [attr <= 5]]
"1..10", closed=false --> [[1 <= attr] AND [attr < 10]]
"..10, closed=true --> [attr <= 10]
styleExpression
- the ranged style expression (minValue..maxValue)featureType
- the featureTypeattributeTypeName
- the attributeTypeName whose values correspond toupperBoundClosed
- does the upper bound include the max value? (true: <=, false: <)
IllegalFilterException
public static boolean isRanged(java.lang.String styleExpression)
public static org.opengis.filter.Filter toExplicitFilter(java.lang.String styleExpression, org.opengis.feature.simple.SimpleFeatureType featureType, java.lang.String attributeTypeName) throws IllegalFilterException
Creates a filter with each value explicitly defined.
Examples:
"LIB" --> [PARTY = LIB]
"LIB, NDP" --> [[PARTY = LIB] OR [PARTY = NDP]]
styleExpression
- the list of attribute values, separated by commas (and
optional spaces)attributeTypeName
- A Sting with the attributeTypeName whose values correspond to
IllegalFilterException
public static org.opengis.filter.Filter toExplicitFilter(java.lang.String styleExpression, org.opengis.filter.expression.Expression attribExpr) throws IllegalFilterException
Creates a filter with each value explicitly defined.
Examples:
"LIB" --> [PARTY = LIB]
"LIB, NDP" --> [[PARTY = LIB] OR [PARTY = NDP]]
styleExpression
- the list of attribute values, separated by commas (and
optional spaces)attribExpr
- an Expression to compare each value with (simple case = attributeExpression)
IllegalFilterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |