Hi,

I am using 3.8.4  of GDAL .NET and running this code:

                    string[] warpOptions =
                    {
                        "outputType", GdalConst.GDT_Byte.ToString(),
                        "srcSRS", projectionWKT,
                        "dstSRS", "EPSG:3857",
                        "accessMode", "overwrite"
                    };

                    string geoTiffOutputFileName = Path.GetTempFileName();
                    string pngOutputFileName = convertToImage ? 
Path.GetTempFileName() : null;

                    try
                    {
                        GDALVectorTranslateOptions gdalWarpOptions = new 
GDALVectorTranslateOptions(warpOptions);

                        using (Dataset outputDataset = 
Gdal.wrapper_GDALVectorTranslateDestName(geoTiffOutputFileName, dataset, 
gdalWarpOptions, null, null))
                        {
                            if (convertToImage)
                            {
                                string[] translateOptions = { "-of", "PNG" };
                                using 
(Gdal.wrapper_GDALTranslate(pngOutputFileName, outputDataset, new 
GDALTranslateOptions(translateOptions), null, null)) { }
                            }
                        }
                  }

And on the call to Gdal.wrapper_GDALVectorTranslateDestName I get the following 
error:

System.ApplicationException: 'Cannot guess driver for F:\Temp\2\tmp7A67.tmp'

This is in the generation of the geoTiffOutputFileName file.

Does anyone know why I am getting this error?

Thanks
Ian

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to