[gdal-dev] Trying to get a WMS image with GDAL

Adri CS acsantome at gmail.com
Wed Oct 30 04:28:53 PDT 2013


Hi,

I tried just to register the driver but got some nasty compilation errors:

#include "gdal.h"

#include "gdal_priv.h"

#include "cpl_conv.h"

#include "wms/wmsdriver.h"

#include "wms/wmsmetadataset.h"

int main() {

  GDALRegister_WMS();
  return 0;

}

The errors:


*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h:196:46: error: expected
class-name before '{' token*

* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h: In member function 'void
GDALWMSDataset::mSetBand(int, GDALRasterBand*)':*
* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h:219:64: error: 'SetBand' was
not declared in this scope*
* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h: In member function
'GDALWMSRasterBand* GDALWMSDataset::mGetBand(int)':*
* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h:220:102: error:
'GetRasterBand' was not declared in this scope*
* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h: At global scope:*
* *

*..\..\..\..\gdal-1.9.2\frmts/wms/wmsdriver.h:273:52: error: expected
class-name before '{' token*


**
And, is this the way to "read" the xml and fetch the wms?

GDALWMSDataset* wms_dataset = wms_dataset = GDALOpen("../test.xml",
GA_READONLY);

    if(wms_dataset) {

      qDebug() << "DRIVER:" << wms_dataset->GetDriver()->GetDescription();

      qDebug() << "RASTER COUNT:" << wms_dataset->GetRasterCount();

      qDebug() << "DATASET Description:" << wms_dataset->GetDescription();

    }

I'm literally clueless with the wms module.

Best regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131030/49b4e557/attachment.html>


More information about the gdal-dev mailing list