Package org.geotools.styling

Examples of org.geotools.styling.Style


        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine(new StringBuffer("looking for style ").append(styleName).toString());
        }

        Style sldStyle = null;

        if (sldUrl != null) {
            if (LOGGER.isLoggable(Level.FINER)) {
                LOGGER.finer("taking style from SLD parameter");
            }
View Full Code Here


        MockHttpServletResponse response =
            putAsServletResponse( "/rest/styles/Ponds", xml, StyleResource.MEDIATYPE_SLD.toString());
        assertEquals( 200, response.getStatusCode() );
       
        Style s = catalog.getStyleByName( "Ponds" ).getStyle();
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        new SLDFormat().write(s, out);
       
        xml = new String(out.toByteArray());
        assertTrue(xml.contains("<sld:Name>foo</sld:Name>"));
View Full Code Here

    public void writeFeaturesAsRaster(
            final FeatureCollection<SimpleFeatureType, SimpleFeature> features,
            final MapLayer layer, final int order) throws IOException,
            AbortedException {
        Style style = layer.getStyle();

        try {
            SimpleFeatureType featureType = features.getSchema();

            setUpWriterHandler(featureType);

            FeatureTypeStyle[] fts = style.getFeatureTypeStyles();
            processStylersRaster(features, fts, layer, order);
            LOGGER.fine("encoded " + featureType.getTypeName().toString());
        } catch (NoSuchElementException ex) {
            throw new DataSourceException(ex.getMessage(), ex);
        } catch (IllegalAttributeException ex) {
View Full Code Here

    }

    public void writeFeaturesAsVectors(
            final FeatureCollection<SimpleFeatureType, SimpleFeature> features,
            final MapLayer layer) throws IOException, AbortedException {
        Style style = layer.getStyle();

        try {
            SimpleFeatureType featureType = features.getSchema();

            setUpWriterHandler(featureType);

            FeatureTypeStyle[] fts = style.getFeatureTypeStyles();
            processStylersVector(features, fts, layer);
            LOGGER.fine("encoded " + featureType.getTypeName().toString());
        } catch (NoSuchElementException ex) {
            throw new DataSourceException(ex.getMessage(), ex);
        } catch (IllegalAttributeException ex) {
View Full Code Here

    }

    public void writeCoverages(
            final FeatureCollection<SimpleFeatureType, SimpleFeature> features,
            final MapLayer layer) throws IOException, AbortedException {
        Style style = layer.getStyle();

        try {
            SimpleFeatureType featureType = features.getSchema();

            setUpWriterHandler(featureType);

            FeatureTypeStyle[] fts = style.getFeatureTypeStyles();
            processStylersCoverage(features, fts, layer);
            LOGGER.fine("encoded " + featureType.getTypeName().toString());
        } catch (NoSuchElementException ex) {
            throw new DataSourceException(ex.getMessage(), ex);
        } catch (IllegalAttributeException ex) {
View Full Code Here

            // track the external caching strategy for any map layers
            boolean cachingPossible = "GET".equals(request.getHttpServletRequest().getMethod());
            final String featureVersion = request.getFeatureVersion();
            int maxAge = Integer.MAX_VALUE;
            for (int i = 0; i < layers.length; i++) {
                final Style layerStyle = styles[i];
                final Filter layerFilter = filters[i];

                final MapLayer layer;
                if (layers[i].getType() == MapLayerInfo.TYPE_REMOTE_VECTOR) {
                    cachingPossible = false;
View Full Code Here

        SLDParser parser = new SLDParser(sFac);
        File styleRes=TestData.file(this, "styles/"+styleName);
       
        parser.setInput(styleRes);

        Style s = parser.readXML()[0];

        return s;
    }
View Full Code Here

        map.setAreaOfInterest(env);
        map.setMapWidth(mapWidth);
        map.setMapHeight(mapHeight);
        map.setTransparent(false);

        Style basicStyle = getTestStyle("Population.sld");
        map.addLayer(fs, basicStyle);

        this.mapProducer.setOutputFormat("text/html");
        this.mapProducer.setMapContext(map);
        this.mapProducer.produceMap();
View Full Code Here

        map.setAreaOfInterest(env);
        map.setMapWidth(mapWidth);
        map.setMapHeight(mapHeight);
        map.setTransparent(false);

        Style basicStyle = getTestStyle("default.sld");
        map.addLayer(fs, basicStyle);

        this.mapProducer.setOutputFormat("text/html");
        this.mapProducer.setMapContext(map);
        this.mapProducer.produceMap();
View Full Code Here

        map.setAreaOfInterest(env);
        map.setMapWidth(mapWidth);
        map.setMapHeight(mapHeight);
        map.setTransparent(false);

        Style basicStyle = getTestStyle("default.sld");
        map.addLayer(fs, basicStyle);

        this.mapProducer.setOutputFormat("text/html");
        this.mapProducer.setMapContext(map);
        this.mapProducer.produceMap();
View Full Code Here

TOP

Related Classes of org.geotools.styling.Style

Copyright © 2018 www.massapicom. 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.