Class Level


  • public class Level
    extends java.lang.Object
    Represents a level of a specific resolution in a LevelSet.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int levelHeight
      The height in pixels of the image represented by all tiles in this level set, or the number of sample points in the latitudinal direction of this level set.
      int levelNumber
      The level's ordinal in its parent level set.
      int levelWidth
      The width in pixels of the image represented by all tiles in this level set, or the number of sample points in the longitudinal direction of this level set.
      LevelSet parent
      The LevelSet that this level is a member of.
      double tileDelta
      The geographic width and height in degrees of tiles within this level.
      int tileHeight
      The parent LevelSet's tileHeight.
      int tileWidth
      The parent LevelSet's tileWidth.
    • Constructor Summary

      Constructors 
      Constructor Description
      Level​(LevelSet parent, int levelNumber, double tileDelta)
      Constructs a Level within a LevelSet.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isFirstLevel()
      Indicates whether this level is the lowest resolution level (level 0) within the parent level set.
      boolean isLastLevel()
      Indicates whether this level is the highest resolution level within the parent level set.
      Level nextLevel()
      Returns the level whose ordinal occurs immediately after this level's ordinal in the parent level set, or null if this is the last level.
      Level previousLevel()
      Returns the level whose ordinal occurs immediately before this level's ordinal in the parent level set, or null if this is the fist level.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • parent

        public final LevelSet parent
        The LevelSet that this level is a member of.
      • levelNumber

        public final int levelNumber
        The level's ordinal in its parent level set.
      • levelWidth

        public final int levelWidth
        The width in pixels of the image represented by all tiles in this level set, or the number of sample points in the longitudinal direction of this level set.
      • levelHeight

        public final int levelHeight
        The height in pixels of the image represented by all tiles in this level set, or the number of sample points in the latitudinal direction of this level set.
      • tileDelta

        public final double tileDelta
        The geographic width and height in degrees of tiles within this level.
      • tileWidth

        public final int tileWidth
        The parent LevelSet's tileWidth.
      • tileHeight

        public final int tileHeight
        The parent LevelSet's tileHeight.
    • Constructor Detail

      • Level

        public Level​(LevelSet parent,
                     int levelNumber,
                     double tileDelta)
        Constructs a Level within a LevelSet. Applications typically do not interact with this class.
        Parameters:
        parent - the level set that this level is a member of
        levelNumber - the level's ordinal within its parent level set
        tileDelta - the geographic width and height in degrees of tiles within this level
    • Method Detail

      • isFirstLevel

        public boolean isFirstLevel()
        Indicates whether this level is the lowest resolution level (level 0) within the parent level set.
        Returns:
        true if this level is the lowest resolution in the parent level set, otherwise false
      • isLastLevel

        public boolean isLastLevel()
        Indicates whether this level is the highest resolution level within the parent level set.
        Returns:
        true if this level is the highest resolution in the parent level set, otherwise false
      • previousLevel

        public Level previousLevel()
        Returns the level whose ordinal occurs immediately before this level's ordinal in the parent level set, or null if this is the fist level.
        Returns:
        the previous level, or null if this is the first level
      • nextLevel

        public Level nextLevel()
        Returns the level whose ordinal occurs immediately after this level's ordinal in the parent level set, or null if this is the last level.
        Returns:
        the next level, or null if this is the last level