[Gdal-dev] Computing histograms for output files

Frank Warmerdam warmerdam at pobox.com
Fri Oct 24 11:08:56 EDT 2003


Michael Lefsky wrote:
> I have been using GDAL to create erdas Imagine .img files (i.e. HFA 
> format). The HFA format includes a histogram of each band as part of its 
> data structure. When I open these files in Imagine, I can compute a 
> histogram, and work with the files that way. However, I would like to 
> open these files directly in ArcGis, and when I open these files in 
> Arcgis (without previously calculating the histograms in Imagine) ArcGis 
> crashes.
> 
> Is there a way of adding these histograms within GDAL? As an added 
> complication, I am creating Float32 files (from python), not standard 
> Int8 files.

Michael,

There is no current support for adding the histograms. I looked at doing it
a few weeks ago, but after testing the existing .img output in Imagine I
came to the conclusion there was no pressing need (at least for that 8bit
output).  However, your points raise the importance again.

The change would require a bunch of extra code ... a non-trivial effort and
I don't anticipate doing it in the short term unless a paying customer wants
to drive it.  But I would encourage you to file a feature request for this
change in bugzilla.

Of course, if you are interested in trying to implement this, I would be
happy to give a few pointers.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent





More information about the Gdal-dev mailing list