Enum Tile.Location

  • All Implemented Interfaces:
    Serializable, Comparable<Tile.Location>
    Enclosing interface:
    Tile

    public static enum Tile.Location
    extends Enum<Tile.Location>
    Enumerate for point location with respect to the interpolation grid of a tile.

    Elevations in a tile are interpolated using the four neighboring points in a grid: (i, j), (i+1, j), (i, j+1), (i+1), (j+1). This implies that a point can be interpolated only if the elevation for these four points is available in the tile. A consequence is that a point in the northernmost row (resp. easternmost column) miss neighboring points at row j+1 (resp. neighboring points at column i+1) and therefore cannot be interpolated.

    This enumerate represent the position of a point taking this off-by-one property into account, the value HAS_INTERPOLATION_NEIGHBORS correspond to points that do have the necessary four neighbors, whereas the other values correspond to points that are either completely outside of the tile or within the tile but in either the northernmost row or easternmost column.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      EAST
      Location for points out of tile interpolation grid, in the East edge direction.
      HAS_INTERPOLATION_NEIGHBORS
      Location for points that do have interpolation neighbors.
      NORTH
      Location for points out of tile interpolation grid, in the North edge direction.
      NORTH_EAST
      Location for points out of tile interpolation grid, in the North-East corner direction.
      NORTH_WEST
      Location for points out of tile interpolation grid, in the North-West corner direction.
      SOUTH
      Location for points out of tile interpolation grid, in the South edge direction.
      SOUTH_EAST
      Location for points out of tile interpolation grid, in the South-East corner direction.
      SOUTH_WEST
      Location for points out of tile interpolation grid, in the South-West corner direction.
      WEST
      Location for points out of tile interpolation grid, in the West edge direction.
    • Enum Constant Detail

      • SOUTH_WEST

        public static final Tile.Location SOUTH_WEST
        Location for points out of tile interpolation grid, in the South-West corner direction.
      • WEST

        public static final Tile.Location WEST
        Location for points out of tile interpolation grid, in the West edge direction.
      • NORTH_WEST

        public static final Tile.Location NORTH_WEST
        Location for points out of tile interpolation grid, in the North-West corner direction.

        The point may still be in the tile, but in the northernmost row thus missing required interpolation points.

      • NORTH

        public static final Tile.Location NORTH
        Location for points out of tile interpolation grid, in the North edge direction.

        The point may still be in the tile, but in the northernmost row thus missing required interpolation points.

      • NORTH_EAST

        public static final Tile.Location NORTH_EAST
        Location for points out of tile interpolation grid, in the North-East corner direction.

        The point may still be in the tile, but either in the northernmost row or in the easternmost column thus missing required interpolation points.

      • EAST

        public static final Tile.Location EAST
        Location for points out of tile interpolation grid, in the East edge direction.

        The point may still be in the tile, but in the easternmost column thus missing required interpolation points.

      • SOUTH_EAST

        public static final Tile.Location SOUTH_EAST
        Location for points out of tile interpolation grid, in the South-East corner direction.

        The point may still be in the tile, but in the easternmost column thus missing required interpolation points.

      • SOUTH

        public static final Tile.Location SOUTH
        Location for points out of tile interpolation grid, in the South edge direction.
      • HAS_INTERPOLATION_NEIGHBORS

        public static final Tile.Location HAS_INTERPOLATION_NEIGHBORS
        Location for points that do have interpolation neighbors.

        The value corresponds to points that can be interpolated using their four neighboring points in the grid at indices (i, j), (i+1, j), (i, j+1), (i+1), (j+1). This implies that these points are neither in the northernmost latitude row nor in the easternmost longitude column.

    • Method Detail

      • values

        public static Tile.Location[] 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 (Tile.Location c : Tile.Location.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Tile.Location 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