Select to view content in your preferred language

Use Arcade to create FeatureSet where Percent Overlap Greater Than 25%

343
0
01-28-2024 02:24 PM
Labels (1)
BRENNEJM
New Contributor III

I have three FeatureSets: a grid (red lines below), planned treatments (based on the grid, green areas below), and completed treatments (not based on the grid, black lines below). I need to determine total acreage for three categories: Planned but not completed (6 of the grid cells below), Planned and completed (6 of the grid cells below), and Completed but not planned (3 of the grid cells below).

This would be really easy using Intersects() to create a new FeatureSet() for all grid cells that intersect with completed treatments, but I only want to count a cell as completed if it overlaps with a completed treatment by 25%.

I know I can use Intersects() to get all grid cells with completed treatments and then use Intersections() to check the overlap percentage, but is there a faster more optimized way of doing this? This method works okay for the example pictured below (not many grid cells), but my actual dataset has 116,000 grid cells and many planned/completed treatments. The above method times out at around 36 minutes in. I've streamlined the process by performing a Union() on all of the planned treatments and another Union() for all of the completed treatments, but it still takes too long for staff to use.

Does anyone know of a faster way to go about this?

My current thought is to use the ArcGIS API for Python and host it on PythonAnywhere. I'm still learning Arcade and would love to know if there's an optimized solution that would keep this live in a Dashboard.

grid_question.JPG

Tags (1)
0 Kudos
0 Replies