[Gdal-dev] WMS with C# Bindings
GrinderDev
grinderprogrammer at gmail.com
Thu Dec 6 12:46:46 EST 2007
Tamas Szekeres wrote:
>
> I couldn't follow exactly what is the issue. Do you have and error
> message? Could you post a code sample to reproduce the problem?
Hi Tamas -
The error: "Couldn't load dataset, 'd:\wms_test\gdal_tes.wms' no recognised
as a supported file format.
The wms file is the xml file that begins with <GDAL_WMS>. I'm currently
using the examples posted for the WMS file format on the gdal.org site.
My simple code snippet:
Gdal.AllRegister();
try
{
_GdalDataset = Gdal.Open(_Filename, Access.GA_ReadOnly);
imagesize = new Size(_GdalDataset.RasterXSize,
_GdalDataset.RasterYSize);
}
catch (Exception ex)
{
_GdalDataset = null;
throw new Exception("Couldn't load dataset. " + ex.Message +
ex.InnerException);
}
An exception is thrown, with the above error message, in the Gdal.Open call.
I've tried renaming the XML file to a variety of different file extensions.
I know that I'm simply using this incorrectly.
Thank you for your assistance.
--
View this message in context: http://www.nabble.com/WMS-with-C--Bindings-tf4956367.html#a14197454
Sent from the GDAL - Dev mailing list archive at Nabble.com.
More information about the gdal-dev
mailing list