|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ala.layers.legend.Legend
public abstract class Legend
| Field Summary | |
|---|---|
static int[] |
colours
|
| Constructor Summary | |
|---|---|
Legend()
|
|
| Method Summary | |
|---|---|
void |
determineGroupSizes(float[] d)
size is represented by number of unique values. |
double |
evaluateStdDev(float[] d)
range better on features lower is better |
double |
evaluateStdDevArea(float[] d)
range better on area lower is better |
void |
exportImage(float[] d,
int width,
java.lang.String filename,
int scaleDownBy,
boolean minValueTransparent)
save to a file as a type (filename extension). |
void |
exportSLD(Grid g,
java.lang.String outputfilename,
java.lang.String units,
boolean hasNoDataValue,
boolean minAsTransparent)
|
void |
generate(float[] d)
generate the legend cutoff points. |
abstract void |
generate(float[] d,
int divisions)
generate the legend cutoff points. |
void |
generateLegend(java.lang.String filename)
Produce image legend |
static int |
getColour(double d,
double min,
double max)
colourize input between provided ranges. |
int |
getColour(float d)
Only correct when Legend is created with 10 divisions. |
float[] |
getCutoffFloats()
get cutoff's |
java.lang.String |
getCutoffs()
get cutoff values as String includes group sizes if calculated |
static int |
getLinearColour(double d,
double min,
double max,
int startColour,
int endColour)
|
float[] |
getMinMax()
|
abstract java.lang.String |
getTypeName()
return nice name for the method that this class uses to generate the cutoff points |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int[] colours
| Constructor Detail |
|---|
public Legend()
| Method Detail |
|---|
public void generate(float[] d)
d - asc sorted float []
public abstract void generate(float[] d,
int divisions)
d - asc sorted float []divisions - number of cut pointspublic abstract java.lang.String getTypeName()
public void determineGroupSizes(float[] d)
d - float [] sorted in ascending orderpublic double evaluateStdDev(float[] d)
d -
public double evaluateStdDevArea(float[] d)
d -
public void exportImage(float[] d,
int width,
java.lang.String filename,
int scaleDownBy,
boolean minValueTransparent)
d - float [] of raster data to have legend appliedwidth - row widthfilename - output filenamepublic int getColour(float d)
d - asc sorted float []
public static int getColour(double d,
double min,
double max)
d - value to colourize as floatmin - minimum of range as floatmax - maximum of range as float
public static int getLinearColour(double d,
double min,
double max,
int startColour,
int endColour)
public java.lang.String getCutoffs()
public float[] getCutoffFloats()
public float[] getMinMax()
public void exportSLD(Grid g,
java.lang.String outputfilename,
java.lang.String units,
boolean hasNoDataValue,
boolean minAsTransparent)
public void generateLegend(java.lang.String filename)
filename - output filename. Must end with .png.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||