Select to view content in your preferred language

Count Points within polygon (Enterprise)

123
5
Jump to solution
Friday
GeoFUNKE
Emerging Contributor

Hi,

 

I'm lookign for a solution to see the number of points within a polygon in an experience that is run on ArcGIS Enterrpise (11.5)

The polygons are created by my users, so I cannot pre-process them.
The users need to see the number of points as quickly and easy as possible when/after creating a polygon.

 

options I looked into already:

a: trigger action select features and show number of selected features: I fail putting in a spatial relationship.

b: arcade code for an expression field: Works in ArcGIS Online, but in Enterprise this is not possible.

c: geoprocessing tool that writed teh count into an attribute field: technically possible but not easy enough to trigger within the process of creating the polygons.

 

The problem sounds so easy compared to other things the Experiencebuilder can do. Do I miss the simple solution?

Is there any best practice out there for my goal?


Every hint is welcome, I'm greatfull also for suggestions that are not profen to work yet.

Best
David

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Frequent Contributor

Without going into making a Custom Widget, the best idea I have is to set up an editable Feature Layer for your users to draw their polygons in with the Edit Widget. Then they could use a Near Me set up like the link below or the Select Widget to find the intersecting points.

https://community.esri.com/t5/experience-builder-tips-and-tricks/zone-lookup-in-experience-builder-a...

 

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
5 Replies
JeffreyThompson2
MVP Frequent Contributor

Without going into making a Custom Widget, the best idea I have is to set up an editable Feature Layer for your users to draw their polygons in with the Edit Widget. Then they could use a Near Me set up like the link below or the Select Widget to find the intersecting points.

https://community.esri.com/t5/experience-builder-tips-and-tricks/zone-lookup-in-experience-builder-a...

 

GIS Developer
City of Arlington, Texas
0 Kudos
GeoFUNKE
Emerging Contributor

Thats exactly the solution I needed (I might even be ablo to do some more things that will help my users, with that)

Thanks you so much!

0 Kudos
NicoleJohnson
Frequent Contributor

@GeoFUNKE, I think you can achieve this with the query widget. In the query widget configuration, if you scroll past the attribute filter options, you'll see the spatial filter options. Choose "geometries from a map," then "drawn graphic."

Here's an example where I have a query widget configured this way (with "polygon" being the only option I want to give the user). 

NicoleJohnson_0-1765551738266.png

NicoleJohnson_1-1765551766924.png

From the user side, they draw the polygon on the map, click "apply," and then the query results pane comes up. This shows the number of features in the polygon. From there, you can view their pop-ups or whatever fields you designate. If you leave the data action option on, you can export the results.

 

JeffreyThompson2
MVP Frequent Contributor

I took the question to mean that the user needs to be able to save the drawn polygon. If that is not a requirement, @NicoleJohnson's Query Widget suggestion, or a similar workflow using Select, is better than mine.

GIS Developer
City of Arlington, Texas
GeoFUNKE
Emerging Contributor

yes, my users do anyway create the polygons in a editable layer.
I Offered them the option of counting by selecting the features but that turned out as only the second best option since they would have to draw the polygons twice.

Nevertheless @NicoleJohnson thanks so much, too. This solution will help others who do not have the need to store the polygons.

0 Kudos