Package org.geotools.styling

Examples of org.geotools.styling.StyleFactoryImpl


        }

        Description descCopy = rule.getDescription();
        descCopy = copy(descCopy);

        copy = new StyleFactoryImpl().createRule(symsCopy, descCopy, legendCopy, rule.getName(),
                filterCopy, rule.isElseFilter(), rule.getMaxScaleDenominator(), rule
                        .getMinScaleDenominator());

        if (STRICT && !copy.equals(rule)) {
            throw new IllegalStateException("Was unable to duplicate provided Rule:" + rule);
View Full Code Here


        }
        fakeFilePath = realMapDescDirectoryPath + styleSource;
        file = new File(PathUtil.fakePathToReal(fakeFilePath));
      }
      if (file.exists() && file.isFile()) {
        StyleFactory styleFactory = new StyleFactoryImpl();
        SLDParser sldParser = new SLDParser(styleFactory, file);
        Style[] styles = sldParser.readXML();
        style = styles[0];
      }
    }
View Full Code Here

      if (defaultFeatureStyles.containsKey(key)) {
        result = defaultFeatureStyles.get(key);
      } else {
        InputStream stream = DefaultStyleManager.class
            .getResourceAsStream(key + ".sld");
        StyleFactory styleFactory = new StyleFactoryImpl();
        SLDParser sldParser = new SLDParser(styleFactory, stream);
        Style[] styles = sldParser.readXML();
        result = styles[0];
        defaultFeatureStyles.put(key, result);
      }
View Full Code Here

        File openFile = JFileImageChooser.showOpenFile(shell);

        if (openFile != null && openFile.exists()) {
            AbstractGridFormat format = GridFormatFinder.findFormat(openFile);
            AbstractGridCoverage2DReader tiffReader = format.getReader(openFile);
            StyleFactoryImpl sf = new StyleFactoryImpl();
            RasterSymbolizer symbolizer = sf.getDefaultRasterSymbolizer();
            Style defaultStyle = SLD.wrapSymbolizers(symbolizer);

            MapContent mapContent = mapPane.getMapContent();
            Layer layer = new GridReaderLayer(tiffReader, defaultStyle);
            layer.setTitle(openFile.getName());
View Full Code Here

        }

        Description descCopy = rule.getDescription();
        descCopy = copy(descCopy);

        copy = new StyleFactoryImpl().createRule(symsCopy, descCopy, legendCopy, rule.getName(),
                filterCopy, rule.isElseFilter(), rule.getMaxScaleDenominator(), rule
                        .getMinScaleDenominator());

        if (STRICT && !copy.equals(rule)) {
            throw new IllegalStateException("Was unable to duplicate provided Rule:" + rule);
View Full Code Here

            Layer layer = spatialDatabase.getLayer(typeName);
            Object obj = layer.getStyle();
            if(obj instanceof Style) {
              result = (Style)result;
            } else if (obj instanceof File || obj instanceof String) {
              StyleFactory styleFactory = new StyleFactoryImpl();
              SLDParser parser = new SLDParser(styleFactory);
              try {
                if(obj instanceof File) {
                  parser.setInput(new FileReader((File)obj));
                }else{
View Full Code Here

        }

        Description descCopy = rule.getDescription();
        descCopy = copy(descCopy);

        copy = new StyleFactoryImpl().createRule(symsCopy, descCopy, legendCopy, rule.getName(),
                filterCopy, rule.isElseFilter(), rule.getMaxScaleDenominator(), rule
                        .getMinScaleDenominator());

        if (STRICT && !copy.equals(rule)) {
            throw new IllegalStateException("Was unable to duplicate provided Rule:" + rule);
View Full Code Here

TOP

Related Classes of org.geotools.styling.StyleFactoryImpl

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.