QGIS docs here describe how to do this. I am trying to add a layer from this MapServer:


When I try the following command from the Python console I get the error below.

>>> qgis.utils.iface.addRasterLayer("http://gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/MapServer?f=json&pretty=true","raster")


If I instead try the gdal_translate command line option it appears to be a issue with the the Well Known Text ID not being recognised:

$ gdal_translate --debug on "http://gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/MapServer?f=json&pretty=true" JerseyBaseMapLayer.xml -of WMS
HTTP: Fetch(http://gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/MapServer?f=json&pretty=true)
WMS: Did not get WKID
HTTP: Fetch(http://gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/MapServer?f=json&pretty=true)
ERROR 4: `/tmp/file.dat' not recognised as a supported file format.

GDALOpen failed - 4
`/tmp/file.dat' not recognised as a supported file format.

Question: As I know this provider's SRS (EPSG:3109) can I 'tell' QGIS/GDAL to apply it to the source data file, say by pointing to a WKT definition file?

gdal_translate has an option [-a_srs srs_def] to overide the output file projection, but I can't see a way to apply an SRS to an file imported via the REST API..

Very frustrating, as the data can easily be viewed in the ArcGIS webmap viewer:


  • I think this does not work when a TMS/Mapserver with Multiple layers(?)
    – Learner
    Oct 9, 2015 at 8:08


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.