Hi,

I want to get the statistics (min, max, mean, and stdv) of a raster in
GeoServer.

I have looked at WPS and REST but no luck. The WPS does not seem to have
this process implemented. The REST API should be able to give me this
answer at the following endpoint:

http://localhost:8080/geoserver/rest/workspaces/
<workspaceName>/coveragestores/<storeName>/coverages/<coverageName>.xml

When looking at the xml at the above URL it seems that the max and min
values are not calculated but shows some kind of default values (see range
tag below):

<dimensions>
   <coverageDimension>
      <name>GRAY_INDEX</name>
      <description>GridSampleDimension[-32768.0,-32768.0]</description>
       <range>
          <min>-32768.0</min>
           <max>-32768.0</max>
        </range>
         <nullValues>
             <double>-32768.0</double>
          </nullValues>
          <dimensionType>
               <name>SIGNED_16BITS</name>
           </dimensionType>
    </coverageDimension>
</dimensions>

I've also noticed that if I manually put in the min and max value for the
geotiff when publishing it in GeoServer, those values show up at the REST
endpoint above.

Shouldn't GeoServer calculate this automatically when uploading the raster?

Have I missed something, is there any other way of getting raster
statistics in GeoServer?

Regards,

Anton
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to