This is a fairly "simple" GIS operation but I wanted to ask, is Spatial Join the only, or best, method to calculate this? As described in this article:
What I am basically wondering is how to have a continually updated polygon feature that would keep a count of points within it. Does that make sense?
Solved! Go to Solution.
It is attached. You'll need to edit these variables to make it work and the polygon feature class needs an integer field to store the results.
Points = "D:\\Data\\Geodatabase.gdb\\PointFC"
Zones = "D:\\Data\\Geodatabase.gdb\\PolygonFC"
zoneNameField = "NAME"
zoneIncidentsField = "INCIDENTS"
Once your paths and field names are stored you can double-click from windows explorer to run anytime you want.
...and I know there are issues when points fall outside of the polygon. I found this article that discusses using the Proximity tool to calculate that:
Have you tried using the PointCollection object? I'm not sure what platform you're on, but on the ArcGIS Runtime for .NET there is a PointCollection class in this namespace "Esri.ArcGISRuntime.Geometry".
You could use this to build a collection of points, and then transpose them to a polygon as needed. Keeping track of the MapPoint count should be straightforward at this point.
As I mentioned, i'm not sure what platform you're working on, but an implementation (in .NET) that comes to mind would be a wrapper class that held a PointCollection as well a Polygon Feature. As the PointCollection was updated, the Polygon would be re-drawn on a graphics layer.
I'm running ArcGIS 10.3.1 Desktop (ArcMap) on Windows 10, 64-bit. I am not sure that I would want a graphics layer as opposed to a feature class within a geodatabase. And, I am not as familiar with .NET as I once was year ago...
You'd need to re-run the operation for each changed geometry, when it is changed. This sort of thing is better left to a database trigger, but then you'd need to be using an enterprise geodatabase.
I was afraid that I would need to re-run it each time. Would a database trigger be something you would script up in Python or so? And do you have to use an enterprise geodatabase for it?