com.supermap.mapping

Class RangeMode



  • public final class RangeMode
    extends Enum
    This class specifies the constants that define the methods used to create ranges.

    In the ranges map, the values of fields or expressions as thematic variables are divided into a number of extent ranges according to certain ranges method, and the features or records are classified into one of these ranges based on its corresponding values of fields or expressions. The features or records in the same extent range are displayed with the same style. Ranges map is generally used to reflect the quantity or level characteristics of continuous distribution phenomena, such as the distribution of precipitation, the distribution of soil erosion intensity, etc. and thus reflect the phenomena density in various regions or the distribution difference of development level.

    SuperMap provides multiple ranges methods, including equalinterval, square root, standard deviation, logarithm, quantile and custom distance. Obviously these ranges methods classify according to certain distance, so the thematic variables that the ranges map is based on must be numeric type.

    • Field Detail

      • NONE

        public static final RangeMode NONE
        The None Range mode.
      • EQUALINTERVAL

        public static final RangeMode EQUALINTERVAL
        The equalinterval method. Equal interval range method uses the maximum and the minimum of the thematic variables and the number of ranges defined by users to create equal-sized range. Each range has the same length. The interval can be calculated with the following formula:

        Where, d is the interval; Vmax is the maximum value of thematic variable; Vmin is the minimum value of thematic variable; count is the number of user-defined ranges. The break value can be calculated by the following formula:

        Vi is the break value, i is the positive integer from 0 to count-1, represents each range, when i is 0, Vi is Vmin; when i is count-1, Vi is Vmax.

        For example, the value of a thematic variable is from 1 to 10, you want to use this method to separate it into 4 ranges. The result will be 1-2.5, 2.5-5, 5-7.5 and 7.510 (the break value and belongs to the next range).

        Note: Using this method, it is possible that there is no value in certain ranges, namely the feature or the record in the ranges is 0.

      • SQUAREROOT

        public static final RangeMode SQUAREROOT
        The square root mode. Virtually, square root range method is performing the equal interval range method for the square root of the original data. First, calculates the break value of the square root of the original data using the method of equal interval, and then performs square function for each break value to get the break value of the original data. So in this method, it is possible that there is no value in certain ranges, namely the feature or the record in the ranges is 0. This method is better than the equal interval range method when the difference between maximum and the minimum of the thematic value is large. This method can reduce the differences of data, and separate the data into less number of ranges. The interval can be calculated by the following formula:

        Where, d is the interval; Vmax is the maximum value of thematic variable; Vmin is the minimum value of thematic variable; count is the number of user-defined ranges. The break value can be calculated by the following formula:

        Where, Vi is the break value, i is the positive integer from 0 to count-1, represents each range, when i is 0, Vi is Vmin.

        Note: This method is not available for negative.

      • STDDEVIATION

        public static final RangeMode STDDEVIATION

        The standard deviation mdoe. Standard deviation range method represents the difference between the value of the thematic variable and the mean value of the thematic variable. The first step of this method is to calculate the mean value and the standard deviation of the thematic variable. The length of each range is a standard deviation, and the middle one is such a range that the center is the mean value and the length is a standard deviation. If the mean value of the thematic variable is mean, and the standard deviation is std, the range will be like the follows:

        For example, the thematic variable is the value from 1 to 100 and the mean value of the thematic variable is 50, and standard deviation is 20. Performs this method the range will be 40-60, 20-40, 60-80, 0-20, 80-100. The features in different ranges have different display styles.

        Note: users can not set the number of ranges. The number of ranges depends on the data itself.

      • LOGARITHM

        public static final RangeMode LOGARITHM
        The logarithm mode. Actually, Logarithm range method is performing the Equal interval range method for the logarithm of the original data, with 10 as the base. First, acquires the break value of the logarithm of the original data using the method of Equal interval, and then performs power function for each break value, with 10 as the base and these break value as exponent, to get the break value of the original data. This method is more suitable when the maximum and the minimum of the thematic value is large, and the Equal interval range method is not so good. Logarithm range method can reduce the differences of the data, and its compression ratio is higher than Square root range method. The interval can be calculated by the following formula:

        Where, d is the interval, Vmax is the maximum value of thematic variable, Vmin is the minimum value of thematic variable, count is the number of user-defined ranges. The break value can be calculated by the following formula.

        Vi is the break value, i is the positive integer from 0 to count-1, represents each range, when i is 0, Vi is Vmin; when i is count-1, Vi is Vmax.

        Note: This method is not available for negative.

      • QUANTILE

        public static final RangeMode QUANTILE
        Equal Count. Make sure each range contains equal number of object. The number is determined by the number of ranges and the number of features, the number of objects in each range will be the same if the number of the features be divided with no remainder by the number of the ranges, otherwise the ranges in the rear will have one more object than the ranges in the front. For example, there are 9 objects and need to be divided into 9 ranges, each range will has one object, if divided into 8 ranges, the eighth range will has two objects. This kind of Dividing applies to linear data. The feature numbers in each range can be calculated by the following equation:

        Where, n is the number of features in each range; N is the total number of the features; count is the number of user-defined ranges. If n is a decimal, it will be floored.

      • CUSTOMINTERVAL

        public static final RangeMode CUSTOMINTERVAL
        The custom mode. Users specify an interval to divide the thematic variable. The number of ranges is determined by the user-defined interval and the maximum and the minimum of the thematic variable. The break value can be calculated by the following formula.

        Where, Vi is the break value, Vmin is the minimum of the thematic variable, d is the user-defined interval, count is the number of ranges, i is the positive integer from 0 to count-1, represents each range, when i is 0, Vi is Vmin; when i is count-1, Vi is Vmax.