Revision 6902 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.osm/org.gvsig.osm.provider.legend/src/main/java/org/gvsig/osm/provider/legend/OSMRasterGetColorTable.java
OSMRasterGetColorTable.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
import org.gvsig.fmap.dal.raster.api.RasterStore; |
34 | 34 |
import org.gvsig.osm.provider.OSMRasterProvider; |
35 |
import org.gvsig.raster.lib.legend.api.ColorInterpretation; |
|
36 |
import org.gvsig.raster.lib.legend.api.ColorTable; |
|
37 |
import org.gvsig.raster.lib.legend.api.ColorTableClass; |
|
38 | 35 |
import org.gvsig.raster.lib.legend.api.RasterLegendLocator; |
39 | 36 |
import org.gvsig.raster.lib.legend.api.RasterLegendManager; |
37 |
import org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation; |
|
38 |
import org.gvsig.raster.lib.legend.api.colortable.ColorTable; |
|
39 |
import org.gvsig.raster.lib.legend.api.colortable.colortableclass.ColorTableClass; |
|
40 | 40 |
import org.gvsig.tools.ToolsLocator; |
41 | 41 |
import org.gvsig.tools.dynobject.DynClass; |
42 | 42 |
import org.gvsig.tools.dynobject.DynMethod; |
... | ... | |
94 | 94 |
|
95 | 95 |
//FIXME: |
96 | 96 |
List<ColorTableClass> colorTableClasses=new ArrayList<ColorTableClass>(); |
97 |
double[] minMax={0d,255d}; //new double[2];
|
|
97 |
double[] minMax={0d,255d}; |
|
98 | 98 |
|
99 |
// gdalBand.ComputeRasterMinMax(minMax); |
|
100 |
Double increment=1.0; //(minMax[1]-minMax[0])/256; |
|
99 |
Double increment=1.0; |
|
101 | 100 |
|
102 |
|
|
103 |
// int i=0; |
|
104 |
// for(int r=0; r<=255; r+=32){ |
|
105 |
// for(int g=0; g<=255; g+=32){ |
|
106 |
// for(int b=0; b<=255; b+=64){ |
|
107 |
// String className=i+""; |
|
108 |
// double value=i; |
|
109 |
// double interpolation=50.0; |
|
110 |
// Color color=new Color(r,g,b); //intARGB); |
|
111 |
// ColorTableClass colorTableClass = rasterLegendManager.createColorTableClass(className, value, interpolation, color); |
|
112 |
// colorTableClasses.add(colorTableClass); |
|
113 |
// i++; |
|
114 |
// } |
|
115 |
// } |
|
116 |
// } |
|
117 |
|
|
118 | 101 |
for (int i=0;i<=255;i++){ |
119 | 102 |
String className=i+""; |
120 | 103 |
double value=((minMax[0]+(i*increment))); |
Also available in: Unified diff