Examples of symbolizers()


Examples of org.geotools.styling.Rule.symbolizers()

        assertEquals("Foundation", fts.getFeatureTypeName());
        assertEquals(1, fts.rules().size());
       
        Rule r = fts.rules().get(0);
        assertEquals("main", r.getName());
        assertEquals(1, r.symbolizers().size());
       
        PolygonSymbolizer sym = (PolygonSymbolizer) r.symbolizers().get(0);
    }
   
    public void testParseGraphicFill() throws Exception {
View Full Code Here

Examples of org.geotools.styling.Rule.symbolizers()

       
        Rule r = fts.rules().get(0);
        assertEquals("main", r.getName());
        assertEquals(1, r.symbolizers().size());
       
        PolygonSymbolizer sym = (PolygonSymbolizer) r.symbolizers().get(0);
    }
   
    public void testParseGraphicFill() throws Exception {
        StyledLayerDescriptor sld = (StyledLayerDescriptor) parse("../graphicFill.xml");
        NamedLayer layer = (NamedLayer) sld.getStyledLayers()[0];
View Full Code Here

Examples of org.geotools.styling.Rule.symbolizers()

        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
        PolygonSymbolizer poly = (PolygonSymbolizer) rule.symbolizers().get(0);
        assertEquals(1, poly.getOptions().size());
        assertEquals("true", poly.getOptions().get("labelObstacle"));
View Full Code Here

Examples of org.geotools.styling.Rule.symbolizers()

        assertEquals(1, fts.rules().size());
        Rule rule = fts.rules().get(0);
        assertEquals(4,  rule.symbolizers().size());
       
        // every symbolizer has the vendor option
        PolygonSymbolizer poly = (PolygonSymbolizer) rule.symbolizers().get(0);
        assertEquals(1, poly.getOptions().size());
        assertEquals("true", poly.getOptions().get("labelObstacle"));
       
        LineSymbolizer line = (LineSymbolizer) rule.symbolizers().get(1);
        assertEquals(1, line.getOptions().size());
View Full Code Here

Examples of org.geotools.styling.RuleImpl.symbolizers()

                 Filter geomCheck = ff.or(Arrays.asList(polygon, multiPolygon));
                 Filter ruleFilter = copy.getFilter();
                 Filter filter = ruleFilter == null || ruleFilter == Filter.INCLUDE ? geomCheck : ff.and(geomCheck, ruleFilter);
                 RuleImpl extra = new RuleImpl(copy);
                 extra.setFilter(filter);
                 extra.symbolizers().clear();
                 extra.symbolizers().add(sb.createPolygonSymbolizer());
                 extraRules.add(extra);
             }
           
        }
View Full Code Here

Examples of org.opengis.style.Rule.symbolizers()

        assertTrue("parsed xml into style", parsed.length > 0);

        Style style = parsed[0];
        assertNotNull(style);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        LineSymbolizer lineSymbolize = (LineSymbolizer) rule.symbolizers().get(0);
        Stroke stroke = lineSymbolize.getStroke();

        Expression color = stroke.getColor();
        Color value = color.evaluate(null, Color.class);
        assertNotNull("color", value);
View Full Code Here

Examples of org.opengis.style.Rule.symbolizers()

        assertTrue("parsed xml into style", parsed.length > 0);

        Style style = parsed[0];
        assertNotNull(style);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        LineSymbolizer lineSymbolize = (LineSymbolizer) rule.symbolizers().get(0);
        Stroke stroke = lineSymbolize.getStroke();

        Expression color = stroke.getColor();
        Color value = color.evaluate(null, Color.class);
        assertNotNull("color", value);
View Full Code Here

Examples of org.opengis.style.Rule.symbolizers()

        assertTrue("parsed xml into style", parsed.length > 0);

        Style style = parsed[0];
        assertNotNull(style);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        TextSymbolizer textSymbolize = (TextSymbolizer) rule.symbolizers().get(0);
        LabelPlacement labelPlacement = textSymbolize.getLabelPlacement();

        assertNotNull(labelPlacement);
    }
View Full Code Here

Examples of org.opengis.style.Rule.symbolizers()

        assertTrue("parsed xml into style", parsed.length > 0);

        Style style = parsed[0];
        assertNotNull(style);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        TextSymbolizer textSymbolize = (TextSymbolizer) rule.symbolizers().get(0);
        PointPlacement pointPlacement = (PointPlacement) textSymbolize.getLabelPlacement();

        assertNotNull(pointPlacement);
        assertNotNull(pointPlacement.getRotation());
    }
View Full Code Here

Examples of org.opengis.style.Rule.symbolizers()

        assertTrue("parsed xml into style", parsed.length > 0);

        Style style = parsed[0];
        assertNotNull(style);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        List<? extends Symbolizer> symbolizers = rule.symbolizers();
        assertEquals(1, symbolizers.size());
        PointSymbolizer symbolize = (PointSymbolizer) symbolizers.get(0);
        Graphic graphic = symbolize.getGraphic();
        List<GraphicalSymbol> symbols = graphic.graphicalSymbols();
        assertEquals(1, symbols.size());
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.