[gdal-dev] Ogr.Open Returns Null

tolga ergenekonlu tergenekonlu at yahoo.com
Thu Jul 4 08:24:26 PDT 2019


Hi,
I am using Visual Studio 2010 and developing a C# project. I have downloaded gdal-202-1600-x64-core.msi and gdal-202-1600-x64-filgdb.msi from the following website:
    "GISInternals Support Site
I have installed those two installations. They are installed at "C:\Program Files\GDAL".
I prepared a very small C# Project. I added the files "gdal_csharp.dll", "ogr_csharp.dll" and "osr_csharp.dll" as reference. And I copied all files and folders in "C:\Program Files\GDAL" folder to "bin\x64\debug" folder.
The code is as follows:
Ogr.RegisterAll();string sourceFile = "gltp:/vrf:D:/v0eur_5-xx/noamer/lib_116";DataSource dataSource = Ogr.Open(sourceFile, 0);
The directory is a VMAP file. Unfortunately datasource is null after execution of last line. However I had used the same line of code with Visual Studio 2005 by using "FWTools" files instead of the two installations I mentioned above and it works. ("datasource" is  not null.)
Can you help me about this subject?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190704/0e583099/attachment.html>


More information about the gdal-dev mailing list