Package org.geotools.ows.wmts
Class WebMapTileServer
WebMapTileServer is a class representing a WMTS.
It is used to access the Capabilities document and perform requests. It will perform version negotiation automatically and use the highest known version that the server can communicate.
- Author:
- ian, Emanuele Tajariol (etj at geo-solutions dot it)
-
Field Summary
Fields inherited from class AbstractOpenWebService
capabilities, headers, hints, info, LOGGER, resourceInfo, serverURL, specification, specs
-
Constructor Summary
ConstructorsConstructorDescriptionWebMapTileServer
(URL serverURL) Set up the WebMapTileServer by calling serverURL with the default http client.WebMapTileServer
(URL serverURL, HTTPClient httpClient) Set up the WebMapTileServer by the given serverUrl using the given http client.WebMapTileServer
(URL serverURL, HTTPClient httpClient, Map<String, String> headers) Set up the WebMapTileServer by the given serverUrl, using the http client with additional headers.WebMapTileServer
(URL serverURL, HTTPClient httpClient, WMTSCapabilities capabilities) Set up the WebMapTileServer by the given capabilities, with the given serverURL.WebMapTileServer
(URL serverURL, HTTPClient httpClient, WMTSCapabilities capabilities, Map<String, Object> hints) Set up the WebMapTileServer by the given capabilities, with the given serverURL and additional hints.WebMapTileServer
(URL serverURL, WMTSCapabilities capabilities) Set up the WebMapTileServer by the given capabilities, with the given serverURL.WebMapTileServer
(WebMapTileServer delegate) Set up a WebMapTileServer by the same serverURL, httpClient, capabilities and hints as delegate -
Method Summary
Modifier and TypeMethodDescriptionCreates a GetMultiTileRequest.createGetTileRequest
(boolean multiTile) Creates a GetTileRequest.protected ServiceInfo
Implemented by a subclass to describe serviceprotected ResourceInfo
createInfo
(Layer resource) Get the getCapabilities document.getEnvelope
(Layer layer, CoordinateReferenceSystem crs) getType()
issueRequest
(GetFeatureInfoRequest request) issueRequest
(GetTileRequest tileRequest) Deprecated.- change to tileRequest.getTiles()issueRequest
(WMTSSpecification.GetSingleTileRequest tileRequest) The new issueRequest, which gives a GetTileResponse in response for a GetSingleTileRequest.selectMatrixSet
(WMTSLayer layer, CoordinateReferenceSystem requestCRS) Selects the tileMatrixSet that is linked to this layer with the given CRSvoid
setType
(WMTSServiceType type) protected void
Sets up the specifications/versions that this server is capable of communicating with.Methods inherited from class AbstractOpenWebService
getHints, getHTTPClient, getInfo, getInfo, internalIssueRequest, issueRequest, negotiateVersion, setHints, setHttpClient, setLoggingLevel
-
Constructor Details
-
WebMapTileServer
Set up the WebMapTileServer by the given serverUrl using the given http client.- Parameters:
serverURL
-httpClient
-- Throws:
ServiceException
IOException
-
WebMapTileServer
public WebMapTileServer(URL serverURL, HTTPClient httpClient, Map<String, String> headers) throws ServiceException, IOExceptionSet up the WebMapTileServer by the given serverUrl, using the http client with additional headers.- Parameters:
serverURL
-httpClient
-headers
-- Throws:
ServiceException
IOException
-
WebMapTileServer
public WebMapTileServer(URL serverURL, WMTSCapabilities capabilities) throws ServiceException, IOException Set up the WebMapTileServer by the given capabilities, with the given serverURL. Using the default httpClient.- Parameters:
serverURL
-capabilities
-- Throws:
ServiceException
IOException
-
WebMapTileServer
public WebMapTileServer(URL serverURL, HTTPClient httpClient, WMTSCapabilities capabilities) throws ServiceException, IOException Set up the WebMapTileServer by the given capabilities, with the given serverURL. Using the given httpClient.- Parameters:
serverURL
-httpClient
-capabilities
-- Throws:
ServiceException
IOException
-
WebMapTileServer
public WebMapTileServer(URL serverURL, HTTPClient httpClient, WMTSCapabilities capabilities, Map<String, Object> hints) throws ServiceException, IOExceptionSet up the WebMapTileServer by the given capabilities, with the given serverURL and additional hints. Using the given http client.- Parameters:
serverURL
-httpClient
-capabilities
-hints
-- Throws:
ServiceException
IOException
-
WebMapTileServer
Set up the WebMapTileServer by calling serverURL with the default http client.- Parameters:
serverURL
-- Throws:
IOException
ServiceException
-
WebMapTileServer
Set up a WebMapTileServer by the same serverURL, httpClient, capabilities and hints as delegate- Parameters:
delegate
-- Throws:
ServiceException
IOException
-
-
Method Details
-
getCapabilities
Description copied from class:AbstractOpenWebService
Get the getCapabilities document. If there was an error parsing it during creation, it will return null (and it should have thrown an exception during creation).- Specified by:
getCapabilities
in classAbstractOpenWebService<WMTSCapabilities,
Layer> - Returns:
- a Capabilities object, representing the Capabilities of the server
-
createInfo
Description copied from class:AbstractOpenWebService
Implemented by a subclass to describe service- Specified by:
createInfo
in classAbstractOpenWebService<WMTSCapabilities,
Layer> - Returns:
- ServiceInfo
-
createInfo
- Specified by:
createInfo
in classAbstractOpenWebService<WMTSCapabilities,
Layer>
-
setupSpecifications
protected void setupSpecifications()Description copied from class:AbstractOpenWebService
Sets up the specifications/versions that this server is capable of communicating with.- Specified by:
setupSpecifications
in classAbstractOpenWebService<WMTSCapabilities,
Layer>
-
issueRequest
Deprecated.- change to tileRequest.getTiles()- Throws:
ServiceException
-
issueRequest
public GetTileResponse issueRequest(WMTSSpecification.GetSingleTileRequest tileRequest) throws IOException, ServiceException The new issueRequest, which gives a GetTileResponse in response for a GetSingleTileRequest.- Throws:
IOException
ServiceException
-
createGetTileRequest
Creates a GetMultiTileRequest. -
createGetTileRequest
Creates a GetTileRequest. Either a GetSingleTileRequest or GetMultiTileRequest.GetSingleTileRequest is either KVP or REST
The url served to GetRestTileRequest is just the serverUrl. The proper templateUrl is found at a later stage.
-
selectMatrixSet
public TileMatrixSet selectMatrixSet(WMTSLayer layer, CoordinateReferenceSystem requestCRS) throws ServiceException Selects the tileMatrixSet that is linked to this layer with the given CRS- Throws:
ServiceException
-
createGetFeatureInfoRequest
-
issueRequest
-
setType
- Parameters:
type
-
-
getType
-
getEnvelope
-