OK thank you very much and the last question : to have metadata, I use the function band.GetMetadata( pszDomain). But if i write "" in parameter of the function, the default metadatas is not complete. Do you have document that list pszDomain ? Thank you for your help Pascal
________________________________ De : Chaitanya kumar CH [mailto:[email protected]] Envoyé : vendredi 6 janvier 2012 14:53 À : Jaugeas, Pascal (External) Cc : [email protected] Objet : Re: [gdal-dev] Open Grib File Pascal, The data is written into the buffer array. The function returns the CE_None or CE_None. On Fri, Jan 6, 2012 at 7:11 PM, Jaugeas, Pascal (External) <[email protected]> wrote: Hello, another problem .... I try to read data of a band of a grib File. I think , in C# dev, I must use ReadRaster function: My code : for (int j = 1; j <= rows; j++) { for (int k = 1; k <= cols; k++) { byte[] buffer ={1,1}; CPLErr err = band.ReadRaster(0, 0, cols, rows, buffer, cols, rows, 1, 1); double val = (double)band. ReadRaster(0, 0, cols, rows, buffer, cols, rows, 1, 1); } } But, val stay at 0 and err is none. Do you have an idea ? buffer is important ? Tank you again for any help Best regards Pascal ________________________________ De : [email protected] [mailto:[email protected]] De la part de Chaitanya kumar CH Envoyé : jeudi 5 janvier 2012 17:25 À : Jaugeas, Pascal (External) Cc : [email protected] Objet : Re: [gdal-dev] Open Grib File Pascal, Use the GDALMajorObject::GetMetaData() method[1]. You might want to go through the GDAL API docs[2] a bit throughly. [1]: http://www.gdal.org/classGDALMajorObject.html [2]: http://www.gdal.org/hierarchy.html On Thu, Jan 5, 2012 at 7:40 PM, Jaugeas, Pascal (External) <[email protected]> wrote: I have another problem. After open grib file, I have a DataSet. This dataset give the quantities of row, col and band. 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. Do you know how I can do that ? Thanks and regards, ________________________________ De : Chaitanya kumar CH [mailto:[email protected]] Envoyé : jeudi 5 janvier 2012 13:00 À : Jaugeas, Pascal (External) Cc : [email protected] Objet : Re: [gdal-dev] Open Grib File Pascal, 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. Check if you get the same error with another grib file and another format file. On Thu, Jan 5, 2012 at 2:50 PM, Jaugeas, Pascal (External) <[email protected]> wrote: Hello, I develop with Gdal for .Net. And I try to read a grib File (ed 1) like this : Dataset ds = Gdal.Open(dataSourcePath, Access.GA_Update); with dataSourcePath is the path of grib file (.grb). But I have an error in debug : "... not recognised as a supported file format." Is this method correct to have a dataset of a grib file ? Thank you for your help, Best Regards, Pascal Jaugeas _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. +91-9494447584 <tel:%2B91-9494447584> 17.2416N 80.1426E -- Best regards, Chaitanya kumar CH. +91-9494447584 <tel:%2B91-9494447584> 17.2416N 80.1426E _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Best regards, Chaitanya kumar CH. +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
