public class WMTSTileService extends TileService
An instance of this class is tied to a single layer, style and matrixset.
Use WebMapTileServer to negotiate capabilities, or specifying other properties
Modifier and Type | Field and Description |
---|---|
static String |
DIMENSION_ELEVATION
Deprecated.
|
static String |
DIMENSION_TIME
Deprecated.
|
static String |
EXTRA_HEADERS |
protected static Logger |
LOGGER |
Constructor and Description |
---|
WMTSTileService(String templateURL,
WMTSLayer layer,
TileMatrixSet tileMatrixSet)
Creates a WMTSTileService based on the templateURL.
|
WMTSTileService(String templateURL,
WMTSLayer layer,
TileMatrixSet tileMatrixSet,
HTTPClient client)
create a service directly with out parsing the capabilties again.
|
WMTSTileService(String templateURL,
WMTSServiceType type,
WMTSLayer layer,
String styleName,
TileMatrixSet tileMatrixSet)
create a service directly with out parsing the capabilities again.
|
WMTSTileService(String templateURL,
WMTSServiceType type,
WMTSLayer layer,
String styleName,
TileMatrixSet tileMatrixSet,
HTTPClient client)
create a service directly with out parsing the capabilities again.
|
Modifier and Type | Method and Description |
---|---|
protected Tile |
addTileToCache(Tile tile)
Add a tile to the cache.
|
Set<Tile> |
findTilesInExtent(ReferencedEnvelope requestedExtent,
double scaleFactor,
boolean recommendedZoomLevel,
int maxNumberOfTiles) |
ReferencedEnvelope |
getBounds() |
Map<String,String> |
getDimensions()
Deprecated.
Dimensions should be a part of templateUrl
|
Map<String,Object> |
getExtrainfo()
A place to put any Header that should be sent in http calls.
|
String |
getFormat()
Deprecated.
|
String |
getLayerName()
Deprecated.
|
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.
|
String |
getStyleName()
Deprecated.
|
String |
getTemplateURL()
Deprecated.
|
TileFactory |
getTileFactory()
Returns the TileFactory which is used to call the method getTileFromCoordinate().
|
TileMatrix |
getTileMatrix(int zoomLevel) |
String |
getTileMatrixSetName()
Deprecated.
|
WMTSServiceType |
getType()
Deprecated.
|
WMTSZoomLevel |
getZoomLevel(int zoom) |
void |
setFormat(String format)
Deprecated.
include in templateURL
|
void |
setMatrixSet(TileMatrixSet matrixSet) |
void |
setStyleName(String styleName)
Deprecated.
|
void |
setTemplateURL(String templateURL)
Deprecated.
|
void |
setTileMatrixSetName(String tileMatrixSetName)
Deprecated.
|
void |
setType(WMTSServiceType type)
Deprecated.
|
createSafeEnvelopeInWGS84, getBaseUrl, getHttpClient, getMaxZoomLevel, getMinZoomLevel, getName, getTileCrs, getTileHeight, getTileWidth, getZoomLevelFromMapScale, getZoomLevelToUse, loadImageTileImage, toString
protected static final Logger LOGGER
@Deprecated public static final String DIMENSION_TIME
@Deprecated public static final String DIMENSION_ELEVATION
public static final String EXTRA_HEADERS
public WMTSTileService(String templateURL, WMTSServiceType type, WMTSLayer layer, String styleName, TileMatrixSet tileMatrixSet)
This constructor 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 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.protected ReferencedEnvelope getReqExtentInTileCrs(ReferencedEnvelope requestedExtent)
public Set<Tile> findTilesInExtent(ReferencedEnvelope requestedExtent, double scaleFactor, boolean recommendedZoomLevel, int maxNumberOfTiles)
findTilesInExtent
in class TileService
protected Tile addTileToCache(Tile tile)
At the moment we are delegating the cache to the super class, which handles the cache as a soft cache. The soft cache has an un-controllable time to live, could last a split seconds or 100 years. However, WMTS services normally come with caching headers of some sort, e.g., do not cache, or keep for 1 hour, or 6 months and so on.
TODO: The code should account for that.
addTileToCache
in class TileService
@Deprecated public WMTSServiceType getType()
@Deprecated public void setType(WMTSServiceType type)
type
- the type to set@Deprecated public String getLayerName()
@Deprecated public String getStyleName()
@Deprecated public void setStyleName(String styleName)
styleName
- the styleName to setpublic 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()
getBounds
in class TileService
public CoordinateReferenceSystem getProjectedTileCrs()
TileService
getProjectedTileCrs
in class TileService
public TileFactory getTileFactory()
TileService
getTileFactory
in class TileService
@Deprecated public String getTileMatrixSetName()
@Deprecated public void setTileMatrixSetName(String tileMatrixSetName)
tileMatrixSetName
- the tileMatrixSetName to setpublic TileMatrixSetLink getMatrixSetLink()
@Deprecated public String getTemplateURL()
@Deprecated public void setTemplateURL(String templateURL)
templateURL
- the templateURL to setpublic TileMatrix getTileMatrix(int zoomLevel)
public TileMatrixSet getMatrixSet()
public void setMatrixSet(TileMatrixSet matrixSet)
matrixSet
- the matrixSet to set@Deprecated public String getFormat()
@Deprecated public void setFormat(String format)
format
- the format to setpublic WMTSZoomLevel getZoomLevel(int zoom)
@Deprecated public Map<String,String> getDimensions()
Copyright © 1996–2022 Geotools. All rights reserved.