Post

2 followers Follow
0
Avatar

Get Raster Min Value in EASI Script

HI,

I am trying to get the minimum pixel value for a 32bit dem using EASI.

In Focus I can open the histogram with statistics and it shows the proper min. pixel value as suggested here: http://support.pcigeomatics.com/hc/communities/public/questions/205299466-Export-Image-Statistics

However, when I run HIS, HISDUMP or even RCSTATS in an EASI window including when referencing it through the results in IMSTATS the min value in data has a value of -3.402823061e+038. This is the no data value. Is there any way to ignore the no data value and get the true minimum pixel value using EASI?

David Kristiansen

Please sign in to leave a comment.

1 comment

0
Avatar

Hi David,

There is a parameter in RCSTATS that allows you to set an exclusion value. You can set this parameter to your no data value. When you run RCSTATS with this parameter set, the outputted minimum value will be the true minimum.

In my example, I ran rcstats on an image with -9999 as the no data value:
EASI>file="I:\Data\Demo\dem_nodatavalues.pix"
EASI>dbic=1
EASI>exclude=-9999
EASI>r rcstats

If I check imstat[5], the lowest gray value, it is the true minimum instead of -9999. More information about the exclude parameter you can check the Geomatica help: http://www.pcigeomatics.com/geomatica-help/index.html?page=references%2Fpcifunction_r%2Feasi%2Fe_rcstats.html

Hope this helps!

PCI Geomatics 0 votes