Package org.opengis.style

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


        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

        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

        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

        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

            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

        assertNotNull("rules are null", style.featureTypeStyles().get(0).rules());
        assertTrue("more or less that one rule is available", style.featureTypeStyles().get(0).rules().size() == 1);
        Rule rule = style.featureTypeStyles().get(0).rules().get(0);
        assertNotNull("rule is null", rule);

        List<? extends Symbolizer> symbolizers = rule.symbolizers();
        assertNotNull("symbolizers are null", symbolizers);
        assertTrue("more or less that one symbolizer is available", symbolizers.size() == 1);
        PointSymbolizer pointSymbolizer = (PointSymbolizer) symbolizers.get(0);
        assertNotNull("point symbolizer is null", pointSymbolizer);
View Full Code Here

        assertEquals(1, fts.rules().size());
   
        Rule rule = fts.rules().get(0);
        assertEquals("main", rule.getName());
       
        assertEquals(1, rule.symbolizers().size());
       
        PolygonSymbolizer sym = (PolygonSymbolizer) rule.symbolizers().get(0);
        assertEquals(UomOgcMapping.PIXEL.getUnit(), sym.getUnitOfMeasure());
        assertEquals(SLD.toColor("#96C3F5"), sym.getFill().getColor().evaluate(null, Color.class));
       
View Full Code Here

        Rule rule = fts.rules().get(0);
        assertEquals("main", rule.getName());
       
        assertEquals(1, rule.symbolizers().size());
       
        PolygonSymbolizer sym = (PolygonSymbolizer) rule.symbolizers().get(0);
        assertEquals(UomOgcMapping.PIXEL.getUnit(), sym.getUnitOfMeasure());
        assertEquals(SLD.toColor("#96C3F5"), sym.getFill().getColor().evaluate(null, Color.class));
       
    }
   
View Full Code Here

        assertEquals(1, cs.rules().size());
        Rule rule = cs.rules().get(0);
       
        assertEquals("ChannelSelection", rule.getName());
        assertEquals("Gray channel mapping", rule.getDescription().getTitle().toString());
        assertEquals(1, rule.symbolizers().size());
       
        RasterSymbolizer sym = (RasterSymbolizer) rule.symbolizers().get(0);
        assertEquals("Band.band1", sym.getChannelSelection().getGrayChannel().getChannelName());
    }
   
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.