Package org.geotools.styling

Examples of org.geotools.styling.Style.featureTypeStyles()


            } else {
                // add the new entry to the array
                List<FeatureTypeStyle> fts2 = new ArrayList<FeatureTypeStyle>(fts);
                Collections.copy(fts2, fts);
                fts2.add(featureTypeStyle);
                style.featureTypeStyles().clear();
                style.featureTypeStyles().addAll(fts2);
            }
        }

        this.style = style;
View Full Code Here


                // add the new entry to the array
                List<FeatureTypeStyle> fts2 = new ArrayList<FeatureTypeStyle>(fts);
                Collections.copy(fts2, fts);
                fts2.add(featureTypeStyle);
                style.featureTypeStyles().clear();
                style.featureTypeStyles().addAll(fts2);
            }
        }

        this.style = style;
    }
View Full Code Here

        // basic drill down
        assertEquals(1, sld.getStyledLayers().length);
        NamedLayer layer = (NamedLayer) sld.getStyledLayers()[0];
        assertEquals(1, layer.getStyles().length);
        Style style = layer.getStyles()[0];
        assertEquals(1, style.featureTypeStyles().size());
        FeatureTypeStyle fts = style.featureTypeStyles().get(0);
        assertEquals(1, fts.rules().size());
        Rule rule = fts.rules().get(0);
        assertEquals(4,  rule.symbolizers().size());
       
View Full Code Here

        assertEquals(1, sld.getStyledLayers().length);
        NamedLayer layer = (NamedLayer) sld.getStyledLayers()[0];
        assertEquals(1, layer.getStyles().length);
        Style style = layer.getStyles()[0];
        assertEquals(1, style.featureTypeStyles().size());
        FeatureTypeStyle fts = style.featureTypeStyles().get(0);
        assertEquals(1, fts.rules().size());
        Rule rule = fts.rules().get(0);
        assertEquals(4,  rule.symbolizers().size());
       
        // every symbolizer has the vendor option
View Full Code Here

        Rule rule = styleFactory.createRule();
        rule.symbolizers().add(sym);
        FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle(new Rule[]{rule});
        Style style = styleFactory.createStyle();
        style.featureTypeStyles().add(fts);

        return style;
    }

    /**
 
View Full Code Here

        Rule rule = styleFactory.createRule();
        rule.symbolizers().add(sym);
        FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle(new Rule[]{rule});
        Style style = styleFactory.createStyle();
        style.featureTypeStyles().add(fts);

        return style;
    }

    /**
 
View Full Code Here

        Rule rule = styleFactory.createRule();
        rule.symbolizers().add(sym);
        FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle(new Rule[]{rule});
        Style style = styleFactory.createStyle();
        style.featureTypeStyles().add(fts);

        return style;
    }

    /**
 
View Full Code Here

    public static Style getDefaultStyle( StyledLayerDescriptor sld ) {
        Style[] styles = styles(sld);
        for( int i = 0; i < styles.length; i++ ) {
            Style style = styles[i];
            List<FeatureTypeStyle> ftStyles = style.featureTypeStyles();
            genericizeftStyles(ftStyles);
            if (style.isDefault()) {
                return style;
            }
        }
View Full Code Here

            if (!(temp instanceof SimpleFeature)) {
                throw new UnsupportedOperationException("not a SimpleFeature");
            }
            sampleFeature = (SimpleFeature) temp;
        }
        final FeatureTypeStyle[] ftStyles = gt2Style.featureTypeStyles().toArray(
                new FeatureTypeStyle[0]);
        final double scaleDenominator = request.getScale();

        final Rule[] applicableRules;
        if (request.getRule() != null) {
View Full Code Here

              return createPointStyle(strokeColor, fillColor);
          }
      }
     
        Style style = styleFactory.createStyle();
        style.featureTypeStyles().addAll(createPolygonStyle(strokeColor, fillColor).featureTypeStyles());
        style.featureTypeStyles().addAll(createLineStyle(strokeColor).featureTypeStyles());
        style.featureTypeStyles().addAll(createPointStyle(strokeColor, fillColor).featureTypeStyles());
        System.out.println("Created Geometry Style: "+style);
        return style;
    }
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.