Class SLDHandler
- java.lang.Object
-
- org.openjump.core.rasterimage.styler.SLDHandler
-
public class SLDHandler extends Object
Utility class to read a GeoServer-style SLD file into a raster symbolizer.- Author:
- AdL
-
-
Constructor Summary
Constructors Constructor Description SLDHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Colorhex2Rgb(String colorStr)static RasterSymbologyread(File SLDFile)Reads the SLD file and creates a raster symbolizer.static Stringrgb2Hex(int r, int g, int b)static Stringrgb2Hex(Color rgbColor)static voidwrite(RasterSymbology symbology, String symbologyName, File sldFile)
-
-
-
Method Detail
-
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
-
rgb2Hex
public static String rgb2Hex(int r, int g, int b)
-
-