public class WMTSClientImpl extends Object implements WMTSClient
Represents the class with the necessary logic to connect to a OGCWMTS and interpret the data
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
forceChangeAxisOrder |
protected String |
hostName |
protected int |
port |
protected String |
serviceName |
| Constructor and Description |
|---|
WMTSClientImpl(String host)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
connect(boolean override,
ICancellable cancel)
Connects to a server
|
boolean |
connect(ICancellable cancel) |
WMTSStatus |
createStatus()
Creates a
WMTSStatus structure to make a request |
File |
downloadFile(URL url,
ICancellable cancel)
Downloads a file
|
void |
getCapabilities(WMTSServerDescription serverDescription,
boolean override,
ICancellable cancel)
One of the three interfaces defined by OGC WMS, it gets the service capabilities
|
String |
getFeatureInfo(WMTSStatus status,
int x,
int y,
ICancellable cancel)
It will send a GetFeatureInfo request to the WMTS
Parsing the response and redirecting the info to the WMTS client
|
List<String> |
getFormats(String layerTitle)
Gets the list of formats supported by a layer
|
String |
getHost() |
WMTSLayer |
getLayer(String layerName)
Gets a layer
|
WMTSThemes |
getLayerListAsThemes()
Gets the list of layers as
WMTSThemes. |
List<WMTSLayer> |
getLayers()
Reads from the WMS Capabilities, the layers available in the service
|
File |
getLegendGraphic(WMTSLayer layer,
WMTSStyle style,
ICancellable cancel)
Gets the legend graphic of one layer
|
int |
getNumberOfLayers()
Reads from the WMS Capabilities the number if layers available in the service
|
int |
getPort() |
WMTSServiceIdentification |
getServiceIdentification()
Gets the host description
|
String |
getServiceName() |
WMTSServiceProviderImpl |
getServiceProvider()
Gets the host description
|
String |
getSubtype() |
WMTSThemes |
getThemes()
Gets the list of themes
|
File |
getTile(String url,
ICancellable cancel,
File file)
Gets a tile downloading using a specific URL, path and file.
|
File |
getTile(WMTSStatus status,
ICancellable cancel)
One of the three interfaces that OGC WMS defines.
|
File |
getTile(WMTSStatus status,
ICancellable cancel,
File file)
Gets a tile downloading using a specific path and file.
|
List<WMTSTileMatrixSet> |
getTileMatrixSet()
Gets the set of tiles definition
|
URL |
getTileURL(WMTSStatus status)
Builds the URL to get a tile using a WMTSStatus object
|
String |
getType() |
String |
getVersion() |
void |
setForceChangeAxisOrder(boolean force)
Sets longitude first in the axis order
|
void |
setHost(String _hostName) |
void |
setPort(int _port) |
void |
setServiceName(String _serviceName) |
void |
setSubtype(String _subtype) |
void |
setType(String _type) |
protected String hostName
protected int port
protected String serviceName
protected boolean forceChangeAxisOrder
public WMTSClientImpl(String host) throws ConnectException, IOException
ConnectExceptionIOExceptionpublic void setForceChangeAxisOrder(boolean force)
setForceChangeAxisOrder in interface WMTSClientforce - public String getVersion()
public List<WMTSLayer> getLayers()
Reads from the WMS Capabilities, the layers available in the service
public int getNumberOfLayers()
Reads from the WMS Capabilities the number if layers available in the service
public void close()
public File getTile(String url, ICancellable cancel, File file) throws WMTSException, ServerErrorException
WMTSClientGets a tile downloading using a specific URL, path and file. This is useful for URL builds from templates
getTile in interface WMTSClientServerErrorExceptionWMTSExceptionpublic File getTile(WMTSStatus status, ICancellable cancel, File file) throws WMTSException, ServerErrorException
Gets a tile downloading using a specific path and file.
getTile in interface WMTSClientServerErrorExceptionWMTSExceptionpublic File getTile(WMTSStatus status, ICancellable cancel) throws WMTSException, ServerErrorException
One of the three interfaces that OGC WMS defines. Request a map.
getTile in interface WMTSClientServerErrorExceptionWMTSExceptionpublic URL getTileURL(WMTSStatus status) throws MalformedURLException
getTileURL in interface WMTSClientServerErrorExceptionMalformedURLExceptionpublic File downloadFile(URL url, ICancellable cancel) throws DownloadException
downloadFile in interface WMTSClientDownloadExceptionServerErrorExceptionpublic void getCapabilities(WMTSServerDescription serverDescription, boolean override, ICancellable cancel)
One of the three interfaces defined by OGC WMS, it gets the service capabilities
override, - if true the previous downloaded data will be overriddenpublic String getFeatureInfo(WMTSStatus status, int x, int y, ICancellable cancel)
It will send a GetFeatureInfo request to the WMTS Parsing the response and redirecting the info to the WMTS client
getFeatureInfo in interface WMTSClientpublic File getLegendGraphic(WMTSLayer layer, WMTSStyle style, ICancellable cancel) throws WMTSException
getLegendGraphic in interface WMTSClientWMTSExceptionpublic boolean connect(boolean override,
ICancellable cancel)
WMTSClientconnect in interface WMTSClientpublic boolean connect(ICancellable cancel)
public List<String> getFormats(String layerTitle)
layerTitle - public WMTSServiceIdentification getServiceIdentification()
WMTSClientgetServiceIdentification in interface WMTSClientpublic WMTSServiceProviderImpl getServiceProvider()
WMTSClientgetServiceProvider in interface WMTSClientpublic WMTSThemes getThemes()
getThemes in interface WMTSClientpublic WMTSThemes getLayerListAsThemes()
WMTSClientWMTSThemes. When the server
does not offer themes it is useful to have the same structure as list
of layers.getLayerListAsThemes in interface WMTSClientpublic List<WMTSTileMatrixSet> getTileMatrixSet()
WMTSClientgetTileMatrixSet in interface WMTSClientpublic WMTSLayer getLayer(String layerName)
WMTSClientgetLayer in interface WMTSClientpublic String getHost()
getHost in interface WMTSClientpublic void setHost(String _hostName)
public int getPort()
public void setPort(int _port)
public String getServiceName()
public void setServiceName(String _serviceName)
public String getType()
public void setType(String _type)
public String getSubtype()
public void setSubtype(String _subtype)
public WMTSStatus createStatus()
WMTSClientWMTSStatus structure to make a requestcreateStatus in interface WMTSClient