[Gdal-dev] GDAL WCS Driver

Jeff Beiko jbeiko at pyxisinnovation.com
Wed Aug 29 10:53:19 EDT 2007


Hello, 

I'm having problems getting the WCS functionality working in GDAL under C++. 
Are there any good tutorials?

I have downloaded GDAL and CURL and have successfully built them and have 
included the WCS functionality by having the following lines in nmake.opt:

# Uncomment to use libcurl (for WCS)
CURL_DIR=C:\libcurl-7.15.1
CURL_INC = -I$(CURL_DIR)/include 
CURL_LIB = $(CURL_DIR)/libcurl_imp.lib


I have set up my includes and lib paths in my MSVC project. I can confirm that 
the WCS Driver is in fact being loaded; a valid object is returned from:

GDALDriverH driverIsLoaded = GDALGetDriverByName( "WCS" );


However, when I try to retrieve WCS Data using a command like:

poDataset = (GDALDataset *) GDALOpen(fileName.c_str(), GA_ReadOnly);

...Where the file contains xml similar to the xml below, I always get a null 
pointer back and the error message:

ERROR 4: (the full xml...) does not exist in the file system, and is not 
recognized as a supported dataset name.

<?xml version="1.0" encoding="UTF-8"?> 
<WCS_GDAL>
<ServiceURL>http://geodata.telascience.org/cgi-bin/mapserv_dem?</ServiceURL>
<CoverageName>srtmplus_raw</CoverageName>
<Timeout>75</Timeout>
</WCS_GDAL>

I also try just passing GDALOpen the straight XML also.

Any help would be enormously appreciated.
Thank you,
~Jeff





More information about the Gdal-dev mailing list