Le mardi 18 octobre 2016 15:00:01, mvscheers a écrit : > Hi, > > Trying to get data from attached grib file. > > (BAND 1) > > float[] bfr = new float[dataBand.XSize * dataBand.YSize]; > unsafe > { > fixed (float* dataPtr = bfr) > { > dataBand.ReadRaster(0, 0, dataBand.XSize, > dataBand.YSize, (IntPtr) dataPtr, dataBand.XSize,dataBand.YSize, > DataType.GDT_Float64, 0, 0); > } > } >
Probably a mismatch between C# float (32bit) and GDT_Float64. Either use float + GDT_Float32 or double + GDT_Float64 > All values returned are either the NO_DATA value (9999) or 0. > ANything im doing wrong here ? > > L-000-MSG3__-MPEF________-MPEG_____-000000___-201610121330-__.grib > <http://osgeo-org.1560.x6.nabble.com/file/n5291259/L-000-MSG3__-MPEF_______ > _-MPEG_____-000000___-201610121330-__.grib> > > > > -- > View this message in context: > http://osgeo-org.1560.x6.nabble.com/gdal-dev-ReadRaster-C-Incorrect-values > -tp5291259.html Sent from the GDAL - Dev mailing list archive at > Nabble.com. > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev