[gdal-dev] WMS description file from gdalinfo output

Even Rouault even.rouault at mines-paris.org
Sat Aug 11 07:42:15 PDT 2012


Le mercredi 08 août 2012 13:22:50, Luca Casagrande a écrit :
> Hello everybody,
> using gdalinfo I can get information about a layer from a WMS server.
> 
> gdalinfo "WMS:http://localhost/cgi-bin/world/qgis_mapserv.fcgi" -sd 2
> 
> I wonder if there's a way to use this output to create a description file
> for the WMS service without copying values by hand.

You can use the subdataset name as a valid connexion string, or you can 
generate a XML description file from the subdataset name with something like :

gdal_translate 
"WMS:http://demo.opengeo.org/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=og:0&SRS=EPSG:4326&BBOX=-180.0,-90.000000000036,180.000000000072,90.0" 
out.xml -of WMS


More information about the gdal-dev mailing list