1

I've been working, trying to get QGIS (v2.0 32bit) to connect to an ArcGIS Server service using the GDAL_WMS xml file. This is the service I'm trying to connect to:

http://geonb.snb.ca/ArcGIS/rest/services/GeoNB_Basemap_Imagery/MapServer/?SERVICE=WMS&REQUEST=GetCapabilities

This is the xml file I currently have:

<GDAL_WMS>
   <Service name="TMS">
        <Version>1.1.1</Version>
      <ServerUrl>http://geonb.snb.ca/ArcGIS/rest/services/GeoNB_Basemap_Imagery/MapServer/tile/${z}/${y}/${x}.jpg</ServerUrl>
        <Layers>Bathurst_ortho_final_graphic,SDEDO.FTON_ORTHOS_Clip2,MiramichiOrthos,SDEDO.snbortho,Year of Photography</Layers>
        <ImageFormat>image/jpeg</ImageFormat>
   </Service>
   <DataWindow>
        <UpperLeftX>2282341.95</UpperLeftX>
        <UpperLeftY>7698181.3</UpperLeftY>
        <LowerRightX>2737347.05</LowerRightX>
        <LowerRightY>7252058.7</LowerRightY>
        <TileLevel>13</TileLevel>
        <TileCountX>1</TileCountX>
        <TileCountY>1</TileCountY>
        <YOrigin>top</YOrigin>
    </DataWindow>
    <Projection>EPSG:2953</Projection>
    <BlockSizeX>512</BlockSizeX>
    <BlockSizeY>512</BlockSizeY>
    <BandsCount>3</BandsCount>
    <MaxConnections>10</MaxConnections>
    <Cache />
</GDAL_WMS>

And this is what I get:

http://i.imgur.com/yCJTaFO.png

This is not a WMS issue. The service doesn't support WMS connections and that's the reason for using the XML with GDAL. GDAL then creates a "WMS" like service on top of the images using the XML. It basically fetches images and puts them in the right spot. What I think is happening is it misinterpreting what tiles to fetch and how to stretch them. (Maybe)

Here's an example of a tile fetched directly from the service: http://geonb.snb.ca/ArcGIS/rest/services/GeoNB_Basemap_Imagery/MapServer/tile/0/64/64.jpg http://geonb.snb.ca/ArcGIS/rest/services/GeoNB_Basemap_Imagery/MapServer/tile/0/64/64.jpg http://geonb.snb.ca/ArcGIS/rest/services/GeoNB_Basemap_Imagery/MapServer/tile/0/64/64.jpg

This all works so there's something wrong with my XML. The documentation for the XML is here(www.gdal.org/frmt_wms.html), but it's not very descriptive. The specific section that relates to what I want to accomplish is the TMS service.

Any help would be greatly appreciated!

  • Are running QGIS 64bit? – Nathan W Sep 28 '13 at 7:20
  • QGIS 2.0 32bit (I've expanded my question) – brawn Sep 30 '13 at 12:34
  • The problem may be related to this: Level 0 of the service has 4 tiles, not a single one that the utility might be expecting. Maybe somebody who has more knowledge of GDAL would know. – brawn Sep 30 '13 at 19:40
  • I have the save problem and i think it is due to different SRS projection (with EPSG:4326, EPSG:3857 it works). I tried this gdal.org/frmt_wms_arcgis_mapserver_tms.xml with QGIS and it worked, but no successful attempts to adapt it to local arcgis services with EPSG:3346 - same random points image. – user28598 Feb 18 '15 at 6:58
3

I get the same result

But I don't see WMS in the Supported Interfaces of the service:

enter image description here

In contrast, An ArcGIS Server service with WMS Supported Interfaces work without problem

So I suppose that's the reason (no WMS service).

  • Thanks for answering, but that's why I'm using the XML with GDAL because the site doesn't support WMS. If it did I'd use WMS. The XML acts as a wrapper to the Tile Service. I've expanded my question to better explain my problem. Thanks again. – brawn Sep 30 '13 at 12:37

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.