Class SLDUtils


  • public class SLDUtils
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      SLDUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void applyStyle​(org.geotools.styling.Style style, String defaultCss, org.geotools.feature.DefaultFeatureCollection featureCollection, org.geotools.feature.DefaultFeatureCollection styledCollection)
      Converts the styling information in the style into CSS styles for all given features in the collection.
      static org.geotools.styling.Style[] createFromSLD​(File sld)  
      static org.opengis.feature.simple.SimpleFeature createStyledFeature​(org.opengis.feature.simple.SimpleFeatureType type, org.opengis.feature.simple.SimpleFeature feature, String styleCSS)  
      static org.opengis.feature.simple.SimpleFeatureType createStyledFeatureType​(org.opengis.feature.simple.SimpleFeatureType type)  
      static File getSLDFile​(File shapeFile)  
      static boolean isFeatureTypeStyleActive​(org.opengis.feature.simple.SimpleFeatureType ftype, org.geotools.styling.FeatureTypeStyle fts)  
      static org.geotools.styling.Style[] loadSLD​(File shapeFile)  
      static org.opengis.feature.simple.SimpleFeature processRules​(org.opengis.feature.simple.SimpleFeature sf, org.opengis.feature.simple.SimpleFeatureType styledSFT, List<org.geotools.styling.Rule> ruleList, List<org.geotools.styling.Rule> elseRuleList)  
      static org.opengis.feature.simple.SimpleFeature processSymbolizers​(org.opengis.feature.simple.SimpleFeatureType sft, org.opengis.feature.simple.SimpleFeature feature, org.geotools.styling.Symbolizer[] symbolizers)  
    • Constructor Detail

      • SLDUtils

        public SLDUtils()
    • Method Detail

      • getSLDFile

        public static File getSLDFile​(File shapeFile)
      • loadSLD

        public static org.geotools.styling.Style[] loadSLD​(File shapeFile)
      • createFromSLD

        public static org.geotools.styling.Style[] createFromSLD​(File sld)
      • applyStyle

        public static void applyStyle​(org.geotools.styling.Style style,
                                      String defaultCss,
                                      org.geotools.feature.DefaultFeatureCollection featureCollection,
                                      org.geotools.feature.DefaultFeatureCollection styledCollection)
        Converts the styling information in the style into CSS styles for all given features in the collection.
        Parameters:
        style - The style.
        defaultCss - The CSS default value.
        featureCollection - The collection that should be styled.
        styledCollection - the collection that will contain the styled features.
      • processRules

        public static org.opengis.feature.simple.SimpleFeature processRules​(org.opengis.feature.simple.SimpleFeature sf,
                                                                            org.opengis.feature.simple.SimpleFeatureType styledSFT,
                                                                            List<org.geotools.styling.Rule> ruleList,
                                                                            List<org.geotools.styling.Rule> elseRuleList)
      • processSymbolizers

        public static org.opengis.feature.simple.SimpleFeature processSymbolizers​(org.opengis.feature.simple.SimpleFeatureType sft,
                                                                                  org.opengis.feature.simple.SimpleFeature feature,
                                                                                  org.geotools.styling.Symbolizer[] symbolizers)
      • isFeatureTypeStyleActive

        public static boolean isFeatureTypeStyleActive​(org.opengis.feature.simple.SimpleFeatureType ftype,
                                                       org.geotools.styling.FeatureTypeStyle fts)
      • createStyledFeatureType

        public static org.opengis.feature.simple.SimpleFeatureType createStyledFeatureType​(org.opengis.feature.simple.SimpleFeatureType type)
      • createStyledFeature

        public static org.opengis.feature.simple.SimpleFeature createStyledFeature​(org.opengis.feature.simple.SimpleFeatureType type,
                                                                                   org.opengis.feature.simple.SimpleFeature feature,
                                                                                   String styleCSS)