Pascal,<br><br>The data is written into the buffer array. The function returns the CE_None or CE_None.<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 7:11 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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Hello,</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>another problem ....</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>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" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>My code : </span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span><font color="#0000ff" face="Consolas"><font color="#0000ff" face="Consolas"><font color="#0000ff" face="Consolas">
<p><font>for</font></p></font></font></font><font><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"> j = 1; j <=
rows; j++)</font>
<p><font>{</font></p>
<p></p></font></font><font><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><span><font>{</font></span><font color="#008000"><font color="#008000"><font color="#008000"></font></font></font></p></span></font>
<p><font><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><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><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 face="Consolas">}</font></p>
<p><font face="Consolas">}</font></p></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>But, val stay at 0 and err is
none.</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Do you have an idea ? buffer is important
?</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Tank you again for any help</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Best regards</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span>Pascal</span></font></div>
<div dir="ltr" align="left"><font color="#0000ff" face="Arial"><span></span></font> </div><br>
<div dir="ltr" lang="fr" align="left">
<hr>
<font face="Tahoma"><b>De :</b> <a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>] <b>De la part de</b> Chaitanya kumar
CH<br><b>Envoyé :</b> jeudi 5 janvier 2012 17:25<div><div class="h5"><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></div></div></font><br></div><div><div class="h5">
<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" target="_blank">http://www.gdal.org/classGDALMajorObject.html</a><br>[2]:
<a href="http://www.gdal.org/hierarchy.html" target="_blank">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" 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 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>
<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><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" value="+919494447584" target="_blank">+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><a href="tel:%2B91-9494447584" value="+919494447584" target="_blank">+91-9494447584</a><br>17.2416N
80.1426E<br></div></div></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">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>+91-9494447584<br>17.2416N 80.1426E<br>