Class WMTSTileFactory

Object
TileFactory
WMTSTileFactory

public class WMTSTileFactory extends TileFactory
Implementation of TileFactory for WMTS
Author:
ian, Emanuele Tajariol (etj at geo-solutions dot it)
  • Constructor Details

    • WMTSTileFactory

      public WMTSTileFactory()
  • Method Details

    • create

      public Tile create(TileIdentifier identifier, TileService service)
      Description copied from class: TileFactory
      Creates a new tile for the given position using a service.
      Specified by:
      create in class TileFactory
      Returns:
    • findTileAtCoordinate

      public Tile findTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel, TileService service)
      Return a tile with the proper row and column indexes.

      Please notice that the tile indexes are purely computed on the zoom level details, but the MatrixLimits in a given layer may make the row/col invalid for that layer.

      Specified by:
      findTileAtCoordinate in class TileFactory
      Parameters:
      lon - the longitude
      lat - the latitude
      zoomLevel - the zoom level
      service - the service
      Returns:
      a tile
    • findUpperLeftTile

      public Tile findUpperLeftTile(double lon, double lat, WMTSZoomLevel zoomLevel, WMTSTileService service)
      Find the first valid Upper Left tile for the current layer.
    • getLimits

      public static TileMatrixLimits getLimits(TileMatrixSetLink tmsl, TileMatrixSet tms, int z)
    • constrainToUpperLeftTile

      public WMTSTile constrainToUpperLeftTile(Tile matrixTile, WMTSZoomLevel zl, WMTSTileService service)
      If the tile is outside the limits, take a valid one which can be used to start a loop on.
    • getZoomLevel

      public WMTSZoomLevel getZoomLevel(int zoomLevel, TileService service)
      Description copied from class: TileFactory
      Gets the ZoomLevel (object) for a given zoom level integer.
      Specified by:
      getZoomLevel in class TileFactory
      Parameters:
      zoomLevel - the zoom level
      service - the service
      Returns:
      a zoom level
    • findRightNeighbour

      public Tile findRightNeighbour(Tile tile, TileService service)
      Description copied from class: TileFactory
      Finds the tile for a service at the given position and zoom level, which is immediately to the right of the passed tile.
      Specified by:
      findRightNeighbour in class TileFactory
      Parameters:
      tile - the reference tile
    • findLowerNeighbour

      public Tile findLowerNeighbour(Tile tile, TileService service)
      Description copied from class: TileFactory
      Finds the tile for a service at the given position and zoom level, which is immediately below the the passed tile.
      Specified by:
      findLowerNeighbour in class TileFactory
      Parameters:
      tile - the reference tile
    • getExtentFromTileName

      public static ReferencedEnvelope getExtentFromTileName(WMTSTileIdentifier tileIdentifier, TileService service)