This is a question to both ArcGIS desktop or ArcGIS Pro.
I try to run a Reclassify to 10 classes defined by Quantile and assign output values 1,2,3...10. This process will run for hundreds of raster file. So I have to automate this process with either Python or Model Builder.
First, I tried raster iteration in Model Builder. The problem is that Reclassify only records the thresholds defined by Quantile from the first file. It doesn't update those thresholds by re-calculate Quantile for each file. Essentially, the model runs for a fix thresholds calculated from the first raster. I export this model to Python and it looks like below and you can see the threshold is hard-coded in this tool.
arcpy.gp.Reclassify_sa(myraster, "VALUE", "0.001000 0.013032 1;0.013032 0.047890 2;0.047890 0.100943 3;0.100943 0.169297 4;0.169297 0.247985 5;0.247985 0.330505 6;0.330505 0.418255 7;0.418255 0.844142 8;0.844142 2.620020 9;2.620020 1000.000122 10", Reclass_myraster, "DATA")
Then, I tried Python using statistical percentile calculation. Then, I found it is different from Reclassify tool. The following table compares the counts for each class in the two outputs from the two different approach.
My raster data is highly skewed to low values. I actually like the output from the Reclassify tool, although theoretically the output is not classified by 10 classes in Quantile (as is Python output). I hope to find out how this can be coded in Python, so I can run for hundreds raster files. so two questions:
1. Is there a reference explaining how the Reclassify tool using Quantile works for highly skewed data?
2. Is there a way I can run Reclassify tool with new threshold from Quantile calculated for each raster?
|Value||Count (from reclassify tool)|
Count (from percentile in Python)