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 ServiceInfoImplemented by a subclass to describe serviceprotected ResourceInfocreateInfo(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 CRSvoidsetType(WMTSServiceType type) protected voidSets 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:
ServiceExceptionIOException
-
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:
ServiceExceptionIOException
-
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:
ServiceExceptionIOException
-
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:
ServiceExceptionIOException
-
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:
ServiceExceptionIOException
-
WebMapTileServer
Set up the WebMapTileServer by calling serverURL with the default http client.- Parameters:
serverURL-- Throws:
IOExceptionServiceException
-
WebMapTileServer
Set up a WebMapTileServer by the same serverURL, httpClient, capabilities and hints as delegate- Parameters:
delegate-- Throws:
ServiceExceptionIOException
-
-
Method Details
-
getCapabilities
Description copied from class:AbstractOpenWebServiceGet 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:
getCapabilitiesin classAbstractOpenWebService<WMTSCapabilities,Layer> - Returns:
- a Capabilities object, representing the Capabilities of the server
-
createInfo
Description copied from class:AbstractOpenWebServiceImplemented by a subclass to describe service- Specified by:
createInfoin classAbstractOpenWebService<WMTSCapabilities,Layer> - Returns:
- ServiceInfo
-
createInfo
- Specified by:
createInfoin classAbstractOpenWebService<WMTSCapabilities,Layer>
-
setupSpecifications
protected void setupSpecifications()Description copied from class:AbstractOpenWebServiceSets up the specifications/versions that this server is capable of communicating with.- Specified by:
setupSpecificationsin 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:
IOExceptionServiceException
-
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
-