How does ogrinfo recognize this file?<div>As far as I remember s57 requires the GDAL_DATA environment setting, for example:</div><div><br></div><div>Gdal.SetConfigOption("GDAL_DATA", "path to gdal-data");<br>
<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br><br><div class="gmail_quote">2012/9/10 Neelima Emmani <span dir="ltr"><<a href="mailto:neelima.emmani@iictechnologies.com" target="_blank">neelima.emmani@iictechnologies.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi Tamas,
<br>
Agreeing with you . I just gave a test with a small piece of code.Code goes as below -
<br>
<br>
using System;<br>
using System.Collections.Generic;<br>
using System.Linq;<br>
using System.Text;<br>
using OSGeo.GDAL;<br>
using OSGeo.OGR;<br>
using OSGeo.OSR;<br>
<br>
namespace test_10_09_2012<br>
{<br>
class Program<br>
{<br>
static void Main(string[] args)<br>
{<br>
OSGeo.GDAL.Gdal.AllRegister();<br>
String filename = @"xxxxxx.000";<br>
OSGeo.GDAL.Dataset ds = OSGeo.GDAL.Gdal.Open(filename, OSGeo.GDAL.Access.GA_ReadOnly);<br>
if (ds == null) <br>
{<br>
Console.WriteLine("Can't open " + filename);<br>
System.Environment.Exit(-1);<br>
}<br>
Console.WriteLine("S57 dataset parameters:");<br>
Console.WriteLine(" Projection: " + ds.GetProjectionRef());<br>
<br>
OSGeo.GDAL.Driver drv = ds.GetDriver();<br>
<br>
if (drv == null) <br>
{<br>
Console.WriteLine("Can't get driver.");<br>
System.Environment.Exit(-1);<br>
}<br>
<br>
Console.WriteLine("Using driver " + drv.LongName);<br>
}<br>
}<br>
}<br>
This throws me an exception in reading the file format. It says that it is not a recognized as a supported file format .<br>
<div>Do you have any idea. <br>
<br>
<div style="font-family:Tahoma;font-size:13px">With Regards,<br>
Neelima Emmani<br>
<br>
</div>
</div>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> Tamas Szekeres [<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>]<br>
<b>Sent:</b> Monday, September 10, 2012 1:20 PM<br>
<b>To:</b> Neelima Emmani<br>
<b>Subject:</b> Re: [gdal-dev] gdal_wrap dll<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>Hi,
<div><br>
</div>
<div>gdal_wrap.dll is not a managed assembly, you should not set reference to this dll. </div>
<div>gdal_csharp.dll loads gdal_wrap.dll internally (assuming it's location is added to the PATH environment setting)</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div><br>
<br>
<div class="gmail_quote">2012/9/10 Neelima Emmani <span dir="ltr"><<a href="mailto:neelima.emmani@iictechnologies.com" target="_blank">neelima.emmani@iictechnologies.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi All, <br>
I am trying to get gdal for c#. For that, I have taken gdal binaries from the below link
<br>
<a href="http://www.gisinternals.com/sdk/" target="_blank"><span> </span>http://www.gisinternals.com/sdk/.</a> 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.<br>
<br>
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
<br>
<font color="FF0000"><br>
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.</font>
<br>
Can anyone suggest me how to add this dll to my project. Do i need to do anything to get it work?<br>
Awaiting reply.<br>
<br>
<div><br>
<div style="font-family:Tahoma;font-size:13px">With Regards,<br>
Neelima Emmani<br>
<br>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
</blockquote></div><br></div></div>