Class RasterStyleUtilities
- java.lang.Object
-
- org.hortonmachine.gears.utils.colors.RasterStyleUtilities
-
public class RasterStyleUtilities extends Object
A class to help with raster styling.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description RasterStyleUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.geotools.styling.StylecreateDefaultRasterStyle()static StringcreateQGISRasterStyle(String colorTableName, double min, double max, double[] values, int labelDecimals)static org.geotools.styling.StylecreateStyleForColortable(String colorTableName, double min, double max, double opacity)static org.geotools.styling.StylecreateStyleForColortable(String colorTableName, double min, double max, double[] values, double opacity)Create style for a given colortable.static voiddumpRasterStyle(String path, double min, double max, double[] values, Color[] colors, double opacity)static voidmain(String[] args)static StringstyleToString(org.geotools.styling.Style style)
-
-
-
Method Detail
-
dumpRasterStyle
public static void dumpRasterStyle(String path, double min, double max, double[] values, Color[] colors, double opacity) throws Exception
- Throws:
Exception
-
createQGISRasterStyle
public static String createQGISRasterStyle(String colorTableName, double min, double max, double[] values, int labelDecimals) throws Exception
- Throws:
Exception
-
createDefaultRasterStyle
public static org.geotools.styling.Style createDefaultRasterStyle()
-
createStyleForColortable
public static org.geotools.styling.Style createStyleForColortable(String colorTableName, double min, double max, double opacity) throws Exception
- Throws:
Exception
-
createStyleForColortable
public static org.geotools.styling.Style createStyleForColortable(String colorTableName, double min, double max, double[] values, double opacity) throws Exception
Create style for a given colortable.- Parameters:
colorTableName- the name of the colortable (has to be available in {@link org.hortonmachine.gears.utils.colors.DefaultTables).min-max-values-opacity-- Returns:
- the style.
- Throws:
Exception
-
styleToString
public static String styleToString(org.geotools.styling.Style style) throws Exception
- Throws:
Exception
-
-