Class SLDHandler
java.lang.Object
org.openjump.core.rasterimage.styler.SLDHandler
Utility class to read a GeoServer-style SLD file into a raster symbolizer.
- Author:
- AdL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Colorstatic RasterSymbologyReads the SLD file and creates a raster symbolizer.static Stringrgb2Hex(int r, int g, int b) static Stringstatic voidwrite(RasterSymbology symbology, String symbologyName, File sldFile)
-
Constructor Details
-
SLDHandler
public SLDHandler()
-
-
Method Details
-
read
public static RasterSymbology read(File SLDFile) throws ParserConfigurationException, SAXException, IOException, Exception Reads the SLD file and creates a raster symbolizer.- Parameters:
SLDFile- The SLD file to be read.- Returns:
- The raster symbolizer.
- Throws:
ParserConfigurationException- if an Exception occurs during XML parser configurationSAXException- if a Sax exception occurs during XML parsingIOException- if an IOException occurs during file readingException- if an other kind of Exception occurs
-
write
public static void write(RasterSymbology symbology, String symbologyName, File sldFile) throws IOException, XMLStreamException, TransformerConfigurationException -
hex2Rgb
-
rgb2Hex
-
rgb2Hex
-