I'm trying to connect to a wfs using GDAL, from reading some of the (fairly sparse) documentation on this i have found that this is possible if GDAL is compiled with the correct drivers (Curl, Xerces).
I have compiled GDAL against both of these and have a working WFS Service to connect to.
From reading the documentation it says this is how the connection should be opened.
GDALDataset *poDataset; GDALAllRegister(); poDataset = (GDALDataset *) GDALOpen( pszFilename, GA_ReadOnly );
I have done this and replaced pszFilename with a URL to my WFS which didnt work and gave the error (and i have no idea what file.dat is referring to as all im doing here is entering a URL that should return some XML):
ERROR 4: `/vsimem/http_1/file.dat' not recognised as a supported file format. ERROR 4: Failed to create temporary file:/tmp/file.dat
alternatively it says that you could use an XML File that contains the URL like this:
<OGRWFSDataSource> <URL>http://path/to/WFS/service[?OPTIONAL_PARAMETER1=VALUE[&OPTIONNAL_PARAMETER2=VALUE]]</URL> </OGRWFSDataSource>
I have made this XML file and put in my URL for the WFS im trying to connect to and i get this error even though the documentation says that reading the url from XML is supported:
ERROR 4: `:/Resources/WFS.xml' does not exist in the file system, and is not recognised as a supported dataset name.
Im wondering if anyone knows how to connect to a WFS using GDAL because as far as documentation goes this is about all its says in the way of how to connect and goes into no detail about supported file formats or how to connect to any of these.
Any help would be appreciated (oh and btw my WFS is working because if i type the URL into my web browser i get the XML (or is it GML?) in the web browser for the request i send (a GetCapabilities one))