Select to view content in your preferred language

XML file format for Statistics and Histogram raster function

215
1
11-19-2025 04:11 AM
Labels (2)
DiegoCelio
New Contributor

I am trying to construct an XML file to give as input to the "Statistics and Histogram" raster function. I found that the correct formatting for the statistics was : 

<?xml version="1.0" encoding="utf-8"?>
<RasterStatistics>
  <Band>
    <min>...</min>
    <max>...</max>
    <mean>...</mean>
    <stddev>...</stddev>
  </Band>
 

However, I am unable to find the formatting for the histogram?

Tags (2)
0 Kudos
1 Reply
Andrew_Leason
New Contributor

By exporting to an xml from the Symbology pane in the Statistics tab I can get a file that has the histogram like this:

  <Band>
    <min>...</min>
    <max>...</max>
    <mean>...</mean>
    <stddev>...</stddev>
    <Histogram>
        <npixels>13329479</npixels>
        <min>1</min>
        <max>255</max>
        <v>0</v>
        <v>25721</v>
        <v>21051</v>
...
        <v>25474</v>
  
</Band>
0 Kudos