0

I am running QGIS server 3.4 on Windows 10, using XXAMP (without fcgid). The server is set to serve WMS and also WMTS (just png for now).

The project itself is just one publicly available vector layer of some town boundaries, with simple area symbology.

I can view WMS of the entire map using this request:

http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=D:\Documents\GIS\Projects\serverTest.qgz&SERVICE=WMS&REQUEST=GetMap&WIDTH=400&HEIGHT=200&CRS=EPSG:4326&LAYERS=CommBnd&version=1.3.0&STYLE=default&

enter image description here

However, attempts to view a single tile just return a 256x256 blank (solid black) image. Hopefully I just have something wrong about the requests:

http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=D:\Documents\GIS\Projects\serverTest.qgz&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=CommBnd&STYLE=default&FORMAT=image/png&TileMatrixSet=EPSG:4326&TILEMATRIX=2&TILEROW=1&TILECOL=1

Here are the relevant snippets from the result of the GetCapabilities request:

http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=D:\Documents\GIS\Projects\serverTest.qgz&SERVICE=WMTS&REQUEST=GetCapabilities

  <ows:Operation name="GetTile">
   <ows:DCP>
    <ows:HTTP>
     <ows:Get xlink:href="http://localhost/cgi-bin/qgis_mapserv.fcgi.exe?MAP=D:%5CDocuments%5CGIS%5CProjects%5CserverTest.qgz"/>
    </ows:HTTP>
   </ows:DCP>
  </ows:Operation>
...
  <Layer>
   <ows:Identifier>CommBnd</ows:Identifier>
   <ows:Title>Community Boundaries Test</ows:Title>
   <ows:WGS84BoundingBox>
    <LowerCorner>-121.219377 39.020469</LowerCorner>
    <UpperCorner>-120.076683 39.386753</UpperCorner>
   </ows:WGS84BoundingBox>
...
   <Style isDefault="true">
    <ows:Identifier>default</ows:Identifier>
    <ows:Title>default</ows:Title>
   </Style>
   <Format>image/png</Format>
...
  <TileMatrixSet>
   <ows:Identifier>EPSG:4326</ows:Identifier>
   <ows:SupportedCRS>EPSG:4326</ows:SupportedCRS>
   <TileMatrix>
    <ows:Identifier>0</ows:Identifier>
    <ScaleDenominator>279541132.014359</ScaleDenominator>
    <TopLeftCorner>-180 90</TopLeftCorner>
    <TileWidth>256</TileWidth>
    <TileHeight>256</TileHeight>
    <MatrixWidth>2</MatrixWidth>
    <MatrixHeight>1</MatrixHeight>
   </TileMatrix>
   <TileMatrix>
    <ows:Identifier>1</ows:Identifier>
    <ScaleDenominator>139770566.007179</ScaleDenominator>
    <TopLeftCorner>-180 90</TopLeftCorner>
    <TileWidth>256</TileWidth>
    <TileHeight>256</TileHeight>
    <MatrixWidth>4</MatrixWidth>
    <MatrixHeight>2</MatrixHeight>
   </TileMatrix>
...

This snippet is also in the result of GetCapabilities, I was not able to find any documentation on how the settings in QGIS Desktop -> Project -> Properties -> WMTS Capabilities affect these lines, but I'm guessing they may be related to the problem:

   <TileMatrixSetLink>
    <TileMatrixSet>EPSG:4326</TileMatrixSet>
    <TileMatrixSetLimits>
     <TileMatrixLimits>
      <TileMatrix>0</TileMatrix>
      <MinTileCol>0</MinTileCol>
      <MaxTileCol>0</MaxTileCol>
      <MinTileRow>0</MinTileRow>
      <MaxTileRow>0</MaxTileRow>
     </TileMatrixLimits>
     <TileMatrixLimits>
      <TileMatrix>1</TileMatrix>
      <MinTileCol>0</MinTileCol>
      <MaxTileCol>0</MaxTileCol>
      <MinTileRow>0</MinTileRow>
      <MaxTileRow>0</MaxTileRow>
     </TileMatrixLimits>
    </TileMatrixSetLimits>
   </TileMatrixSetLink>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.