Select to view content in your preferred language

Query Point Feature class with multiple user drawn polygons

852
2
Jump to solution
02-20-2014 04:54 AM
JamesBerg
Occasional Contributor
I am currently querying a point feature class using a com.esri.ags.tasks.supportClasses.Query with a QueryTask finding the points that intersect with a geometry drawn by the user using the Draw Tools.  What I need to do is allow the user to draw more than one shape and return all the points that intersect the shapes.  I don't know if this is doable in a single call or if I will have to make separate calls for each geometry and merge the resulting data sets together.  Any Ideas?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
James,

   You can do this in one call but it would require you to merge the users geometries into one geometry, as the QueryTask is one expecting one Geometry. I do this in my eSearch widget for the Flex Viewer. Basically if the user draws a multiple polygons then you take the polygon rings and add them to a new polygon and check if the polygon rings are self intersecting and if they do intersect than you nee to simplify the new polygon before using it in the QueryTask.

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
James,

   You can do this in one call but it would require you to merge the users geometries into one geometry, as the QueryTask is one expecting one Geometry. I do this in my eSearch widget for the Flex Viewer. Basically if the user draws a multiple polygons then you take the polygon rings and add them to a new polygon and check if the polygon rings are self intersecting and if they do intersect than you nee to simplify the new polygon before using it in the QueryTask.
0 Kudos
JamesBerg
Occasional Contributor
Robert,

Thank you so much.  I looked at your eSearch and was able to see exactly what I needed to make this work for my widget.
0 Kudos