I have a script that does some processing but the main part are two things
I thought to create a pivot table using arcpy.PivotTable_management where the result becomes one row and five columns (the pivot variable and four buffers) and then push that to Final Results. However, it appears I would still need to create a search cursor for my pivot table, grab the first (and only) row, then create an insert cursor to put the data into my Final Resultstable.
Alternatively, I suppose I could just go to the table from #2 above, create a search cursor, and assign four variables (D1, D2, D3, D4) to the zonal stats results with some sort of switch-case statement, then create an insert cursor that concatenates D1, D2, D3, D4 and uses insert row.
Both seem rather inefficient.
Is there a smarter way to just push my results from zonal analysis into a table that I use?
أكثر...
- run a multiple ring buffer using arcpy.MultipleRingBuffer_analysis and four rings
- do some zonal statistics using arcpy.sa.ZonalStatisticsAsTable on the four rings
I thought to create a pivot table using arcpy.PivotTable_management where the result becomes one row and five columns (the pivot variable and four buffers) and then push that to Final Results. However, it appears I would still need to create a search cursor for my pivot table, grab the first (and only) row, then create an insert cursor to put the data into my Final Resultstable.
Alternatively, I suppose I could just go to the table from #2 above, create a search cursor, and assign four variables (D1, D2, D3, D4) to the zonal stats results with some sort of switch-case statement, then create an insert cursor that concatenates D1, D2, D3, D4 and uses insert row.
Both seem rather inefficient.
Is there a smarter way to just push my results from zonal analysis into a table that I use?
أكثر...