Examples of FeatureTypeStyle


Examples of org.geotools.styling.FeatureTypeStyle

        double minScale = Double.MIN_VALUE;
        double maxScale = Double.MAX_VALUE;
        float opacity = 1.0f;
        if (style != null) {
            try {
                FeatureTypeStyle featureStyle = style.featureTypeStyles().get(0);               
                Rule rule = featureStyle.rules().get(0);
                minScale = rule.getMinScaleDenominator();
                maxScale = rule.getMaxScaleDenominator();
                if (rule.getSymbolizers()[0] instanceof RasterSymbolizer) {
                    RasterSymbolizer rs = (RasterSymbolizer) rule.getSymbolizers()[0];
                    opacity = getOpacity(rs);
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

        double minScale = Double.MIN_VALUE;
        double maxScale = Double.MAX_VALUE;
        float opacity = 1.0f;
        if (style != null) {
            try {
                FeatureTypeStyle featureStyle = style.featureTypeStyles().get(0);               
                Rule rule = featureStyle.rules().get(0);
                minScale = rule.getMinScaleDenominator();
                maxScale = rule.getMaxScaleDenominator();
                if (rule.getSymbolizers()[0] instanceof RasterSymbolizer) {
                    RasterSymbolizer rs = (RasterSymbolizer) rule.getSymbolizers()[0];
                    opacity = getOpacity(rs);
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

      final List<Filter> filtersToDS = new ArrayList<Filter>();
     
      final int stylesLength = styles.length;
     
      int styleRulesLength;
      FeatureTypeStyle style;
      int u = 0;
      Rule r;
     
      for (int t = 0; t < stylesLength; t++) // look at each
      // featuretypestyle
      {
        style = styles[t];
       
        Rule[] rules=style.getRules();
        styleRulesLength = rules.length;
       
        for (u = 0; u < styleRulesLength; u++) // look at each
                            // rule in the
                            // featuretypestyle
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

        }

        List<FeatureTypeStyle> filtered = new ArrayList<FeatureTypeStyle>(featureTypeStyles.length);

        for (int i = 0; i < featureTypeStyles.length; i++) {
            FeatureTypeStyle featureTypeStyle = featureTypeStyles[i];
            String featureTypeName = featureTypeStyle.getFeatureTypeName();
            Rule[] rules=featureTypeStyle.getRules();
            if(rules!=null)
              rules=filterRules(rules);
            //does this style have any rules
            if (rules == null || rules.length == 0 ) {
              continue;
            }
            featureTypeStyle.setRules(rules);           
           
            //does this style apply to the feature collection
            if (featureType.getTypeName().equalsIgnoreCase(featureTypeName)
                    || FeatureTypes.isDecendedFrom(featureType,null,featureTypeName)) {
                filtered.add(featureTypeStyle);
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

            final FeatureTypeStyle[] featureStylers, final MapLayer layer)
            throws IOException, IllegalAttributeException {
        final int ftsLength = featureStylers.length;

        for (int i = 0; i < ftsLength; i++) {
            FeatureTypeStyle fts = featureStylers[i];
            final String typeName = features.getSchema().getTypeName();

            if ((typeName != null)
                    && (FeatureTypes.isDecendedFrom(features.getSchema(), null,
                            fts.getFeatureTypeName()) || typeName
                            .equalsIgnoreCase(fts.getFeatureTypeName()))) {
                // get applicable rules at the current scale
                Rule[] rules = fts.getRules();
                List ruleList = new ArrayList();
                List elseRuleList = new ArrayList();
                populateRuleLists(rules, ruleList, elseRuleList, false);

                if ((ruleList.size() == 0) && (elseRuleList.size() == 0)) {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

            throws IOException, IllegalAttributeException {
        final int ftStylesLength = featureStylers.length;

        for (int i = 0; i < ftStylesLength; i++) { // for each style

            FeatureTypeStyle fts = featureStylers[i];
            String typeName = features.getSchema().getTypeName();

            if ((typeName != null)
                    && (FeatureTypes.isDecendedFrom(features.getSchema(), null,
                            fts.getFeatureTypeName()) || typeName
                            .equalsIgnoreCase(fts.getFeatureTypeName()))) {
                // get applicable rules at the current scale
                Rule[] rules = fts.getRules();
                List ruleList = new ArrayList();
                List elseRuleList = new ArrayList();
                populateRuleLists(rules, ruleList, elseRuleList, false);

                if ((ruleList.size() == 0) && (elseRuleList.size() == 0)) {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

        final int ftStylesLength = featureStylers.length;

        for (int i = 0; i < ftStylesLength; i++) { // for each style

            FeatureTypeStyle fts = featureStylers[i];
            String typeName = features.getSchema().getTypeName();

            if ((typeName != null)
                    && (FeatureTypes.isDecendedFrom(features.getSchema(), null,
                            fts.getFeatureTypeName()) || typeName
                            .equalsIgnoreCase(fts.getFeatureTypeName()))) {
                // get applicable rules at the current scale
                Rule[] rules = fts.getRules();
                List ruleList = new ArrayList();
                List elseRuleList = new ArrayList();
                populateRuleLists(rules, ruleList, elseRuleList, true);

                if ((ruleList.size() == 0) && (elseRuleList.size() == 0)) {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

        }

        ArrayList filtered = new ArrayList(featureTypeStyles.length);

        for (int i = 0; i < featureTypeStyles.length; i++) {
            FeatureTypeStyle featureTypeStyle = featureTypeStyles[i];
            String featureTypeName = featureTypeStyle.getFeatureTypeName();

            //does this style have any rules
            if (featureTypeStyle.getRules() == null
                    || featureTypeStyle.getRules().length == 0) {
                continue;
            }

            //does this style apply to the feature collection
            if (featureType.getTypeName().equalsIgnoreCase(featureTypeName)
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

        final String typeName = ftype.getTypeName();
        FeatureTypeStyle[] featureStyles = style.getFeatureTypeStyles();
        final int length = featureStyles.length;
        for (int i = 0; i < length; i++) {
            // getting feature styles
            FeatureTypeStyle fts = featureStyles[i];

            // check if this FTS is compatible with this FT.
            if ((typeName != null)
                    && FeatureTypes.isDecendedFrom(ftype, null, fts
                            .getFeatureTypeName())) {

                // get applicable rules at the current scale
                Rule[] ftsRules = fts.getRules();
                for (int j = 0; j < ftsRules.length; j++) {
                    // getting rule
                    Rule r = ftsRules[j];

                    if (KMLUtils.isWithInScale(r, 1)) {
View Full Code Here

Examples of org.geotools.styling.FeatureTypeStyle

         */
        protected boolean processStyle(SimpleFeature ft,Style style,FeatureTypeStyle[] ftsList)
            throws IOException {
          int total=0;
          for(int i=0;i<ftsList.length;i++) {
            FeatureTypeStyle fts=ftsList[i];
            Rule[] rules=filterRules(fts, ft);
            total+=rules.length;
           
            for(int j=0;j<rules.length;j++)
              processRule(ft,rules[j]);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.