Enum GridType

    • Enum Constant Detail

      • GZD

        public static final GridType GZD
        Grid Zone Designator
      • HUNDRED_KILOMETER

        public static final GridType HUNDRED_KILOMETER
        Hundred Kilometer
      • TEN_KILOMETER

        public static final GridType TEN_KILOMETER
        Ten Kilometer
      • KILOMETER

        public static final GridType KILOMETER
        Kilometer
      • HUNDRED_METER

        public static final GridType HUNDRED_METER
        Hundred Meter
      • TEN_METER

        public static final GridType TEN_METER
        Ten Meter
      • METER

        public static final GridType METER
        Meter
    • Method Detail

      • values

        public static GridType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (GridType c : GridType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static GridType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getPrecision

        public int getPrecision()
        Get the precision in meters
        Returns:
        precision meters
      • getAccuracy

        public int getAccuracy()
        Get the Grid Type accuracy number of digits in the easting and northing values
        Returns:
        accuracy digits
      • withAccuracy

        public static GridType withAccuracy​(int accuracy)
        Get the Grid Type with the accuracy number of digits in the easting and northing values. Accuracy must be inclusively between 0 (HUNDRED_KILOMETER) and 5 (METER).
        Parameters:
        accuracy - accuracy digits between 0 (inclusive) and 5 (inclusive)
        Returns:
        grid type
      • getPrecision

        public static GridType getPrecision​(double value)
        Get the precision of the value in meters based upon trailing 0's
        Parameters:
        value - value in meters
        Returns:
        precision grid type
      • lessPrecise

        public static Set<GridType> lessPrecise​(GridType type)
        Get the less precise (larger precision value) grid types
        Parameters:
        type - grid type
        Returns:
        grid types less precise
      • morePrecise

        public static Set<GridType> morePrecise​(GridType type)
        Get the more precise (smaller precision value) grid types
        Parameters:
        type - grid type
        Returns:
        grid types more precise