Hi,
Geoserver is perhaps creating invalid WMTS capabilities for group layers.
For example the demo layer Tasmania
<Layer>
<ows:Title>Tasmania</ows:Title>
<ows:Abstract>Tasmania Australia from Digital Chart of the World.</ows:Abstract>
<ows:WGS84BoundingBox>
<ows:LowerCorner>143.83482400000003 -43.648056</ows:LowerCorner>
<ows:UpperCorner>148.47914100000003 -39.573891</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:Identifier>tasmania</ows:Identifier>
<Style isDefault="true">
<ows:Identifier/>
</Style>
The issue is that Identifier, that is mandatory by the WMTS standars, is null.
Trouble has appeared when GDAL tries to read a group layer. It builds a GetTile query according to the ResourceURL:
<ResourceURL format="image/png" resourceType="tile" template="http://localhost:8080/geoserver/gwc/service/wmts/rest/tasmania/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?
For example:
http://localhost:8080/geoserver/gwc/service/wmts/rest/tasmania//EPSG:4326/EPSG:4326:9/378/930?format=image/png
Notice empty styles after tasmania in ...tasmania//EPSG:4326/...
I made a test with Geoserver 2.25.3 that comes with GWC 1.25 and the request works. The GDAL user had problems with a service that seems to run GWC 1.22.1 and they had to shorten the url by removing the empty style, or name the style into “default”.
What do you developers think, is empty style identifier all right according to the WMTS standard? The definition of Style-Identifier in the standard is “An unambiguous reference to this style, identifying a specific version when needed, normally used by software”, and Multiplicity and use is “One (mandatory)”.
I can’t judge. Maybe, if there is only one style, even NULL is unambiguous.
GWC 1.25 works for me but I do not know if the issue with having an empty style part in the REST GetTile URL has been fixed since GWC 1.22.1 or if there is something else happening.