Class WMTSTileService

  • All Implemented Interfaces:
    ImageLoader

    public class WMTSTileService
    extends TileService
    A tile service for a single matrix set of a WMTS servers.

    An instance of this class is tied to a single layer, style and matrixset.

    It can be constructed either by a templateUrl and use the inherited ImageLoader,

    Or it can use a WebMapTileServer to construct the GetTileRequest's and issueRequest for loading images.

    Author:
    ian, Emanuele Tajariol (etj at geo-solutions dot it)
    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
    • Constructor Detail

      • WMTSTileService

        public WMTSTileService​(String templateURL,
                               WMTSServiceType type,
                               WMTSLayer layer,
                               String styleName,
                               TileMatrixSet tileMatrixSet)
        Create a service with templateURL for loading images directly.

        This constructor, with type as argument, should not be used. A proper formatted templateURL should be used instead.

        Parameters:
        templateURL - - where to ask for tiles
        type - - KVP or REST
        layer - - the layer to request
        styleName - - name of the style to use?
        tileMatrixSet - - the tile matrix set to use
      • WMTSTileService

        public WMTSTileService​(String templateURL,
                               WMTSServiceType type,
                               WMTSLayer layer,
                               String styleName,
                               TileMatrixSet tileMatrixSet,
                               HTTPClient client)
        Create a service with templateURL for loading images directly.

        This constructor, with type, should not be used. A proper formatted templateURL should be used instead.

        Parameters:
        templateURL - - where to ask for tiles
        type - - KVP or REST
        layer - - layer to request
        styleName - - name of the style to use?
        tileMatrixSet - - matrixset
        client - - HttpClient instance to use for Tile requests.
      • WMTSTileService

        public WMTSTileService​(String templateURL,
                               WMTSLayer layer,
                               TileMatrixSet tileMatrixSet)
        Creates a WMTSTileService based on the templateURL for loading images. Using extent given by layer and tileMatrixSet.
        Parameters:
        templateURL -
        layer -
        tileMatrixSet -
      • WMTSTileService

        public WMTSTileService​(String templateURL,
                               WMTSLayer layer,
                               TileMatrixSet tileMatrixSet,
                               HTTPClient client)
        Create a service that uses the templateURL to load images.
        Parameters:
        templateURL - - where to ask for tiles
        layer - - layer to request
        tileMatrixSet - - matrixset
        client - - HttpClient instance to use for Tile requests.
      • WMTSTileService

        public WMTSTileService​(WebMapTileServer wmtsServer,
                               WMTSLayer layer,
                               TileMatrixSet tileMatrixSet)
        Create a WMTSTileservice using a WebMapTileServer to load the tile images. Using the format given by the capabilities.
      • WMTSTileService

        public WMTSTileService​(WebMapTileServer wmtsServer,
                               WMTSLayer layer,
                               TileMatrixSet tileMatrixSet,
                               String format)
        Create a WMTSTileService using an WebMapTileServer to load the tile images. Specifying a format.
    • Method Detail

      • getScaleList

        public double[] getScaleList()
        Description copied from class: TileService
        Returns a list that represents a mapping between zoom-levels and map scale.

        Array index: zoom-level Value at index: map scale High zoom-level -> more detailed map Low zoom-level -> less detailed map

        Specified by:
        getScaleList in class TileService
        Returns:
        mapping between zoom-levels and map scale
      • getTileMatrix

        public TileMatrix getTileMatrix​(int zoomLevel)
      • getMatrixSet

        public TileMatrixSet getMatrixSet()
        Returns:
        the matrixSet
      • setMatrixSet

        public void setMatrixSet​(TileMatrixSet matrixSet)
        Parameters:
        matrixSet - the matrixSet to set
      • getZoomLevel

        public WMTSZoomLevel getZoomLevel​(int zoom)
      • getExtrainfo

        public Map<String,​Object> getExtrainfo()
        A place to put any Header that should be sent in http calls.
        Returns: