public class WMTSTileService extends TileService
An instance of this class is tied to a single layer, style and matrixset.
It can be constructed either by a templateUrl and use the inherited ImageLoader,
Or it can use a WebMapTileServer to construct the GetTileRequest's and issueRequest for loading images.
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_HEADERS |
protected static Logger |
LOGGER |
cacheSize
Constructor and Description |
---|
WMTSTileService(String templateURL,
WMTSLayer layer,
TileMatrixSet tileMatrixSet)
Creates a WMTSTileService based on the templateURL for loading images.
|
WMTSTileService(String templateURL,
WMTSLayer layer,
TileMatrixSet tileMatrixSet,
HTTPClient client)
Create a service that uses the templateURL to load images.
|
WMTSTileService(String templateURL,
WMTSServiceType type,
WMTSLayer layer,
String styleName,
TileMatrixSet tileMatrixSet)
Create a service with templateURL for loading images directly.
|
WMTSTileService(String templateURL,
WMTSServiceType type,
WMTSLayer layer,
String styleName,
TileMatrixSet tileMatrixSet,
HTTPClient client)
Create a service with templateURL for loading images directly.
|
WMTSTileService(WebMapTileServer wmtsServer,
WMTSLayer layer,
TileMatrixSet tileMatrixSet)
Create a WMTSTileservice using a WebMapTileServer to load the tile images.
|
WMTSTileService(WebMapTileServer wmtsServer,
WMTSLayer layer,
TileMatrixSet tileMatrixSet,
String format)
Create a WMTSTileService using an WebMapTileServer to load the tile images.
|
Modifier and Type | Method and Description |
---|---|
Set<Tile> |
findTilesInExtent(ReferencedEnvelope requestedExtent,
double scaleFactor,
boolean recommendedZoomLevel,
int maxNumberOfTiles) |
ReferencedEnvelope |
getBounds()
Returns the bounds for the complete TileService
|
Map<String,Object> |
getExtrainfo()
A place to put any Header that should be sent in http calls.
|
TileMatrixSet |
getMatrixSet() |
TileMatrixSetLink |
getMatrixSetLink() |
CoordinateReferenceSystem |
getProjectedTileCrs()
The projection the tiles are drawn in.
|
protected ReferencedEnvelope |
getReqExtentInTileCrs(ReferencedEnvelope requestedExtent) |
double[] |
getScaleList()
Returns a list that represents a mapping between zoom-levels and map scale.
|
TileFactory |
getTileFactory()
Returns the TileFactory which is used to call the method getTileFromCoordinate().
|
TileMatrix |
getTileMatrix(int zoomLevel) |
WMTSZoomLevel |
getZoomLevel(int zoom) |
TileIdentifier |
identifyTileAtCoordinate(double lon,
double lat,
ZoomLevel zoomLevel)
Returns tile identifier for the tile at the given coordinate
|
BufferedImage |
loadImageTileImage(Tile tile)
Fetches the image from url given by tile.
|
void |
setMatrixSet(TileMatrixSet matrixSet) |
createSafeEnvelopeInWGS84, getBaseUrl, getHttpClient, getMaxZoomLevel, getMinZoomLevel, getName, getTileCrs, getTileHeight, getTileWidth, getZoomLevelFromMapScale, getZoomLevelToUse, obtainTile, toString
protected static final Logger LOGGER
public static final String EXTRA_HEADERS
public WMTSTileService(String templateURL, WMTSServiceType type, WMTSLayer layer, String styleName, TileMatrixSet tileMatrixSet)
This constructor, with type as argument, should not be used. A proper formatted templateURL should be used instead.
templateURL
- - where to ask for tilestype
- - KVP or RESTlayer
- - the layer to requeststyleName
- - name of the style to use?tileMatrixSet
- - the tile matrix set to usepublic WMTSTileService(String templateURL, WMTSServiceType type, WMTSLayer layer, String styleName, TileMatrixSet tileMatrixSet, HTTPClient client)
This constructor, with type, should not be used. A proper formatted templateURL should be used instead.
templateURL
- - where to ask for tilestype
- - KVP or RESTlayer
- - layer to requeststyleName
- - name of the style to use?tileMatrixSet
- - matrixsetclient
- - HttpClient instance to use for Tile requests.public WMTSTileService(String templateURL, WMTSLayer layer, TileMatrixSet tileMatrixSet)
templateURL
- layer
- tileMatrixSet
- public WMTSTileService(String templateURL, WMTSLayer layer, TileMatrixSet tileMatrixSet, HTTPClient client)
templateURL
- - where to ask for tileslayer
- - layer to requesttileMatrixSet
- - matrixsetclient
- - HttpClient instance to use for Tile requests.public WMTSTileService(WebMapTileServer wmtsServer, WMTSLayer layer, TileMatrixSet tileMatrixSet)
public WMTSTileService(WebMapTileServer wmtsServer, WMTSLayer layer, TileMatrixSet tileMatrixSet, String format)
protected ReferencedEnvelope getReqExtentInTileCrs(ReferencedEnvelope requestedExtent)
public Set<Tile> findTilesInExtent(ReferencedEnvelope requestedExtent, double scaleFactor, boolean recommendedZoomLevel, int maxNumberOfTiles)
findTilesInExtent
in class TileService
public BufferedImage loadImageTileImage(Tile tile) throws IOException
TileService
loadImageTileImage
in interface ImageLoader
loadImageTileImage
in class TileService
IOException
public double[] getScaleList()
TileService
Array index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map
getScaleList
in class TileService
public ReferencedEnvelope getBounds()
TileService
getBounds
in class TileService
public CoordinateReferenceSystem getProjectedTileCrs()
TileService
getProjectedTileCrs
in class TileService
public TileFactory getTileFactory()
TileService
getTileFactory
in class TileService
public TileMatrixSetLink getMatrixSetLink()
public TileMatrix getTileMatrix(int zoomLevel)
public TileMatrixSet getMatrixSet()
public void setMatrixSet(TileMatrixSet matrixSet)
matrixSet
- the matrixSet to setpublic WMTSZoomLevel getZoomLevel(int zoom)
public Map<String,Object> getExtrainfo()
public TileIdentifier identifyTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel)
TileService
identifyTileAtCoordinate
in class TileService
Copyright © 1996–2022 Geotools. All rights reserved.