Class TLcdWMTSModelDecoder

java.lang.Object
com.luciad.ogc.wmts.client.TLcdWMTSModelDecoder
All Implemented Interfaces:
ILcdDataSourceModelDecoder, ILcdModelDecoder

@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdWMTSModelDecoder extends Object implements ILcdModelDecoder, ILcdDataSourceModelDecoder
This model decoder decodes a WMTS layer into an ILcdModel object.

Input

  • An instance of TLcdWMTSDataSource.
  • A String referring to the WMTS base URL.
  • A String referring to the WMTS base URL and layer identifier, specified as a data=layerName key/value pair.

Supported transfer protocols

  • This model decoder supports http and https protocols.

Model structure

  • This model decoder creates a model per WMTS layer. If only a WMTS base URL is provided, a ILcdModelTreeNode is returned that contains an {code ILcdModel} for each individual WMTS layer.
  • Each model representing a WMTS layer is of type ILcd2DBoundsIndexedModel and ILcdMultiDimensionalModel. In case the WMTS layer defines dimensions, ILcdMultiDimensionalModel can be used to support dimensional filtering.

Model descriptor

  • All models returned by this model decoder have a TLcdWMTSModelDescriptor.
  • The model descriptor of a model for an individual WMTS layer is also of type ILcdImageModelDescriptor, indicating that the model data can be accessed through the ALcdImage API.
  • The type name of the model descriptor is the display name of this decoder.

Model reference

Model elements

  • Each model representing a WMTS layer contains a single element of type ALcdMultilevelImageMosaic. If the tile pyramid has a quad-tree structure, it is also of the type ILcdEarthTileSet.
  • The model element is also of the type ILcdWMTSClientProvider, to allow retrieving the TLcdWMTSClient instance that is used to communicate with the WMTS server.

Thread safety

  • A decoder instance can be used concurrently, provided the used ILcdTransport is thread-safe (default).
  • Decoded model instances can also be used concurrently, provided the ILcdTransport is thread-safe.

Sample code

Decoding a WMTS data source:

    String serverURL = "https://sampleservices.luciad.com/wmts";
    String layerName = "4ceea49c-3e7c-4e2d-973d-c608fb2fb07e";

    //Create the data source
    TLcdWMTSDataSource dataSource = TLcdWMTSDataSource.newBuilder()
                                                      .uri(serverURL)
                                                      .layer(layerName)
                                                      .build();

    //Decode the model
    ILcdModelDecoder decoder = new TLcdWMTSModelDecoder();
    ILcdModel model = decoder.decodeSource(dataSource);

Decoding a string containing the server URL and WMTS layer name

    String serverURL = "https://sampleservices.luciad.com/wmts";
    String layerName = "4ceea49c-3e7c-4e2d-973d-c608fb2fb07e";

    //Concat the url and layer name to a single string
    String sourceName = String.format("%s?data=%s", serverURL, layerName);

    //Decode the model
    ILcdModelDecoder decoder = new TLcdWMTSModelDecoder();
    ILcdModel model = decoder.decode(sourceName);

Supported versions and specifications

  • This model decoder supports WMTS servers that comply with the OGC WMTS 1.0 specification. For more information about the OGC WMTS specification, please refer to http://www.opengeospatial.org.

Since:
2013.0