How do you select the value that is used in the "Zonal Statistics as table" tool. My single band raster has a number of attributes that I would like to use
I believe you're going to have to use an incarnation of Lookup before running Zonal Statistics as Table. Lookup creates a new raster based on values other than the "VALUE".
Here's an example in Raster Calculator using Zonal Statistics.
Regular syntax that would use the "VALUE":
ZonalStatistics<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"zones"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"OBJECT_ID"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"my_int_raster"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"MEAN"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Lookup syntax that would use values in "Field2":
ZonalStatistics<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"zones"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"OBJECT_ID"</SPAN><SPAN class="punctuation token">,</SPAN>Lookup<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"my_int_raster"</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"Field2"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="string token">"MEAN"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Unfortunately, I don't believe you can run ZonalStatisticsAsTable from within the Raster Calculator because it outputs a table, but you could cycle through your fields using Python, if you do need all the statistics types.
Zonal Statistics as Table and How it works would be your first stop.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.