Package dev.avelar.mapnik
Class Rule
java.lang.Object
dev.avelar.mapnik.Rule
Says which features get which symbolizers: an optional filter and scale range, then what to draw.
Rules in a
Style are tried in order.-
Method Summary
Modifier and TypeMethodDescriptionadd(Symbolizer... symbolizers) Matches only features that an earlier rule in the style already matched: the opposite ofelseFilter().static Rulecreate()Matches features that no earlier rule in the style matched.Only features matching this expression, in Mapnik's expression language, for example"[population] > 100000 and [kind] = 'city'".The filter expression, if the rule has one.booleanisAlso()booleanisElse()maxScale()maxScaleDenominator(double v) The rule applies only when the map's scale denominator is below this.minScale()minScaleDenominator(double v) The rule applies only when the map's scale denominator is at least this (zoomed out less than this).name()title()toString()toXml()
-
Method Details
-
create
-
name
-
title
-
filter
Only features matching this expression, in Mapnik's expression language, for example"[population] > 100000 and [kind] = 'city'". Attribute names go in brackets. -
elseFilter
Matches features that no earlier rule in the style matched. -
alsoFilter
Matches only features that an earlier rule in the style already matched: the opposite ofelseFilter(). Use it to add a detail to features another rule drew, for example a centre dot. It does nothing inStyle.FilterMode.FIRSTmode, where a feature stops at its first matching rule. -
minScaleDenominator
The rule applies only when the map's scale denominator is at least this (zoomed out less than this). -
maxScaleDenominator
The rule applies only when the map's scale denominator is below this. -
add
-
name
-
title
-
filterExpression
The filter expression, if the rule has one. -
isElse
public boolean isElse() -
isAlso
public boolean isAlso() -
minScale
-
maxScale
-
symbolizers
-
toXml
-
toString
-