本文整理了Java中org.geotools.styling.Rule.getMinScaleDenominator
方法的一些代码示例,展示了Rule.getMinScaleDenominator
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Rule.getMinScaleDenominator
方法的具体详情如下:
包路径:org.geotools.styling.Rule
类名称:Rule
方法名:getMinScaleDenominator
[英]The smallest value for scale denominator at which symbolizers contained by this rule should be applied.
[中]应应用此规则包含的符号的比例分母的最小值。
代码示例来源:origin: geotools/geotools
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r The rule
* @return true if the scale is compatible with the rule settings
*/
private boolean isWithInScale(Rule r) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: geotools/geotools
/**
* Returns the min scale of the default (first) rule
*
* @param fts the feature type style
* @return min scale or 0 if no min scale is set
*/
public static double minScale(FeatureTypeStyle fts) {
if (fts == null || fts.rules().isEmpty()) return 0.0;
return fts.rules().get(0).getMinScaleDenominator();
}
代码示例来源:origin: geotools/geotools
public RuleBuilder reset(Rule rule) {
if (rule == null) {
return unset();
}
name = rule.getName();
title = rule.getTitle();
ruleAbstract = rule.getAbstract();
minScaleDenominator = rule.getMinScaleDenominator();
maxScaleDenominator = rule.getMaxScaleDenominator();
filter = rule.getFilter();
elseFilter = rule.isElseFilter();
symbolizers.clear();
symbolizers.addAll(rule.symbolizers()); // TODO: unpack into builders in order to "copy"
symbolizerBuilder = null;
unset = false;
legend.reset(rule.getLegend());
return this;
}
代码示例来源:origin: geotools/geotools
copy.setElseFilter(rule.isElseFilter());
copy.setMaxScaleDenominator(rule.getMaxScaleDenominator());
copy.setMinScaleDenominator(rule.getMinScaleDenominator());
代码示例来源:origin: org.geotools/gt-render
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r
* The rule
* @return true if the scale is compatible with the rule settings
*/
private boolean isWithInScale(Rule r) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geoserver/wms
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r
* The rule
* @return true if the scale is compatible with the rule settings
*/
public static boolean isWithInScale(Rule r, double scaleDenominator) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geotools/gt-shapefile-renderer
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r The rule
* @return true if the scale is compatible with the rule settings
*/
private boolean isWithInScale( Rule r ) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geoserver.extension/imagemap
/**
* Evaluates if the supplied scaleDenominator is congruent with a rule defined scale range.
* @param r current rule
* @param scaleDenominator current value to verify
* @return true if scaleDenominator is in the rule defined range
*/
public static boolean isWithInScale(Rule r,double scaleDenominator) {
return ((r.getMinScaleDenominator() ) <= scaleDenominator)
&& ((r.getMaxScaleDenominator()) > scaleDenominator);
}
代码示例来源:origin: org.geotools/gt2-shapefile-renderer
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r The rule
* @return true if the scale is compatible with the rule settings
*/
private boolean isWithInScale( Rule r ) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geotools/gt2-render
/**
* Checks if a rule can be triggered at the current scale level
*
* @param r
* The rule
* @return true if the scale is compatible with the rule settings
*/
private boolean isWithInScale(Rule r) {
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geoserver.community/gs-vectortiles
/**
* Checks if a rule can be triggered at the current scale level
*
* @return true if the scale is compatible with the rule settings
*/
private static boolean isWithInScale(Rule r, double scaleDenominator) {
/** Tolerance used to compare doubles for equality */
final double TOLERANCE = 1e-6;
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geoserver.extension/gs-vectortiles
/**
* Checks if a rule can be triggered at the current scale level
*
* @return true if the scale is compatible with the rule settings
*/
private static boolean isWithInScale(Rule r, double scaleDenominator) {
/** Tolerance used to compare doubles for equality */
final double TOLERANCE = 1e-6;
return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}
代码示例来源:origin: org.geotools/gt-widgets-swing-pending
public Component getComponent(TreePath[] selection) {
ContextTreeNode node = (ContextTreeNode) selection[0].getLastPathComponent();
rule = (Rule) node.getUserObject() ;
Double d = new Double(rule.getMinScaleDenominator());
gui_scale.setValue( d );
return this;
}
代码示例来源:origin: geotools/geotools
if (rule.getMinScaleDenominator() != 0.0) {
element("MinScaleDenominator", rule.getMinScaleDenominator() + "");
代码示例来源:origin: geotools/geotools
assertEquals("Medium", rule.getName());
assertEquals(360000000d, rule.getMaxScaleDenominator(), 0.1);
assertEquals(180000000d, rule.getMinScaleDenominator(), 0.1);
assertEquals(360000000d, rule.getMinScaleDenominator(), 0.1);
代码示例来源:origin: org.geotools/gt-main
/**
* Returns the min scale of the default (first) rule
*
* @param fts the feature type style
*
* @return min scale or 0 if no min scale is set
*/
public static double minScale( FeatureTypeStyle fts ) {
if(fts == null || fts.rules().isEmpty())
return 0.0;
return fts.rules().get(0).getMinScaleDenominator();
}
代码示例来源:origin: geotools/geotools
assertEquals(160000000.0, rule.getMinScaleDenominator(), 0.1);
assertEquals(320000000.0, rule.getMaxScaleDenominator(), 0.1);
assertEquals(320000000.0, rule.getMinScaleDenominator(), 0.1);
代码示例来源:origin: geotools/geotools
toStringOrNull(rule.getMinScaleDenominator(), "min"),
toStringOrNull(rule.getMaxScaleDenominator(), "max"));
if (!t.isNull()) {
代码示例来源:origin: geotools/geotools
assertEquals("Medium", rule.getName());
assertEquals(200000000d, rule.getMaxScaleDenominator(), 0.1);
assertEquals(100000000d, rule.getMinScaleDenominator(), 0.1);
assertEquals(200000000d, rule.getMinScaleDenominator(), 0.1);
代码示例来源:origin: org.geoserver/gs-wms
public void visit(Rule rule) {
if (rule.getMinScaleDenominator() < scaleDenominator
&& rule.getMaxScaleDenominator() > scaleDenominator) {
for (Symbolizer s : rule.symbolizers()) s.accept(this);
}
}
内容来源于网络,如有侵权,请联系作者删除!