Using ArcGIS Desktop 10.6, I have the following workflow in a python script to try and calculate coverage area affected on a wireless network if certain towers went down:
- User enters a list of polygon IDs (these are the tower outages)
- Using an in-memory layer, script selects all polygons from a layer in a file geodatabase, except the ones listed by the user
Important note: Polygon layer is 500GB in size and cannot be generalized.
Contains complex geometries and often intentional overlap between polygons
Polygons from #2 are merged (arcpy.Merge_management)
Loop through all the polygons that were removed and clip any overlapping areas from merged result in #3
Merge output from #4 and calculate its area.
I am fairly confident that I have optimized the script as much as possible, and due to the size of the data, it is taking a significantly large time to process a result.
The question I have is what is a good alternative approach that will significantly reduce the processing time for the user but still accomplish the same workflow?
Things I am currently contemplating:
- Pre-cooking every combination of result using a union on the original layer. This may be a beast to process, but would only need to happen every ~6mths.
- Storing in SQL Geometry and using native SQL spatial functions to return results. Not tested, but I assume some of the more complex geoms might cause some issues.
- Raster based approach? Not put a lot of thought into this one.