[Qgis-developer] Problem with GDAL_translate. REST Services, QGIS

Randal Hale rjhale at northrivergeographic.com
Thu Mar 13 09:58:17 PDT 2014


Do gdal service description files no longer work? I was hoping for an 
XML output.

From:
http://hub.qgis.org/wiki/17/Arcgis_rest:
1. In the QGIS Python console, run this:
|qgis.utils.iface.addRasterLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true","raster")|
2. Create a gdal service description file, e.g. by running this in a 
terminal:
|gdal_translate 
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true" 
s.xml -of WMS|
You can now load this file into QGIS, e.g. by drag-and-drop.

I've used it several times - this morning it wouldn't work - Unless it's 
something I'm doing wrong and I really hope it is. I thought it was odd 
using json but I was just following directions as posted.

Randy

-----------------
Randal Hale, GISP
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjhale at northrivergeographic.com
twitter:rjhale
http://about.me/rjhale

On 03/13/2014 12:50 PM, Lauri Kajan wrote:
> Hi Randy,
>
> You are requesting json format from arcgisonline. That is a vector 
> format and you are trying to use it as a raster image.
> Secondly you are trying to translate that into WMS with 
> gdal_translate. Gdal supports WMS-reading only, not creation 
> (http://gdal.org/formats_list.html).
>
> I recommend for you some introduction to GIS and raster and vector 
> formats.
> http://www.qgis.org/en/docs/gentle_gis_introduction/index.html
>
>
> Regards,
>
> Lauri
>
>
>
>
> On Thu, Mar 13, 2014 at 4:51 PM, Randal Hale 
> <rjhale at northrivergeographic.com 
> <mailto:rjhale at northrivergeographic.com>> wrote:
>
>     So I figured I would start here and work my way out...or up. Sorry
>     for the cross posting. I'm hitting a little bit of everything on
>     this one. Same action - different results (sorta). This is all of
>     my attempts at adding a REST Service from ArcGISOnline to QGIS
>     (using GDAL in some cases).
>
>     On Ubuntu 12.04 LTS gdal 1.10
>     This command: gdal_translate
>     "http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer?f=json&pretty=true"
>     ESRITopographicLayer.xml -of WMS
>     Gives me a segmentation fault
>
>     On windows 7 OSGEO4w 32 bit installer gdal 1.10.1
>     This command: gdal_translate
>     "http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer?f=json&pretty=true"
>     ESRITopographicLayer.xml -of WMS
>     Gives me:
>     ERROR 4: `/vsimem/http_1/file.dat' not recognised as a supported
>     file format.
>     ERROR 4: `/tmp/file.dat' not recognised as a supported file format.
>     GDALOpen failed - 4
>
>     In QGIS 2.2  On windows (OSGEo4W installer) python console:
>     qgis.utils.iface.addRasterLayer("http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer?f=json&pretty=true","raster")
>     Gives me an error saying /tmp/file.dat is not a recognized format.
>
>     On Ubuntu 12.04 QGIS 2.2 Python Console
>     qgis.utils.iface.addRasterLayer("http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer?f=json&pretty=true","raster")
>     Crashes QGIS.
>
>     Once again my apologies for cross posting. I *think* it's all
>     related. I think.
>
>     Randy
>
>     -- 
>     -----------------
>     Randal Hale, GISP
>     North River Geographic Systems, Inc
>     http://www.northrivergeographic.com
>     423.653.3611 <tel:423.653.3611> rjhale at northrivergeographic.com
>     <mailto:rjhale at northrivergeographic.com>
>     twitter:rjhale
>     http://about.me/rjhale
>
>     _______________________________________________
>     Qgis-developer mailing list
>     Qgis-developer at lists.osgeo.org <mailto:Qgis-developer at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140313/a67b17e4/attachment-0001.html>


More information about the Qgis-developer mailing list