[gdal-dev] Gdal Java - GetDefaultHistogram causing core dump
Even Rouault
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
> line...
>
> 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 ?
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170212/917b24c2/attachment.html>
More information about the gdal-dev
mailing list