类 LegendManage


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

      • LegendManage

        public LegendManage()
    • 方法详细资料

      • createLegendSchemeFromGridData

        public static LegendScheme createLegendSchemeFromGridData​(GridData aGridData,
                                                                  LegendType aLT,
                                                                  ShapeTypes aST)
        Create legend scheme from grid data
        参数:
        aGridData - Grid data
        aLT - Legend type
        aST - Shape type
        返回:
        Legend scheme
      • createLegendSchemeFromGridData

        public static LegendScheme createLegendSchemeFromGridData​(GridArray aGridData,
                                                                  LegendType aLT,
                                                                  ShapeTypes aST)
        Create legend scheme from grid data
        参数:
        aGridData - Grid data
        aLT - Legend type
        aST - Shape type
        返回:
        Legend scheme
      • createLegendSchemeFromStationData

        public static LegendScheme createLegendSchemeFromStationData​(StationData stationData,
                                                                     LegendType aLT,
                                                                     ShapeTypes aST)
        Create legend scheme from station data
        参数:
        stationData - Station data
        aLT - Legend type
        aST - Shape type
        返回:
        Legend scheme
      • 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,
                                                                  java.awt.Color aColor,
                                                                  float size)
        Create single symbol legend scheme
        参数:
        aST - Shape type
        aColor - Color
        size - Size
        返回:
        Legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(java.util.List<java.lang.String> CValues,
                                                               java.util.List<java.lang.String> captions,
                                                               java.awt.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​(java.util.List<java.lang.String> CValues,
                                                               java.util.List<java.lang.String> captions,
                                                               java.awt.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​(java.util.List<java.lang.Number> values,
                                                               ShapeTypes aST)
        Create unique value legend scheme
        参数:
        values - Values
        aST - The shape type
        返回:
        The legend scheme
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(java.util.List<java.lang.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​(java.util.List<java.lang.Number> values,
                                                               java.awt.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​(java.util.List<java.lang.Number> values,
                                                               java.util.List<java.awt.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​(java.util.List<java.lang.String> CValues,
                                                               java.awt.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,
                                                               java.awt.Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               java.lang.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,
                                                               java.awt.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
      • createUniqValueLegendScheme

        public static LegendScheme createUniqValueLegendScheme​(VectorLayer aLayer,
                                                               double min,
                                                               double max)
        Create unique value legend scheme from a vector layer
        参数:
        aLayer - Vector layer
        min - Minimum
        max - Maximum
        返回:
        Legend scheme
      • createGraduatedLegendScheme

        public static LegendScheme createGraduatedLegendScheme​(double[] CValues,
                                                               java.awt.Color[] colors,
                                                               ShapeTypes aST,
                                                               double min,
                                                               double max,
                                                               java.lang.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,
                                                               java.awt.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 java.awt.Color[] createColors​(java.awt.Color sColor,
                                                    java.awt.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,
                                                      java.util.List<java.lang.Number> values,
                                                      java.util.List<java.awt.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,
                                                      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,
                                                      java.awt.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 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,
                                                      java.util.List<java.lang.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,
                                                      java.util.List<java.lang.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,
                                                      int n,
                                                      ColorMap ct)
        Create legend scheme
        参数:
        min - Minimum
        max - Maximum
        n - Level number
        ct - Color table
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(GridData gdata,
                                                      double interval,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
        Create legend scheme
        参数:
        gdata - Grid data
        interval - Interval
        legendType - Legend type
        shapeType - Shape type
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(GridData gdata,
                                                      int n,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
        Create legend scheme
        参数:
        gdata - Grid data
        n - Level number
        legendType - Legend type
        shapeType - Shape type
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(GridData gdata,
                                                      int n,
                                                      ColorMap ct,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
        Create legend scheme
        参数:
        gdata - Grid data
        n - Level number
        ct - Color table
        legendType - Legend type
        shapeType - Shape type
        返回:
        LegendScheme
      • createLegendScheme

        public static LegendScheme createLegendScheme​(GridData gdata,
                                                      int n,
                                                      ColorMap ct)
                                               throws java.io.IOException
        Create legend scheme
        参数:
        gdata - Grid data
        n - Level number
        ct - Color table name
        返回:
        LegendScheme
        抛出:
        java.io.IOException
      • createLegendScheme

        public static LegendScheme createLegendScheme​(StationData stdata,
                                                      int n,
                                                      ColorMap ct,
                                                      LegendType legendType,
                                                      ShapeTypes shapeType)
                                               throws java.io.IOException
        Create legend scheme
        参数:
        stdata - Station data
        n - Level number
        ct - Color table name
        legendType - Legend type
        shapeType - Shape type
        返回:
        Legend scheme
        抛出:
        java.io.IOException
      • createImageLegend

        public static LegendScheme createImageLegend​(GridData gdata,
                                                     ColorMap cmap)
        Create image legend from grid data
        参数:
        gdata - Grid data
        cmap - Color map
        返回:
        Legend scheme
      • createImageLegend

        public static LegendScheme createImageLegend​(GridArray gdata,
                                                     ColorMap cmap)
        Create image legend from grid data
        参数:
        gdata - Grid data
        cmap - Color map
        返回:
        Legend scheme
      • createImageLegend

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

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

        public static LegendScheme createImageLegend​(GridData gdata,
                                                     java.util.List<java.lang.Number> levs,
                                                     ColorMap cmap)
        Create image legend from grid data
        参数:
        gdata - Grid data
        levs - Legend break values
        cmap - Color map
        返回:
        Legend scheme
      • createImageLegend

        public static LegendScheme createImageLegend​(GridArray gdata,
                                                     java.util.List<java.lang.Number> levs,
                                                     ColorMap cmap)
        Create image legend from grid data
        参数:
        gdata - Grid data
        levs - Legend break values
        cmap - Color map
        返回:
        Legend scheme
      • createRandomColors

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

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

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

        public static double[] createContourValues​(double min,
                                                   double max)
        Create contour values by minimum and maximum values
        参数:
        min - Minimum value
        max - Maximum value
        返回:
        Contour values
      • getContoursAndColors

        public static java.lang.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,
                                                java.awt.Color[] colors)
        Set contour values and colors from a legend scheme
        参数:
        aLS - Legend scheme
        cValues - Value array
        colors - Color array