[gdal-dev] Gdal Java - GetDefaultHistogram causing core dump
even.rouault at spatialys.com
Sun Feb 12 11:45:24 PST 2017
On vendredi 10 février 2017 07:32:34 CET Vlad wrote:
> Trying to get the histogram from a sample NITF. Running from the command
> line, gdalinfo -hist, I get this...
> Band 1 Block=512x512 Type=Byte, ColorInterp=Undefined
> 0ERROR 1: COMRAT=4.50 ARIDPCM is not supported.
> Currently only 0.75 is supported.
> ERROR 1: U_0001A.NTF, band 1: IReadBlock failed at X offset 0, Y offset 0
> In Java code (Gdal 2.1 from Maven against a Windows Gdal installation), this
> int status = band.GetDefaultHistogram(dfMin, dfMax, panHistogram, true);
> causes a dump...
Fixed per https://trac.osgeo.org/gdal/ticket/6811
You could workaround the issue by issuing first GetStatistics() and if an error is returned then
don't call GetDefaultHistogram().
Regarding the 'COMRAT=4.50 ARIDPCM is not supported.' error, this is an implementation
limitation. I'm curious to know if you need this for real datasets, or if you just tried on the
NITF test files ?
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev