Select to view content in your preferred language

Buffer search with polyline/polygon features

5616
5
Jump to solution
02-08-2015 09:55 AM
BhavinSanghani
Frequent Contributor

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?

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Bhavin,

   Use the GeometeryService buffer operation to buffer the line or polygon.

GeometryService | API Reference | ArcGIS API for JavaScript

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Bhavin,

   Use the GeometeryService buffer operation to buffer the line or polygon.

GeometryService | API Reference | ArcGIS API for JavaScript

BhavinSanghani
Frequent Contributor

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Bhavin,

    This is not really something you should be doing client side you should check for geometry errors in ArcMap.

BhavinSanghani
Frequent Contributor

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).

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.