Class TilesCache<T extends Tile>

  • Type Parameters:
    T - Type of tiles.

    public class TilesCache<T extends Tile>
    extends Object
    Cache for Digital Elevation Model tiles.

    Beware, this cache is not thread-safe!

    Author:
    Luc Maisonobe, Guylaine Prat
    • Constructor Detail

      • TilesCache

        public TilesCache​(TileFactory<T> factory,
                          TileUpdater updater,
                          int maxTiles,
                          boolean isOverlappingTiles)
        Simple constructor.
        Parameters:
        factory - factory for creating empty tiles
        updater - updater for retrieving tiles data
        maxTiles - maximum number of tiles stored simultaneously in the cache
        isOverlappingTiles - flag to tell if the DEM tiles are overlapping: true if overlapping; false otherwise.
    • Method Detail

      • getTile

        public T getTile​(double latitude,
                         double longitude)
        Get the tile covering a ground point.
        Parameters:
        latitude - ground point latitude (rad)
        longitude - ground point longitude (rad)
        Returns:
        tile covering the ground point