Select to view content in your preferred language

Number of Points within a Polygon with Arcade

452
0
04-08-2020 04:51 PM
NickArcher1
New Contributor

Hi,

I am trying to find the number of points that are inside a polygon and then find the amount within the polygon with a 5 mile buffer. I was able to find the number within the polygon using the following:

var fsCase = Intersects(FeatureSetByName($datastore, "SanDiegoCasesGeocoded"), $feature);
var cnt = Count(fsCase);
return cnt

However when I try to repeat this with a 5 mile buffer I am getting incorrect results. The following script returns a count of 24 points. However if I manually create a buffer around the polygon in ArcPro and select the intersecting points it returns 72.

var fsCase = Intersects(FeatureSetByName($datastore,"SanDiegoCasesGeocoded"), Buffer($feature, 5, "miles"))
var cnt = Count(fsCase);
return cnt;

Any idea what may be the problem?

0 Kudos
0 Replies