Living Atlas Terrain Slope and Aspect layer performance

1413
4
Jump to solution
04-18-2021 05:00 PM
RobStauder
Occasional Contributor

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?

 

0 Kudos
1 Solution

Accepted Solutions
RobStauder
Occasional Contributor

Here's how I solved it -

  1. Data prep: Run the Slope and the Aspect raster functions on this imagery layer - https://elevation.arcgis.com/arcgis/services/NED30m/ImageServer. It has ~4k rasters in its mosaic. 30 m resolution (~.2 acres) is good enough for this tool.
  2. Data prep: Save the output of the raster functions as layers, and save each to a layer file.
  3. Script tool code: Access the layer files and pull each layer from the layer files.
  4. Script tool code: Set extent in the gp/py analysis environment (with arcpy.EnvManager...) + run a tool that creates an output (I used project).
  5. Use the output from Step 4 in zonal stats.

Steps 4-5 take ~17 seconds against a new worst case scenario (500k acres).

View solution in original post

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

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. 


... sort of retired...
0 Kudos
RobStauder
Occasional Contributor

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!

0 Kudos
DanPatterson
MVP Esteemed Contributor

That is a lot of rasters. I suspect leaving AGOL out of the equation might also speed things up immensely as well.


... sort of retired...
0 Kudos
RobStauder
Occasional Contributor

Here's how I solved it -

  1. Data prep: Run the Slope and the Aspect raster functions on this imagery layer - https://elevation.arcgis.com/arcgis/services/NED30m/ImageServer. It has ~4k rasters in its mosaic. 30 m resolution (~.2 acres) is good enough for this tool.
  2. Data prep: Save the output of the raster functions as layers, and save each to a layer file.
  3. Script tool code: Access the layer files and pull each layer from the layer files.
  4. Script tool code: Set extent in the gp/py analysis environment (with arcpy.EnvManager...) + run a tool that creates an output (I used project).
  5. Use the output from Step 4 in zonal stats.

Steps 4-5 take ~17 seconds against a new worst case scenario (500k acres).

0 Kudos