Serializable
, Comparable<Tile.Location>
public static enum Tile.Location extends Enum<Tile.Location>
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 neightbors, 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 | 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.
|
Modifier and Type | Method | Description |
---|---|---|
static Tile.Location |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static Tile.Location[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Tile.Location SOUTH_WEST
public static final Tile.Location WEST
public static final Tile.Location NORTH_WEST
The point may still be in the tile, but in the northernmost row thus missing required interpolation points.
public static final Tile.Location NORTH
The point may still be in the tile, but in the northernmost row thus missing required interpolation points.
public static final Tile.Location NORTH_EAST
The point may still be in the tile, but either in the northernmost row or in the easternmost column thus missing required interpolation points.
public static final Tile.Location EAST
The point may still be in the tile, but in the easternmost column thus missing required interpolation points.
public static final Tile.Location SOUTH_EAST
The point may still be in the tile, but in the easternmost column thus missing required interpolation points.
public static final Tile.Location SOUTH
public static final Tile.Location HAS_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.
public static Tile.Location[] values()
for (Tile.Location c : Tile.Location.values()) System.out.println(c);
public static Tile.Location valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2014-2019 CS Systèmes d'information. All rights reserved.