Revision 6904 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster.wms2/org.gvsig.raster.wms2.provider.legend/src/main/java/org/gvsig/raster/wms/provider/legend/WMSRasterGetColorInterpretation.java
WMSRasterGetColorInterpretation.java | ||
---|---|---|
26 | 26 |
import org.slf4j.LoggerFactory; |
27 | 27 |
|
28 | 28 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
29 |
import org.gvsig.raster.lib.legend.api.ColorInterpretation; |
|
30 | 29 |
import org.gvsig.raster.lib.legend.api.RasterLegendLocator; |
31 | 30 |
import org.gvsig.raster.lib.legend.api.RasterLegendManager; |
31 |
import org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation; |
|
32 | 32 |
import org.gvsig.tools.ToolsLocator; |
33 | 33 |
import org.gvsig.tools.dynobject.DynClass; |
34 | 34 |
import org.gvsig.tools.dynobject.DynMethod; |
... | ... | |
85 | 85 |
colorInterpretation = legendManager.createColorInterpretation(ColorInterpretation.ARGB); |
86 | 86 |
// } else { |
87 | 87 |
// colorInterpretation = legendManager.createColorInterpretation(ColorInterpretation.PALETTE); |
88 |
|
|
89 |
// //FIXME: |
|
90 |
// ColorTable colorTable; |
|
91 |
// |
|
92 |
// List<ColorTableClass> colorTableClasses=new ArrayList<ColorTableClass>(); |
|
93 |
// double[] minMax={0d,255d}; |
|
94 |
// |
|
95 |
// Double increment=1.0; |
|
96 |
// |
|
97 |
// for (int i=0;i<=255;i++){ |
|
98 |
// String className=i+""; |
|
99 |
// double value=((minMax[0]+(i*increment))); |
|
100 |
// double interpolation=50.0; |
|
101 |
// int intARGB = ((i & 0xFF) << 24) | // alpha |
|
102 |
// ((i & 0xFF) << 16) | // red |
|
103 |
// ((i & 0xFF) << 8) | // green |
|
104 |
// ((i & 0xFF) << 0); // blue |
|
105 |
// Color color=new Color(intARGB); |
|
106 |
// ColorTableClass colorTableClass = legendManager.createColorTableClass(className, value, interpolation, color); |
|
107 |
// colorTableClasses.add(colorTableClass); |
|
108 |
// } |
|
109 |
// colorTable = legendManager.createColorTable(OSMRasterProvider.NAME+"_color_table", |
|
110 |
// colorTableClasses, true); |
|
111 |
// colorInterpretation.setPalette(colorTable); |
|
112 |
// colorInterpretation.setPaletteBand(0); |
|
113 |
// |
|
114 |
|
|
88 | 115 |
// } |
89 | 116 |
|
90 | 117 |
return colorInterpretation; |
Also available in: Unified diff