Opened 3 years ago
Closed 3 years ago
#2607 closed enhancement (fixed)
NEW - Petascope supports WMTS request
Reported by: | Bang Pham Huu | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | major | Milestone: | 10.1 |
Component: | petascope | Version: | 10.0 |
Keywords: | Cc: | ||
Complexity: | Medium |
Description
The WMTS serves a single tile of a single layer of a map. Unlike WMS, there is no specified way to request a server to combine and return a map tile with information coming from more than one layer in a single fetching process.
In general it has 2 mandatory requests:
GetCapabilities
. Example: https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer/WMTS?service=WMTS&version=1.0.0&request=getcapabilities
The big difference compared to WMS is, each Layer
needs to be linked to at least on of TileMatrixSet
. For example:
<TileMatrixSetLink> <TileMatrixSet>setInEPSG:4326</TileMatrixSet> </TileMatrixSetLink> <TileMatrixSetLink> <TileMatrixSet>setInEPSG:32633</TileMatrixSet> </TileMatrixSetLink>
And a TileMatrixSet
in a typical CRS has a set of TileMatrix
elements.
Each TileMatrix
element contains the 2D matrix of geo XY axes per layers' pyramid level in the CRS.
Each element in the 2D matrix of TileMatrix
is called Tile
and is accessed via indices: tileRow
and tileCol
.
For example:
<TileMatrixSet> <ows:Identifier>BigWorldPixel</ows:Identifier> <ows:SupportedCRS>urn:ogc:def:crs:OGC:1.3:CRS84 </ows:SupportedCRS> <WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GlobalCRS84Pixel </WellKnownScaleSet> <!-- Base level --> <TileMatrix> <ows:Identifier>10000m</ows:Identifier> <ScaleDenominator>33130800.83133142</ScaleDenominator> <TopLeftCorner>-180 90</TopLeftCorner> <TileWidth>640</TileWidth> <TileHeight>480</TileHeight> <MatrixWidth>7</MatrixWidth> <MatrixHeight>5</MatrixHeight> </TileMatrix> <!-- pyramid member level 2 --> <TileMatrix> <ows:Identifier>20000m</ows:Identifier> <ScaleDenominator>66261601.66266284</ScaleDenominator> <TopLeftCorner>-180 90</TopLeftCorner> <TileWidth>640</TileWidth> <TileHeight>480</TileHeight> <MatrixWidth>4</MatrixWidth> <MatrixHeight>3</MatrixHeight> </TileMatrix> ... </TileMatrixSet>
Here, one needs to specify extra parameters (see Annex H
in the document https://portal.ogc.org/files/?artifact_id=35326 for the formula to convert tile indices to layer's bounding box):
tileMatrixSet
: whichTileMatrixSet
is used (e.g. global CRS:4326 or native CRS EPSG:32632)tileMatrix
: whichTileMatrix
is used (e.g. the pyramid member is selected)TileRow
: Row index of the selected tile in theTileMatrix
TileCol
: Column index of the selected tile in theTileMatrix