Package org.geotools.ows.wmts.client
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 Summary
Constructors Constructor Description WMTSTileFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Tile
create(TileIdentifier identifier, TileService service)
Creates a new tile for the given position using a service.Tile
findLowerNeighbour(Tile tile, TileService service)
Finds the tile for a service at the given position and zoom level, which is immediately below the the passed tile.Tile
findRightNeighbour(Tile tile, TileService service)
Finds the tile for a service at the given position and zoom level, which is immediately to the right of the passed tile.Tile
findTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel, TileService service)
Return a tile with the proper row and column indexes.Tile
findUpperLeftTile(double lon, double lat, WMTSZoomLevel zoomLevel, WMTSTileService service)
Find the first valid Upper Left tile for the current layer.static ReferencedEnvelope
getExtentFromTileName(WMTSTileIdentifier tileIdentifier, TileService service)
static TileMatrixLimits
getLimits(TileMatrixSetLink tmsl, TileMatrixSet tms, int z)
WMTSZoomLevel
getZoomLevel(int zoomLevel, TileService service)
Gets the ZoomLevel (object) for a given zoom level integer.-
Methods inherited from class TileFactory
normalizeDegreeValue
-
-
-
-
Method Detail
-
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 classTileFactory
- 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 classTileFactory
- Parameters:
lon
- the longitudelat
- the latitudezoomLevel
- the zoom levelservice
- 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 classTileFactory
- Parameters:
zoomLevel
- the zoom levelservice
- 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 classTileFactory
- 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 classTileFactory
- Parameters:
tile
- the reference tile
-
getExtentFromTileName
public static ReferencedEnvelope getExtentFromTileName(WMTSTileIdentifier tileIdentifier, TileService service)
-
-