Examples of FeatureLayer


Examples of org.geotools.map.FeatureLayer

         * with a default line and colour style
         */
        MapContent map = new MapContent();
        map.setTitle("Feature selection tool example");
        Style style = createDefaultStyle();
        Layer layer = new FeatureLayer(featureSource, style);
        map.addLayer(layer);
        mapFrame = new JMapFrame(map);
        mapFrame.enableToolBar(true);
        mapFrame.enableStatusBar(true);

View Full Code Here

Examples of org.geotools.map.FeatureLayer

        // Create a basic Style to render the features
        Style style = createStyle(file, featureSource);

        // Add the features and the associated Style object to
        // the MapContent as a new Layer
        Layer layer = new FeatureLayer(featureSource, style);
        map.addLayer(layer);

        // Now display the map
        JMapFrame.showMap(map);
    }
View Full Code Here

Examples of org.geotools.map.FeatureLayer

        File property = new File(TestData.getResource(this, "point.properties").toURI());
        PropertyDataStore ds = new PropertyDataStore(property.getParentFile());
        FeatureSource fs = ds.getFeatureSource("point");

        // prepare a feature layer with a query and the rendering tx
        FeatureLayer layer = new FeatureLayer(fs, style);
        layer.setQuery(new Query(null, CQL.toFilter("id > 5")));

        // render it
        MapContent mc = new MapContent();
        mc.addLayer(layer);
        StreamingRenderer renderer = new StreamingRenderer();
View Full Code Here

Examples of org.geotools.map.FeatureLayer

        File property = new File(TestData.getResource(this, "point.properties").toURI());
        PropertyDataStore ds = new PropertyDataStore(property.getParentFile());
        FeatureSource fs = ds.getFeatureSource("point");

        // prepare a feature layer with a query and the rendering tx
        FeatureLayer layer = new FeatureLayer(fs, style);
       
        // prepare a bbox in UTM-32N
        ReferencedEnvelope reWgs84 = new ReferencedEnvelope(0, 12, 0, 12, CRS.decode("EPSG:4326"));
        ReferencedEnvelope reUTM32N = reWgs84.transform(CRS.decode("EPSG:3857"), true);
View Full Code Here

Examples of org.geotools.map.FeatureLayer

        FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(null);
        ps.setGeometry(ff.function("convert", ff.property("wkt"), ff.literal(Point.class)));

        // setup the map
        MapContent map = new MapContent();
        Layer layer = new FeatureLayer(features, style);
        map.addLayer(layer);
       
        // render it
        BufferedImage bi = new BufferedImage(100, 100, BufferedImage.TYPE_3BYTE_BGR);
        StreamingRenderer renderer = new StreamingRenderer();
View Full Code Here

Examples of org.geotools.map.FeatureLayer

    @Test
    public void testFillAlignment() throws Exception {
        Style style = RendererBaseTest.loadStyle(this, "fillCross.sld");

        MapContent mc = new MapContent();
        mc.addLayer(new FeatureLayer(polyfs, style));

        StreamingRenderer renderer = new StreamingRenderer();
        renderer.setMapContent(mc);
        renderer.setJava2DHints(new RenderingHints(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON));
View Full Code Here

Examples of org.geotools.map.FeatureLayer

    @Test
    public void testStrokeAlignment() throws Exception {
        Style style = RendererBaseTest.loadStyle(this, "dotsStars.sld");

        MapContent mc = new MapContent();
        mc.addLayer(new FeatureLayer(linefs, style));

        StreamingRenderer renderer = new StreamingRenderer();
        renderer.setMapContent(mc);
        renderer.setJava2DHints(new RenderingHints(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON));
View Full Code Here

Examples of org.geotools.map.FeatureLayer

        GridCoverage2D coverage = new GridCoverageFactory().create("test_red", bi, bounds);
       
        Style rst = sb.createStyle(sb.createRasterSymbolizer());
   
    MapContent mc = new MapContent();
    mc.addLayer(new FeatureLayer(fs, pst));
    mc.addLayer(new GridCoverageLayer(coverage, rst));
   
    StreamingRenderer renderer = new StreamingRenderer();
    renderer.setMapContent(mc);
    BufferedImage img = RendererBaseTest.renderImage(renderer, bounds, null);
View Full Code Here

Examples of org.geotools.map.FeatureLayer

    public void testCircle() throws Exception {
        Style pStyle = RendererBaseTest.loadStyle(this, "markCircle.sld");
        Style lStyle = RendererBaseTest.loadStyle(this, "lineGray.sld");
       
        MapContent mc = new MapContent();
        mc.addLayer(new FeatureLayer(lineFS, lStyle));
        mc.addLayer(new FeatureLayer(pointFS, pStyle));
       
        StreamingRenderer renderer = new StreamingRenderer();
        renderer.setMapContent(mc);
        renderer.setJava2DHints(new RenderingHints(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON));
       
View Full Code Here

Examples of org.mapfish.print.map.geotools.FeatureLayer

            FeatureLayer.FeatureLayerParam param = new FeatureLayer.FeatureLayerParam();
            param.defaultStyle = Constants.Style.OverviewMap.NAME;
            param.style = areaOfInterest.style;
            param.renderAsSvg = areaOfInterest.renderAsSvg;
            param.features = areaOfInterest.areaToFeatureCollection(mapValues);
            final FeatureLayer featureLayer = this.featureLayerPlugin.parse(mapValues.getTemplate(), param);

            layers.add(featureLayer);
        }
        return areaOfInterest;
    }
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.