Package org.geotools.styling

Examples of org.geotools.styling.PointSymbolizer.accept()


        URL urlExternal = getClass().getResource("/data/sld/blob.gif");
        ExternalGraphic extg = sb.createExternalGraphic(urlExternal, "image/svg+xml");
        Graphic graphic = sb.createGraphic(extg, null, null);
        PointSymbolizer pointSymb = sb.createPointSymbolizer(graphic);

        pointSymb.accept(visitor);
        PointSymbolizer clone = (PointSymbolizer) visitor.getCopy();

        assertCopy(pointSymb, clone);
        assertEqualsContract(pointSymb, clone);
       
View Full Code Here


    }

    public void testPointSymbolizerWithUOM() throws Exception {
        PointSymbolizer pointSymb = sf.createPointSymbolizer();
        pointSymb.setUnitOfMeasure(UomOgcMapping.FOOT.getUnit());
        pointSymb.accept(visitor);
        PointSymbolizer clone = (PointSymbolizer) visitor.getCopy();

        assertCopy(pointSymb, clone);
        assertEqualsContract(pointSymb, clone);
View Full Code Here

       
        // Set a function as geometry
        Function geomFunc = ff.function("centroid", ff.property("thr_geom"));
        pointSymb.setGeometry(geomFunc);

        pointSymb.accept(visitor);
        PointSymbolizer copy = (PointSymbolizer) visitor.getCopy();

        assertEquals("Any Expression set as Geometry must be correctly replicated",geomFunc, copy.getGeometry());
    }
   
View Full Code Here

        // first see it in feet
        ps.setUnitOfMeasure(NonSI.FOOT);
       
        // rescale it
        UomRescaleStyleVisitor visitor = new UomRescaleStyleVisitor(10);
        ps.accept(visitor);
        PointSymbolizer rps = (PointSymbolizer) visitor.getCopy();
        Mark rm = (Mark) rps.getGraphic().graphicalSymbols().get(0);
        assertEquals(1524.0, rm.getStroke().getWidth().evaluate(null, Double.class), 0d);
       
        // now let's see the same in meters
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.