Looking for some performance tricks here. I'm creating a series of script tools in pro that, among other things, use zonal stats as table to get mean slope and aspect for a series of parcels.
I like the Terrain: Slope and Terrain: Aspect datasets from the Living Atlas. However, analysis performance against them seems slow (perhaps due to the number of rasters in their mosaics and use of raster functions).
Some examples -
The Zonal Stats gp tool on the slope imagery layer on a single 124 acre parcel with the processing extent environment set to that parcel's extent - 46 seconds (so this won't scale past a few parcels).
The Copy Raster gp tool with the processing extent environment set to an area of approximately 700 acres takes about 2 minutes 11 seconds. Better but the average search area will be much larger (50k to 100k acres).
The Zonal Stats raster function was instantaneous against the processing extents listed above. However it also seems quite slow when run against a larger extent (to its credit, it did warn me that it runs against the source data resolution).
The Enrich Layer tool in AGOL has a slope variable (30m) in the landscape facts category. But that operation doesn't appear in the ArcGIS pro tool. Also, I couldn't find an aspect variable.
In contrast, zonal stats run against a worst case scenario, 1163 parcels comprising 120k acres , using the world slope GMTED imagery layer (250m resolution), completes in 4 seconds. Woot! I wanna go fast!
Any ideas? Use different data?
Solved! Go to Solution.
Here's how I solved it -
Steps 4-5 take ~17 seconds against a new worst case scenario (500k acres).
And how do the results compare, if you can do a comparison for the same area using different data sources?
Is it for analysis? Or is it just to produce a table with the caveat that the results are to demonstrate principles and are only applicable to the limitations of the data uses?
No point in going fast, if fast is useless.
Hi Dan,
Yes, it's for analysis. I joinfield between the parcel dataset and the zonal stats table to get a mean slope and aspect value from which some other analyses are derived. The World Slope GMTED imagery layer is probably too low resolution for what's desired. The performance of zonal stats against the Terrain Slope and Aspect layers is unacceptable at the extents required. It's ok for a few hundred acres but won't scale beyond that. The mosaics hosting those data contain ~168k rasters so their performance constraints are not surprising.
Thanks!
That is a lot of rasters. I suspect leaving AGOL out of the equation might also speed things up immensely as well.
Here's how I solved it -
Steps 4-5 take ~17 seconds against a new worst case scenario (500k acres).