<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Following your third link, I had already found the section that
reads:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<h4>GDAL and MapServer build SDK packages (provides to compile
MapServer and GDAL by yourself):</h4>
I assumed that this meant that I had to compile the DLL myself.
Hence my previous mail.<br>
<br>
Considering your last mail however I tried to look up a pre-built
DLL inside the SDK, and I found this one:<br>
c:\GDALVS\release-1600\bin\gdal\csharp\gdal_csharp.dll<br>
<br>
Is this the correct one?<br>
<br>
I can add it to VS2008, however VS warns me that "the system cannot
find the reference specified".<br>
<br>
<br>
<br>
<br>
<br>
On 14-06-12 20:51, Etienne Tourigny wrote:
<blockquote
cite="mid:CA+TxYvPytcQ+5riuVRr_xjVJ_JOBgp0DRbJORcD3sWscMmiV7Q@mail.gmail.com"
type="cite">
<pre wrap="">If you read the GDAL download page [1] you will find this:
"The latest FWtools version for Windows, 2.4.7, dates back to a
pre-1.6 GDAL version. In order to benefit from the latest and
greatest, you can refer to the other binary builds mentionned above."
If you want to support netcdf files, you should probably be using a
more recent gdal, at least 1.9
That means you should probably not use FWTools, and use the SDK from
Tamas Szekeres [3] - which according to [2] supports vb.net (C#)
[1] <a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries">http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries</a>
[2] <a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp">http://trac.osgeo.org/gdal/wiki/GdalOgrInCsharp</a>
[3] <a class="moz-txt-link-freetext" href="http://vbkto.dyndns.org/sdk/">http://vbkto.dyndns.org/sdk/</a>
cheers
Etienne
On Thu, Jun 14, 2012 at 2:08 PM, Siebe Bosch <a class="moz-txt-link-rfc2396E" href="mailto:siebe@hydroconsult.nl"><siebe@hydroconsult.nl></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello all,
I'm trying to build a command line application in VB.NET that extracts parts
from a NetCDF file.
For this I'm using the C# API as supplied with FWTools version 2.4.7. It's
supposed to support VB.NET as well; am I right?
However, the application already crashes at the line Call GDAL.Registerall()
Here's the code:
Imports System
Imports OSGeo.GDAL
Imports OSGeo.OGR
Module MeteoBase
'Copyright Siebe Bosch Hydroconsult, 2012
'Lulofsstraat 55, unit 47 Den Haag, The Netherlands
'this program creates subsets from precipitation data in NetCDF-files
'as requested by the user. The program is designed to be called from
'a PHP-script.
Dim FileName As String
Dim ds As Dataset
Sub Main()
Dim DebugMode As Boolean
Console.WriteLine("This program extracts data from a NetCDF file")
Console.WriteLine("Path to the NetCDF file (*.cn)")
DebugMode = True
'start reading the command line arguments
If DebugMode Then
FileName = "c:\GDAL\PM\1990\EVAP_PM_19901231.nc"
Else
If My.Application.CommandLineArgs.Count = 0 Then
Console.WriteLine("Enter the path to the NetCDF-file:")
FileName = Console.ReadLine()
ElseIf My.Application.CommandLineArgs.Count <> 1 Then
Console.WriteLine("Error: incorrect number of arguments presented")
Else
FileName = My.Application.CommandLineArgs(0)
End If
End If
Try
'start reading the NetCDF File
Call Gdal.AllRegister()
ds = Gdal.Open(FileName, Access.GA_ReadOnly)
If ds Is Nothing Then
Console.WriteLine("Cannot open NetCDF file: " & FileName)
Throw New Exception
Else
Console.WriteLine("Raster dataset parameters:")
Console.WriteLine(" Projection: " + ds.GetProjectionRef())
Console.WriteLine(" RasterCount: " + ds.RasterCount)
Console.WriteLine(" RasterSize (" + ds.RasterXSize + "," +
ds.RasterYSize + ")")
End If
Catch ex As Exception
Console.WriteLine("Error in sub Main of Meteobase")
End Try
End Sub
End Module
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
------------------------------------------
Hydroconsult
Lulofsstraat 55, unit 47
2521 AL Den Haag
The Netherlands
web: <a class="moz-txt-link-freetext" href="http://www.hydroconsult.nl">http://www.hydroconsult.nl</a>
e-mail: <a class="moz-txt-link-abbreviated" href="mailto:siebe@hydroconsult.nl">siebe@hydroconsult.nl</a>
phone: +31(0)70 250 0580
mobile: +31(0)6 17 682 689
actief lid van WaterForce.nu, het netwerk van
zelfstandige professionals in het waterbeheer
------------------------------------------
</pre>
</body>
</html>