How does ogrinfo recognize this file? As far as I remember s57 requires the GDAL_DATA environment setting, for example:
Gdal.SetConfigOption("GDAL_DATA", "path to gdal-data"); Best regards, Tamas 2012/9/10 Neelima Emmani <neelima.emm...@iictechnologies.com> > Hi Tamas, > Agreeing with you . I just gave a test with a small piece of code.Code > goes as below - > > using System; > using System.Collections.Generic; > using System.Linq; > using System.Text; > using OSGeo.GDAL; > using OSGeo.OGR; > using OSGeo.OSR; > > namespace test_10_09_2012 > { > class Program > { > static void Main(string[] args) > { > OSGeo.GDAL.Gdal.AllRegister(); > String filename = @"xxxxxx.000"; > OSGeo.GDAL.Dataset ds = OSGeo.GDAL.Gdal.Open(filename, > OSGeo.GDAL.Access.GA_ReadOnly); > if (ds == null) > { > Console.WriteLine("Can't open " + filename); > System.Environment.Exit(-1); > } > Console.WriteLine("S57 dataset parameters:"); > Console.WriteLine(" Projection: " + ds.GetProjectionRef()); > > OSGeo.GDAL.Driver drv = ds.GetDriver(); > > if (drv == null) > { > Console.WriteLine("Can't get driver."); > System.Environment.Exit(-1); > } > > Console.WriteLine("Using driver " + drv.LongName); > } > } > } > This throws me an exception in reading the file format. It says that it > is not a recognized as a supported file format . > Do you have any idea. > > With Regards, > Neelima Emmani > > ------------------------------ > *From:* Tamas Szekeres [szeker...@gmail.com] > *Sent:* Monday, September 10, 2012 1:20 PM > *To:* Neelima Emmani > *Subject:* Re: [gdal-dev] gdal_wrap dll > > Hi, > > gdal_wrap.dll is not a managed assembly, you should not set reference to > this dll. > gdal_csharp.dll loads gdal_wrap.dll internally (assuming it's location is > added to the PATH environment setting) > > Best regards, > > Tamas > > > > 2012/9/10 Neelima Emmani <neelima.emm...@iictechnologies.com> > >> Hi All, >> I am trying to get gdal for c#. For that, I have taken gdal binaries from >> the below link >> http://www.gisinternals.com/sdk/. <http://www.gisinternals.com/sdk/> As >> I am using Microsoft Visual Studio 9.0 and the system is windows 64 bit, I >> chose the compiler msvc2008(win64)-development.From the list of downloads >> under this link , I chose gdal-20dev-1500-x64-core.msi and >> gdal-20dev-1500-x64-ecw.msi. These were installed under the c:/program >> files with a folder name GDAL. I have my visual studio under c:/program >> files(x86). And then , I have set my system environment path to c:/program >> files/GDAL. >> >> After all this, I opened a new c# console application where i was >> successful in adding references like gdal_csharp, ogr_csharp, osr_csharp >> but could not add gdal_wrap.dll. The system is popping me up with the >> following error >> >> A reference to 'C:\Program Files\GDAL\gdal_wrap.dll' could not be added. >> Please make sure that the file is accessible, and that it is a valid >> assembly or COM component. >> Can anyone suggest me how to add this dll to my project. Do i need to do >> anything to get it work? >> Awaiting reply. >> >> >> With Regards, >> Neelima Emmani >> >> >> _______________________________________________ >> gdal-dev mailing list >> gdal-dev@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/gdal-dev >> > >
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev