- I have a fairly large points layer in a hosted feature service - Lets call this incidents
- This layer is frequently changing every couple of minutes with new records, deletes and updated locations.
- I have a polygon layer as a hosted feature service - lets call this districts
- A static layer that never changes shape.
- This is all in ArcGIS Online. No ArcGIS Enterprise in the mix.
As a user, I want to have a count of how many points there are in each polygon, along with perhaps some summary stats on the numerical fields from the incidents layer.
With a DBMS + ArcGIS Enterprise, I could create a nice Query layer and leverage ST_Intersects to have the polygons dynamically count how many features there are within them. But, I don't have access to these for this project.
I was looking at Arcade, but does not look like this is possible to reference a separate layer.
There is the Spatial Join analysis tool, but the frequency this would need to be run (every couple of minutes) going to burn through my credits allowance fairly quick.
Anyone want to brainstorm this a little and offer a better suggestion I might not have thought of?
A Python funtion running every couple of minutes on AWS Lambda every with some non-arcpy libraries that perform the counts/summary stats?