Select to view content in your preferred language

Minimum and Maximum value in Raster

506
1
Jump to solution
07-16-2012 10:33 AM
Labels (1)
BKuiper
Frequent Contributor
Hi,

I know that are always different ways of doing things. I'm currently trying to get the maximum and minimum value of a raster and i'm using GetRasterProperties_management.

Sadly this function is not supported for packaging into Runtime (GPK).

        minimum = arcpy.GetRasterProperties_management(resultrasterfilename, "MINIMUM")
        maximum = arcpy.GetRasterProperties_management(resultrasterfilename, "MAXIMUM")

Does anybody know a way to use another method that achieves the same and can be packaged ?

Thanks!
0 Kudos
1 Solution

Accepted Solutions
BKuiper
Frequent Contributor
Found it

tempraster = Raster(rasterfile)
minimum = tempraster.minimum
maximum = tempraster.maximum

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000wt000000

View solution in original post

0 Kudos
1 Reply
BKuiper
Frequent Contributor
Found it

tempraster = Raster(rasterfile)
minimum = tempraster.minimum
maximum = tempraster.maximum

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v000000wt000000
0 Kudos