Package org.geotools.styling

Examples of org.geotools.styling.SLDParser.parseSLD()


        new GeneralEnvelope(new double[] { -90, -180 },
            new double[] { 90, 180 }),new GridSampleDimension[]{new GridSampleDimension("test1BandByte_SLD")},null,null);

    surl = TestData.url(this, "logarithmic.sld");
    stylereader = new SLDParser(sf, surl);
    sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    rsh_SLD = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_2 = extractRasterSymbolizer(sld);
View Full Code Here


        new GeneralEnvelope(new double[] { -90, -180 },
            new double[] { 90, 180 }),new GridSampleDimension[]{new GridSampleDimension("test1BandByte_SLD")},null,null);

    surl = TestData.url(this, "exponential.sld");
    stylereader = new SLDParser(sf, surl);
    sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    rsh_SLD = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_3 = extractRasterSymbolizer(sld);
View Full Code Here

    //    - ChannelSelection: Gray {Contrast Enh: Histogram}
    //
    // ////////////////////////////////////////////////////////////////////
    java.net.URL surl = TestData.url(this, "1band_Float32_test1.sld");
    SLDParser stylereader = new SLDParser(sf, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    SubchainStyleVisitorCoverageProcessingAdapter rsh = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_1 = extractRasterSymbolizer(sld);
View Full Code Here

    //    - ColorMap
    //
    // ////////////////////////////////////////////////////////////////////
    java.net.URL surl = TestData.url(this, "1band_Float32_test2.sld");
    SLDParser stylereader = new SLDParser(sf, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    SubchainStyleVisitorCoverageProcessingAdapter rsh = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final UserLayer nl = (UserLayer) sld.getStyledLayers()[0];
View Full Code Here

    //    - Contrast Enh: Histogram
    //
    // ////////////////////////////////////////////////////////////////////
    java.net.URL surl = TestData.url(this, "4bands_UInt16_test1.sld");
    SLDParser stylereader = new SLDParser(sf, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    SubchainStyleVisitorCoverageProcessingAdapter rsh = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_1 = extractRasterSymbolizer(sld);
View Full Code Here

    //    - Contrast Enh: Histogram
    //
    // ////////////////////////////////////////////////////////////////////
    java.net.URL surl = TestData.url(this, "3bands_Byte_test1.sld");
    SLDParser stylereader = new SLDParser(sf, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    SubchainStyleVisitorCoverageProcessingAdapter rsh = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_1 = extractRasterSymbolizer(sld);
View Full Code Here

    //    - Contrast Enh: Histogram
    //
    // ////////////////////////////////////////////////////////////////////
    java.net.URL surl = TestData.url(this, "3bands_Byte_test2.sld");
    SLDParser stylereader = new SLDParser(sf, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    // the RasterSymbolizer Helper
    SubchainStyleVisitorCoverageProcessingAdapter rsh = new RasterSymbolizerHelper(gc, null);

    // build the RasterSymbolizer
    final RasterSymbolizer rs_1 = extractRasterSymbolizer(sld);
View Full Code Here

  Style loadTestStyle() throws IOException {
    StyleFactory factory = CommonFactoryFinder.getStyleFactory(null);

    URL surl = TestData.getResource(this, "test-sld.xml");
    SLDParser stylereader = new SLDParser(factory, surl);
    StyledLayerDescriptor sld = stylereader.parseSLD();
    UserLayer layer = (UserLayer) sld.getStyledLayers()[0];
    return layer.getUserStyles()[0];
  }

  Style createTestStyle() throws IllegalFilterException {
View Full Code Here

            try {
                parser.setInput(getClass().getResource(styleName));
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            StyledLayerDescriptor sld = parser.parseSLD();
            UserLayer layer = (UserLayer) sld.getStyledLayers()[0];
            style = layer.getUserStyles()[0];
            STYLES.put(styleName, style);
        }
        return style;
View Full Code Here

                + getLayerId(MockData.BASIC_POLYGONS) + "&sldver=1.0.0");
       
        SLDParser parser = new SLDParser(CommonFactoryFinder.getStyleFactory(null));
        parser.setInput(stream);
       
        StyledLayerDescriptor sld = parser.parseSLD();
        assertEquals(1, sld.getStyledLayers().length);
       
        NamedLayer layer = (NamedLayer) sld.getStyledLayers()[0];
        assertEquals(getLayerId(MockData.BASIC_POLYGONS), layer.getName());
        assertEquals(1, layer.styles().size());
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.