1

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

gps.digimap.gg/arcgis/rest/services/JerseyBaseMap/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")

popup

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:

www.arcgis.com/home/webmap/viewer.html?basemapUrl=http%3A%2F%2Fdcw7.digimap.gg%2Farcgis%2Frest%2Fservices%2FJBM%2FMapServer&source=sd

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

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.