I have a UC to search equipment within given radius/uom. I use following logic for point features:
1) I select one equipment (e.g. EQP1) and find geometry of it. I perform buffer search around this equipment (EQP1) to locate other equipment on the same layer.
2) I find geometry of EQP1 and create Circle of given radius/uom.
3) I pass Circle geometry to QueryTask along with other parameters (e.g. url of the layer, where, outfields, spatialrelationship)
4) This gives me the result of equipment falling under radius/uom of the geometry of EQP1.
Now, here EQP1 is a point feature. But how to perform search if EQP1 is polygon/polyline feature? Point feature will have single geometry point so, I can create one circle and get the correct result. With polyline/polygon - points are more than one. In that case, do I need to create circles for each point?
Solved! Go to Solution.
Bhavin,
Use the GeometeryService buffer operation to buffer the line or polygon.
Bhavin,
Use the GeometeryService buffer operation to buffer the line or polygon.
Thanks Robert, this is what I was looking for. Before buffering polyline/polygon, how can I validate the geometry? Sometimes, there is an issue with data and I get x and y values as NaN.
Bhavin,
This is not really something you should be doing client side you should check for geometry errors in ArcMap.
Robert,
What is the difference between buffering shape using Geometry service and Geoprocessing service? In ArcMap - Toolbox, there is one proximity tool Buffer. We can publish it as a geoprocessing service and call that service from ArcGIS JS API.
My judgement is geometry service-buffer() is handy rather than depolying geoprocessing buffer tool unless there is a clear advantage.
My requirement is to buffer point/polygon/polyline features and find equipment within the geometry. e.g. I want to find out all bulidings which are in the range of particular distance from particular object (or geomtry of the object).
Bhavin,
I would agree.
My judgement is geometry service-buffer() is handy rather than deploying geoprocessing buffer tool unless there is a clear advantage.
With your needs there is no need to go though extra steps of publishing a geoprocessing service when ArcGIS Server exposes the Geometry service that can accomplish this.
Once you buffer your geometry (point, line or polygon) the returned polygon geometry can be used as the geometry for a QueryTask to find your buildings.