Examples of graphicalSymbols()


Examples of org.geotools.styling.Graphic.graphicalSymbols()

    Graphic city = builder.createGraphic();
    city.setSize(ff.literal(10));
    city.graphicalSymbols().add(builder.createExternalGraphic("file:city.svg", "svg")); // svg
                                                                                        // preferred
    city.graphicalSymbols().add(builder.createExternalGraphic("file:city.png", "png")); // png next
    city.graphicalSymbols().add(
            builder.createMark(StyleBuilder.MARK_CIRCLE, Color.BLUE, Color.BLACK, 1));
    PointSymbolizer pointSymbolizer = builder.createPointSymbolizer(city, "the_geom");
   
    Rule rule1 = builder.createRule(pointSymbolizer);
    rule1.setName("rule1");
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

    PointSymbolizer pointSymbolizer = styleBuilder.createPointSymbolizer();
   
    Graphic graphic = styleBuilder.createGraphic();
    ExternalGraphic external = styleBuilder.createExternalGraphic("file:///C:/images/house.gif",
            "image/gif");
    graphic.graphicalSymbols().add(external);
    graphic.graphicalSymbols().add(styleBuilder.createMark("circle"));
   
    pointSymbolizer.setGraphic(graphic);
   
    Rule rule = styleBuilder.createRule(pointSymbolizer);
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

   
    Graphic graphic = styleBuilder.createGraphic();
    ExternalGraphic external = styleBuilder.createExternalGraphic("file:///C:/images/house.gif",
            "image/gif");
    graphic.graphicalSymbols().add(external);
    graphic.graphicalSymbols().add(styleBuilder.createMark("circle"));
   
    pointSymbolizer.setGraphic(graphic);
   
    Rule rule = styleBuilder.createRule(pointSymbolizer);
    FeatureTypeStyle featureTypeStyle = styleBuilder.createFeatureTypeStyle("Feature", rule);
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        assertEquals("This is just a simple example of a point symbolizer.",
                sym.getDescription().getAbstract().toString());

        Graphic g = sym.getGraphic();
        assertEquals(15.0, g.getSize().evaluate(null, Double.class));
        assertEquals(1, g.graphicalSymbols().size());

        ExternalGraphic eg = (ExternalGraphic) g.graphicalSymbols().get(0);
        assertNull(eg.getLocation());
        assertEquals("image/png", eg.getFormat());
        assertImagesEqual(referenceImage, eg.getInlineContent());
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        Graphic g = sym.getGraphic();
        assertEquals(15.0, g.getSize().evaluate(null, Double.class));
        assertEquals(1, g.graphicalSymbols().size());

        ExternalGraphic eg = (ExternalGraphic) g.graphicalSymbols().get(0);
        assertNull(eg.getLocation());
        assertEquals("image/png", eg.getFormat());
        assertImagesEqual(referenceImage, eg.getInlineContent());
        assertNull(eg.getLocation());
    }
View Full Code Here

Examples of org.geotools.styling.Graphic.graphicalSymbols()

        assertEquals("This is just a simple example of a point symbolizer.",
                sym.getDescription().getAbstract().toString());

        Graphic g = sym.getGraphic();
        assertEquals(15.0, g.getSize().evaluate(null, Double.class));
        assertEquals(1, g.graphicalSymbols().size());

        Mark mark = (Mark) g.graphicalSymbols().get(0);
        ExternalMark em = mark.getExternalMark();
        assertNotNull(em);
        assertEquals("image/png", em.getFormat());
View Full Code Here

Examples of org.opengis.style.Graphic.graphicalSymbols()

        Graphic graphic = symbolizer.getGraphic();
        if (graphic == null) {
            return null;
        }

        for( GraphicalSymbol gs : graphic.graphicalSymbols() ) {
            if ((gs != null) && (gs instanceof Mark)) {
                Mark mark = (Mark) gs;
                Fill fill = mark.getFill();
                if (fill != null) {
                    Color colour = color(fill.getColor());
View Full Code Here

Examples of org.opengis.style.Graphic.graphicalSymbols()

        Graphic graphic = symbolizer.getGraphic();
        if (graphic == null) {
            return null;
        }

        for( GraphicalSymbol gs : graphic.graphicalSymbols() ) {
            if ((gs != null) && (gs instanceof Mark)) {
                Mark mark = (Mark) gs;
                Stroke stroke = mark.getStroke();
                if (stroke != null) {
                    Color colour = color(stroke);
View Full Code Here

Examples of org.opengis.style.Graphic.graphicalSymbols()

        assertEquals("#333333", (String) ls.getStroke().getColor().evaluate(null, String.class));

        // check the rail
        ls = (LineSymbolizer) collector.symbolizers.get(1);
        Graphic graphic = ls.getStroke().getGraphicStroke();
        List<GraphicalSymbol> symbols = graphic.graphicalSymbols();
        assertEquals(1, symbols.size());
        Mark mark = (Mark) symbols.get(0);
        assertEquals("shape://vertline", mark.getWellKnownName().evaluate(null));
        assertEquals("#333333", mark.getStroke().getColor().evaluate(null, String.class));
        assertEquals(1, (int) mark.getStroke().getWidth().evaluate(null, Integer.class));
View Full Code Here

Examples of org.opengis.style.Graphic.graphicalSymbols()

        // check the dots
        LineSymbolizer ls = (LineSymbolizer) collector.symbolizers.get(0);
        assertTrue(Arrays.equals(new float[] { 4, 6 }, ls.getStroke().getDashArray()));
        Graphic graphic = ls.getStroke().getGraphicStroke();
        List<GraphicalSymbol> symbols = graphic.graphicalSymbols();
        assertEquals(1, symbols.size());
        Mark mark = (Mark) symbols.get(0);
        assertEquals("circle", mark.getWellKnownName().evaluate(null));
        assertEquals("#333333", mark.getStroke().getColor().evaluate(null, String.class));
        assertEquals(1, (int) mark.getStroke().getWidth().evaluate(null, Integer.class));
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.