当前位置: 首页>>代码示例>>Java>>正文


Java FeatureTypeStyle.setTransformation方法代码示例

本文整理汇总了Java中org.geotools.styling.FeatureTypeStyle.setTransformation方法的典型用法代码示例。如果您正苦于以下问题:Java FeatureTypeStyle.setTransformation方法的具体用法?Java FeatureTypeStyle.setTransformation怎么用?Java FeatureTypeStyle.setTransformation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.geotools.styling.FeatureTypeStyle的用法示例。


在下文中一共展示了FeatureTypeStyle.setTransformation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateSymbol

import org.geotools.styling.FeatureTypeStyle; //导入方法依赖的package包/类
/**
 * Update symbol.
 */
private void updateSymbol() {
    if (!Controller.getInstance().isPopulating()) {
        StandardData standardData = getStandardData();

        Expression transformation = fieldConfigVisitor
                .getExpression(FieldIdEnum.TRANSFORMATION);

        FeatureTypeStyle existingFTS = SelectedSymbol.getInstance().getFeatureTypeStyle();
        if (existingFTS != null) {
            List<org.opengis.style.Rule> newRuleList = new ArrayList<org.opengis.style.Rule>();
            for (org.opengis.style.Rule rule : existingFTS.rules()) {
                newRuleList.add(rule);
            }

            FeatureTypeStyle fts = (FeatureTypeStyle) getStyleFactory().featureTypeStyle(
                    standardData.name, (org.opengis.style.Description) standardData.description,
                    existingFTS.getFeatureInstanceIDs(), existingFTS.featureTypeNames(),
                    existingFTS.semanticTypeIdentifiers(), newRuleList);

            if (transformation != null) {
                fts.setTransformation(transformation);
            }

            if (vendorOptionFTSFactory != null) {
                vendorOptionFTSFactory.updateSymbol(fts);
            }

            SelectedSymbol.getInstance().replaceFeatureTypeStyle(fts);

            this.fireUpdateSymbol();
        }
    }
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:37,代码来源:FeatureTypeStyleDetails.java

示例2: visit

import org.geotools.styling.FeatureTypeStyle; //导入方法依赖的package包/类
/**
 * Visit.
 *
 * @param fts the fts
 */
/*
 * (non-Javadoc)
 * 
 * @see org.geotools.styling.visitor.DuplicatingStyleVisitor#visit(org.geotools.styling.
 * FeatureTypeStyle)
 */
@SuppressWarnings("deprecation")
@Override
public void visit(FeatureTypeStyle fts) {

    FeatureTypeStyle copy = new FeatureTypeStyleImpl((FeatureTypeStyleImpl) fts);

    if (!options.isTransformationApplied()) {
        copy.setTransformation(null);
    }

    Rule[] rules = fts.getRules();

    int length = rules.length;
    Rule[] rulesCopy = null;
    if (this.ruleToRender == null) {
        rulesCopy = new Rule[length];
        for (int i = 0; i < length; i++) {
            if (rules[i] != null) {
                rules[i].accept(this);
                rulesCopy[i] = (Rule) pages.pop();
            }
        }
    } else {
        rulesCopy = new Rule[1];
        for (int i = 0; i < length; i++) {
            if (rules[i] != null) {
                if (renderRule(rules[i])) {
                    rules[i].accept(this);
                    rulesCopy[0] = (Rule) pages.pop();
                }
            }
        }
    }
    copy.setRules(rulesCopy);

    if (STRICT && !copy.equals(fts)) {
        throw new IllegalStateException(
                "Was unable to duplicate provided FeatureTypeStyle:" + fts);
    }
    pages.push(copy);
}
 
开发者ID:robward-scisys,项目名称:sldeditor,代码行数:53,代码来源:RuleRenderVisitor.java


注:本文中的org.geotools.styling.FeatureTypeStyle.setTransformation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。