public class Tile extends java.lang.Object implements java.lang.Comparable<Tile>, Cacheable
Level. A collection of levels of progressive
resolutions are maintained in a LevelSet. The Tile class represents a single tile of a
subdivided image or elevation raster.
Individual tiles are identified by the level, row and column of the tile within its containing level set.
| Constructor and Description |
|---|
Tile(Sector sector)
Constructs a texture tile for a given sector with a default level, row and column.
|
Tile(Sector sector,
Level level)
Constructs a texture tile for a given sector and level, and with a default row and column.
|
Tile(Sector sector,
Level level,
int row,
int column)
Constructs a tile for a given sector, level, row and column of the tile's containing tile set.
|
Tile(Sector sector,
Level level,
int row,
int column,
java.lang.String cacheName)
Constructs a tile for a given sector, level, row and column of the tile's containing tile set.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Tile tile) |
static int |
computeColumn(Angle delta,
Angle longitude,
Angle origin)
Computes the column index of a longitude in the global tile grid corresponding to a specified grid interval.
|
static Angle |
computeColumnLongitude(int column,
Angle delta,
Angle origin)
Determines the minimum longitude of a column in the global tile grid corresponding to a specified grid interval.
|
static int |
computeRow(Angle delta,
Angle latitude,
Angle origin)
Computes the row index of a latitude in the global tile grid corresponding to a specified grid interval.
|
static Angle |
computeRowLatitude(int row,
Angle delta,
Angle origin)
Determines the minimum latitude of a row in the global tile grid corresponding to a specified grid interval.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCacheName()
Returns the tile's cache name.
|
int |
getColumn() |
java.lang.String |
getFormatSuffix() |
int |
getHeight() |
java.lang.String |
getLabel() |
Level |
getLevel() |
java.lang.String |
getLevelName() |
int |
getLevelNumber() |
java.lang.String |
getPath() |
java.lang.String |
getPathBase() |
double |
getPriority() |
java.net.URL |
getResourceURL() |
java.net.URL |
getResourceURL(java.lang.String imageFormat) |
int |
getRow() |
Sector |
getSector() |
long |
getSizeInBytes()
Retrieves the approximate size of this object in bytes.
|
TileKey |
getTileKey() |
int |
getWidth() |
int |
hashCode() |
void |
setPriority(double priority) |
java.lang.String |
toString() |
public Tile(Sector sector)
sector - the sector to create the tile for.public Tile(Sector sector, Level level)
sector - the sector to create the tile for.level - the level to associate the tile withjava.lang.IllegalArgumentException - if sector or level are null.public Tile(Sector sector, Level level, int row, int column)
sector - the sector corresponding with the tile.level - the tile's level within a containing level set.row - the row index (0 origin) of the tile within the indicated level.column - the column index (0 origin) of the tile within the indicated level.java.lang.IllegalArgumentException - if sector or level is null.public Tile(Sector sector, Level level, int row, int column, java.lang.String cacheName)
getCacheName(). Otherwise, the
level's cache name is used.sector - the sector corresponding with the tile.level - the tile's level within a containing level set.row - the row index (0 origin) of the tile within the indicated level.column - the column index (0 origin) of the tile within the indicated level.cacheName - optional cache name to override the Level's cache name. May be null.java.lang.IllegalArgumentException - if sector or level is null.public int compareTo(Tile tile)
compareTo in interface java.lang.Comparable<Tile>public static int computeColumn(Angle delta, Angle longitude, Angle origin)
delta - the grid intervallongitude - the longitude for which to compute the column indexorigin - the origin of the gridjava.lang.IllegalArgumentException - if delta is null or non-positive, or longitude is
null, greater than positive 180 degrees, or less than negative 180 degreespublic static Angle computeColumnLongitude(int column, Angle delta, Angle origin)
column - the row index of the row in questiondelta - the grid intervalorigin - the origin of the gridjava.lang.IllegalArgumentException - if the grid interval (delta) is null or zero or the column index is
negative.public static int computeRow(Angle delta, Angle latitude, Angle origin)
delta - the grid intervallatitude - the latitude for which to compute the row indexorigin - the origin of the gridjava.lang.IllegalArgumentException - if delta is null or non-positive, or latitude is null,
greater than positive 90 degrees, or less than negative 90 degreespublic static Angle computeRowLatitude(int row, Angle delta, Angle origin)
row - the row index of the row in questiondelta - the grid intervalorigin - the origin of the gridjava.lang.IllegalArgumentException - if the grid interval (delta) is null or zero or the row index is
negative.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic final java.lang.String getCacheName()
public final int getColumn()
public final java.lang.String getFormatSuffix()
public int getHeight()
public java.lang.String getLabel()
public Level getLevel()
public final java.lang.String getLevelName()
public final int getLevelNumber()
public java.lang.String getPath()
public java.lang.String getPathBase()
public double getPriority()
public java.net.URL getResourceURL()
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic java.net.URL getResourceURL(java.lang.String imageFormat)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic final int getRow()
public Sector getSector()
public long getSizeInBytes()
CacheablegetSizeInBytes in interface CacheableCacheable object's size in bytespublic final TileKey getTileKey()
public int getWidth()
public int hashCode()
hashCode in class java.lang.Objectpublic void setPriority(double priority)
public java.lang.String toString()
toString in class java.lang.Object