类 LegendManage


  • public class LegendManage
    extends Object
    Legend manage class
    作者:
    yaqiang
    • 构造器详细资料

      • LegendManage

        public LegendManage()
    • 方法详细资料

      • createSingleSymbolLegendScheme

        public static LegendScheme createSingleSymbolLegendScheme​(ShapeTypes shapeType)
        Create single symbol legend scheme
        参数:
        shapeType - The shape type
        返回:
        Legend scheme
      • createSingleSymbolLegendScheme

        public static LegendScheme createSingleSymbolLegendScheme​(ShapeTypes aST,
                                                                  Color aColor,
                                                                  float size)
        Create single symbol legend scheme
        参数:
        aST - Shape type
        aColor - Color
        size - Size
        返回:
        Legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<String> CValues,
                                                               List<String> captions,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               boolean hasNodata,
                                                               double unDef)
        Create unique value legend scheme
        参数:
        CValues - The values
        captions - The captions
        colors - The colors
        aST - The shape type
        min - Minimum value
        max - Maximum value
        hasNodata - If has undefine data
        unDef - Undefine data
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<String> CValues,
                                                               List<String> captions,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max)
        Create unique value legend scheme
        参数:
        CValues - The values
        captions - The captions
        colors - The colors
        aST - The shape type
        min - Minimum value
        max - Maximum value
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(int n,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        n - Legend break number
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<Number> values,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        values - Values
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<Number> values,
                                                               ColorMap cmap,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        values - Values
        cmap - Color map
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<Number> values,
                                                               Color[] colors,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        values - Values
        colors - Colors
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<Number> values,
                                                               List<Color> colors,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        values - Values
        colors - Colors
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(List<String> CValues,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               boolean hasNodata,
                                                               double unDef)
        Create unique value legend scheme
        参数:
        CValues - The values
        colors - The colors
        aST - The shape type
        min - Minimum value
        max - Maximum value
        hasNodata - If has undefine data
        unDef - Undefine data
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(double[] CValues,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               Boolean hasNodata,
                                                               double unDef)
        Create unique value legend scheme
        参数:
        CValues - The values
        colors - The colors
        aST - The shape type
        min - Minimum value
        max - Maximum value
        hasNodata - If has undefine data
        unDef - Undefine data
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(double[] CValues,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max)
        Create unique value legend scheme
        参数:
        CValues - The values
        colors - The colors
        aST - The shape type
        min - Minimum value
        max - Maximum value
        返回:
        The legend scheme
      • createGraduatedLegendScheme

        public static LegendScheme createGraduatedLegendScheme​(double[] CValues,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               Boolean hasNodata,
                                                               double unDef)
        Create graduated color legend scheme
        参数:
        CValues - The values
        colors - The colors
        aST - Shape type
        min - Minimum value
        max - Maximum value
        hasNodata - Is has no data
        unDef - Undefine data
        返回:
        The legend scheme
      • createGraduatedLegendScheme

        public static LegendScheme createGraduatedLegendScheme​(double[] values,
                                                               Color[] colors,
                                                               ShapeTypes shapeType)
        Create graduated color legend scheme
        参数:
        values - The values
        colors - The colors
        shapeType - Shape type
        返回:
        The legend scheme
      • createGraduatedLegendScheme

        public static LegendScheme createGraduatedLegendScheme​(BoundaryNorm norm,
                                                               ColorMap colorMap)
        Create graduated color legend scheme
        参数:
        norm - The BoundaryNorm
        colorMap - The color map
        返回:
        The legend scheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(List<Number> values,
                                                      List<Color> colors)
        Create legend scheme
        参数:
        values - Value list
        colors - Color list
        返回:
        Legend scheme
      • createGraduatedLegendScheme

        public static LegendScheme createGraduatedLegendScheme​(double[] values,
                                                               Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max)
        Create graduated color legend scheme
        参数:
        values - The values
        colors - The colors
        aST - Shape type
        min - Minimum value
        max - Maximum value
        返回:
        The legend scheme
      • createColors

        public static Color[] createColors​(Color sColor,
                                           Color eColor,
                                           int cNum)
        Create colors from start and end color
        参数:
        sColor - Start color
        eColor - End color
        cNum - Color number
        返回:
        Color array
      • createContourValuesInterval

        public static double[] createContourValuesInterval​(double min,
                                                           double max,
                                                           double interval)
        Create contour values by interval
        参数:
        min - Miminum value
        max - Maximum value
        interval - Interval value
        返回:
        Value array
      • createLegendScheme

        public static LegendScheme createLegendScheme​(ShapeTypes shapeType,
                                                      List<Number> values,
                                                      List<Color> colors)
        Create legend scheme
        参数:
        shapeType - Shape type
        values - Values
        colors - Colors
        返回:
        Legend scheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      ColorMap ct)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        ct - Color table
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      ColorMap ct,
                                                      ExtendType extendType)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        ct - Color table
        extend - Extend min/max values or not
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      ColorMap ct,
                                                      double missingValue)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        ct - Color table
        missingValue - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      double interval,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        interval - Interval
        legendType - Legend type
        shapeType - Shape type
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      double interval,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType,
                                                      boolean hasNodata,
                                                      double unDef)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        interval - Interval
        legendType - Legend type
        shapeType - Shape type
        hasNodata - Has missing value or not
        unDef - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        legendType - Legend type
        shapeType - Shape type
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      double[] values,
                                                      Color[] colors,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType,
                                                      boolean hasNodata,
                                                      double unDef)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        values - Values
        colors - Colors
        legendType - Legend type
        shapeType - Shape type
        hasNodata - Has missing value or not
        unDef - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double[] values,
                                                      Color[] colors)
        Create legend scheme
        参数:
        values - Values
        colors - Colors
        返回:
        Legend scheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType,
                                                      boolean hasNodata,
                                                      double unDef)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        legendType - Legend type
        shapeType - Shape type
        hasNodata - Has missing value or not
        unDef - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n,
                                                      ColorMap ct,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType,
                                                      boolean hasNodata,
                                                      double unDef)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        ct - Color table
        legendType - Legend type
        shapeType - Shape type
        hasNodata - Has missing value or not
        unDef - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      List<Number> levs,
                                                      ColorMap ct,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType,
                                                      boolean hasNodata,
                                                      double unDef)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        levs - Level values
        ct - Color table
        legendType - Legend type
        shapeType - Shape type
        hasNodata - Has missing value or not
        unDef - Missing value
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      List<Number> levs,
                                                      ColorMap ct)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        levs - Level values
        ct - Color table
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      List<Number> levels,
                                                      ColorMap ct,
                                                      boolean extend)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        levels - Level values
        ct - Color table
        extend - Extend min/max values or not
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(List<Number> levels,
                                                      ColorMap colorMap,
                                                      ExtendType extendType)
        Create legend scheme
        参数:
        levels - Level values
        colorMap - Color map
        extendType - ExtendType
        返回:
        LegendScheme Legend scheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n,
                                                      ColorMap ct)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        ct - Color table
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(double min,
                                                      double max,
                                                      int n,
                                                      ColorMap ct,
                                                      ExtendType extendType)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        ct - Color table
        extend - Extend min/max values or not
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(TransferFunction transferFunction)
        Create legend scheme by transfer function
        参数:
        transferFunction - Transfer function
        返回:
        Legend scheme
      • createImageLegend

        public static LegendScheme createImageLegend​(Array array,
                                                     ColorMap colorMap)
        Create image legend from array data
        参数:
        array - Array data
        colorMap - Color map
        返回:
        Legend scheme
      • createImageLegend

        public static LegendScheme createImageLegend​(Array array,
                                                     int n,
                                                     ColorMap colorMap)
        Create image legend from grid data
        参数:
        array - Array data
        n - Legend break number
        colorMap - Color map
        返回:
        Legend scheme
      • createImageLegend

        public static LegendScheme createImageLegend​(Array array,
                                                     List<Number> levels,
                                                     ColorMap colorMap)
        Create image legend from array data
        参数:
        array - Array data
        levels - Legend break values
        colorMap - Color map
        返回:
        Legend scheme
      • createWeatherLegendScheme

        public static LegendScheme createWeatherLegendScheme​(List<Integer> wList,
                                                             int size,
                                                             Color color)
        Create weather legend scheme
        参数:
        wList - Weather index list
        size - Size
        color - Color
        返回:
        Weather legend scheme
      • createRandomColors

        public static Color[] createRandomColors​(int cNum)
        Create random colors
        参数:
        cNum - Color number
        返回:
        The random colors
      • createRainBowColors

        public static Color[] createRainBowColors​(int cNum)
        Create rainbow colors
        参数:
        cNum - Color number
        返回:
        Rainbow color array
      • getRainBowColors_HSV

        public static Color[] getRainBowColors_HSV​(int cNum)
        Get rainbow color by HSV/HSB
        参数:
        cNum - Color number
        返回:
        Rainbow colors
      • getContoursAndColors

        public static Object[] getContoursAndColors​(LegendScheme aLS)
        Get contour values and colors from legend scheme
        参数:
        aLS - The legend scheme
        返回:
        Contour and color values
      • setContoursAndColors

        public static void setContoursAndColors​(LegendScheme aLS,
                                                double[] cValues,
                                                Color[] colors)
        Set contour values and colors from a legend scheme
        参数:
        aLS - Legend scheme
        cValues - Value array
        colors - Color array
      • getWeatherTypes

        public static List<Integer> getWeatherTypes​(String weatherType)
        Get weather list
        参数:
        weatherType - Weather type
        返回:
        Weather list
      • createCloudLegendScheme

        public static LegendScheme createCloudLegendScheme​(int size,
                                                           Color color)
        Create could amount legend scheme
        参数:
        size - Size
        color - Color
        返回:
        Cloud amount legend scheme