[gdal-dev] Trying to get a WMS image with GDAL
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Tue Oct 29 04:21:09 PDT 2013
Adri CS <acsantome <at> gmail.com> writes:
>
>
>
>
>
> Hello everybody,
> I'm basically a noob with GDAL and I'm tasked to get a WMS using GDAL.
> The only experience I have with GDAL is opening a raster and getting the
metainfo from it. I did it following the GDAL API Tutorial.
> Okay, for the WMS, I'm reading http://www.gdal.org/frmt_wms.html but I'm
having a really difficult time to start in C++.
>
> Is there a tutorial like the GDAL API Tutorial where I can start from? Or
the process of fetching the WMS is the same as for a raster?
Hi,
You are reading the right document. Take the onearth_global_mosaic example
and modify the xml file to use server
http://vmap0.tiles.osgeo.org/wms/vmap0 and layer "basic"
and then you will soon get an image like this
http://vmap0.tiles.osgeo.org/wms/vmap0?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=351&LAYERS=basic&TRANSPARENT=TRUE&FORMAT=image%2Fjpeg&BBOX=-180.0,-137.64705882352942,180.0,137.64705882352942&SRS=EPSG:4326&STYLES=
with gdal_translate as in the example.
By the way, OSGeo is running a misconfigured ancient MapServer 5.6.5 with a
wrong OnlineResource as can be seen
http://vmap0.tiles.osgeo.org/wms/vmap0?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0
Using the advertised URL gives an error msLoadMap(): Unable to access file.
(/var/www/tiles/vmap0/.map)
-Jukka Rahkonen-
More information about the gdal-dev
mailing list