Select to view content in your preferred language

How to draw histogram for a non-integer raster layer

738
2
08-04-2011 02:05 PM
JidaWang
Deactivated User
Can anyone help me out with drawing a histogram of a raster layer using VBA? The raster pixel type is continuous floating values (not integers).

Here is a portion of codes I find relevent:

    .......
    'get histogram
    pBand.ComputeStatsAndHist

    Dim pRasterHistogram As IRasterHistogram
    Set pRasterHistogram = pBand.Histogram
    ....

How can I possibly proceed to plot the histogram and save it to an image file, such as using dagaGraphT.ExportToFile?
Thank you very much.
0 Kudos
2 Replies
JidaWang
Deactivated User
Since the raster layer is floating, there is impossible to built an attribute table. Please let me know if you have any ideas. Thanks
0 Kudos
JidaWang
Deactivated User
problem solved. I created an ITable showing each individual pixel values in the column, and then used the seriesProperties.sourcedata = table and dagaGraphT.
thanks
0 Kudos