<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16490"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>Hello,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>another problem ....</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>I try to read data of a band of a grib File. I think ,
in C# dev, I must use ReadRaster function:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>My code : </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff face=Arial><SPAN
class=653523410-06012012><FONT color=#0000ff face=Consolas><FONT color=#0000ff
face=Consolas><FONT color=#0000ff face=Consolas>
<P><FONT size=2>for</FONT></FONT></FONT></FONT><FONT size=2><FONT
face=Consolas><FONT color=#000000 face=Consolas> (</FONT></FONT><FONT
color=#0000ff face=Consolas><FONT color=#0000ff face=Consolas><FONT
color=#0000ff face=Consolas>int</FONT></FONT></FONT></FONT><FONT
face=Consolas><FONT face=Consolas><FONT color=#000000 size=2> j = 1; j <=
rows; j++)</FONT></P>
<P><FONT size=2>{</FONT></P>
<P></FONT></FONT><FONT size=2><FONT face=Consolas><FONT face=Consolas><FONT
face=Consolas>for</FONT></FONT></FONT><FONT face=Consolas><FONT face=Consolas>
(</FONT></FONT><FONT face=Consolas><FONT face=Consolas><FONT
face=Consolas>int</FONT></FONT></FONT><FONT face=Consolas> k = 1; k <= cols;
k++)</FONT></FONT></P>
<P><SPAN class=653523410-06012012><FONT size=2>{</FONT></SPAN><FONT
color=#008000><FONT color=#008000><FONT color=#008000></P></FONT></FONT></FONT>
<P><FONT size=2><FONT color=#0000ff><FONT color=#0000ff><FONT color=#0000ff
face=Consolas>byte</FONT></FONT></FONT><FONT face=Consolas>[] buffer
={1,1};</FONT></FONT></P>
<P><FONT size=2><FONT color=#2b91af><FONT color=#2b91af><FONT color=#2b91af
face=Consolas>CPLErr</FONT></FONT></FONT><FONT face=Consolas> err =
band.ReadRaster(0, 0, cols, rows, buffer, cols, rows, 1, 1);</FONT></FONT></P>
<P><FONT size=2><FONT face=Consolas><FONT color=#0000ff><FONT
color=#0000ff><FONT color=#0000ff>double</FONT></FONT></FONT> val = (<FONT
color=#0000ff><FONT color=#0000ff><FONT
color=#0000ff>double</FONT></FONT></FONT></FONT><FONT face=Consolas>)band.
ReadRaster(0, 0, cols, rows, buffer, cols, rows, 1, 1); </FONT></FONT></P>
<P><FONT size=2 face=Consolas>}</FONT></P>
<P><FONT size=2 face=Consolas>}</FONT></P></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>But, val stay at 0 and err is
none.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>Do you have an idea ? buffer is important
?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>Tank you again for any help</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>Best regards</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012>Pascal</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=653523410-06012012></SPAN></FONT> </DIV><BR>
<DIV dir=ltr lang=fr class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>De :</B> gdal-dev-bounces@lists.osgeo.org
[mailto:gdal-dev-bounces@lists.osgeo.org] <B>De la part de</B> Chaitanya kumar
CH<BR><B>Envoyé :</B> jeudi 5 janvier 2012 17:25<BR><B>À :</B>
Jaugeas, Pascal (External)<BR><B>Cc :</B>
gdal-dev@lists.osgeo.org<BR><B>Objet :</B> Re: [gdal-dev] Open Grib
File<BR></FONT><BR></DIV>
<DIV></DIV>Pascal,<BR><BR>Use the GDALMajorObject::GetMetaData()
method[1].<BR><BR>You might want to go through the GDAL API docs[2] a bit
throughly.<BR><BR>[1]: <A
href="http://www.gdal.org/classGDALMajorObject.html">http://www.gdal.org/classGDALMajorObject.html</A><BR>[2]:
<A
href="http://www.gdal.org/hierarchy.html">http://www.gdal.org/hierarchy.html</A><BR><BR>
<DIV class=gmail_quote>On Thu, Jan 5, 2012 at 7:40 PM, Jaugeas, Pascal
(External) <SPAN dir=ltr><<A
href="mailto:pascal.jaugeas.External@cassidian.com">pascal.jaugeas.External@cassidian.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><U></U>
<DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>I have another
problem.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>After open grib
file, I have a DataSet.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>This dataset give
the quantities of row, col and band.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>For each band, I
want to know the heading. In a band of a grib file, there are 3 rows for
heading, not counting by the dataset.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>Do you know
how I can do that ?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff face=Arial>Thanks and
regards,</FONT></SPAN></DIV>
<DIV class=im>
<DIV dir=ltr align=left><SPAN><FONT color=#0000ff
face=Arial></FONT></SPAN> </DIV><BR>
<DIV dir=ltr lang=fr align=left>
<HR>
<FONT face=Tahoma><B>De :</B> Chaitanya kumar CH [mailto:<A
href="mailto:chaitanya.ch@gmail.com" target=_blank>chaitanya.ch@gmail.com</A>]
<BR><B>Envoyé :</B> jeudi 5 janvier 2012 13:00<BR><B>À :</B>
Jaugeas, Pascal (External)<BR><B>Cc :</B> <A
href="mailto:gdal-dev@lists.osgeo.org"
target=_blank>gdal-dev@lists.osgeo.org</A><BR><B>Objet :</B> Re:
[gdal-dev] Open Grib File<BR></FONT><BR></DIV>
<DIV></DIV></DIV>
<DIV>
<DIV class=h5><SPAN><FONT face=Consolas>Pascal,<BR><BR>First check if your
file works with the gdalinfo utility. Set the environment variable CPL_DEBUG
to ON to get more detailed reports on events.<BR><BR>Check if you get the same
error with another grib file and another format
file.<BR><BR></FONT></SPAN><BR>
<DIV class=gmail_quote>On Thu, Jan 5, 2012 at 2:50 PM, Jaugeas, Pascal
(External) <SPAN dir=ltr><<A
href="mailto:pascal.jaugeas.External@cassidian.com"
target=_blank>pascal.jaugeas.External@cassidian.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote><U></U>
<DIV>
<DIV><SPAN><FONT face=Arial>Hello,</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Arial>I develop with Gdal for
.Net.</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial>And I try to read a grib File (ed 1) like
this : <FONT color=#2b91af face=Consolas><FONT color=#2b91af
face=Consolas><FONT color=#2b91af face=Consolas>
<P>Dataset</P></FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas>ds = </FONT></FONT><FONT color=#2b91af face=Consolas><FONT
color=#2b91af face=Consolas><FONT color=#2b91af
face=Consolas>Gdal</FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas>.Open(dataSourcePath, </FONT></FONT><FONT color=#2b91af
face=Consolas><FONT color=#2b91af face=Consolas><FONT color=#2b91af
face=Consolas>Access</FONT></FONT></FONT><FONT face=Consolas><FONT
face=Consolas>.GA_Update);</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial>with <FONT face=Consolas>dataSourcePath is the
path of grib file (.grb).</FONT></FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Consolas></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Consolas>But I have an error in debug : "... not
recognised as a supported file format."</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Consolas></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Consolas>Is this method correct to have a dataset of a
grib file ?</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Consolas></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Consolas>Thank you for your help,</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Consolas></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Consolas>Best Regards,</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Consolas></FONT></SPAN> </DIV>
<DIV><SPAN><FONT face=Consolas>Pascal Jaugeas</FONT></SPAN></DIV>
<DIV><SPAN><FONT face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN><FONT
face=Arial></FONT></SPAN> </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><BR
clear=all><BR>-- <BR>Best regards,<BR>Chaitanya kumar CH.<BR><BR><A
href="tel:%2B91-9494447584" target=_blank
value="+919494447584">+91-9494447584</A><BR>17.2416N
80.1426E<BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR clear=all><BR>--
<BR>Best regards,<BR>Chaitanya kumar CH.<BR><BR>+91-9494447584<BR>17.2416N
80.1426E<BR></BODY></HTML>