AnsweredAssumed Answered

Trying To Buffer Points But Separate Buffers That Overlap Another Point

Question asked by rcoodey on Aug 31, 2012
Latest reply on Sep 5, 2012 by rcoodey
I have a point feature layer that we want to buffer (easy enough) but then symbolize any buffer that overlaps another point a different color (need help here)...

Here is what I am doing now:
Step 1) Create a graphics layer.
Step 2) Setup a UniqueValueRenderer with different symbology for an attribute field I'm calling "IntersectIndicator".
Step 3) Assign the UniqueValueRenderer to the graphics layer.
Step 4) Call the GeometryService.BufferAsync() and I get back the buffers I want.
Step 5) Set the attribute ???IntersectIndicator" for each buffer graphic. (STUCK HERE)
Step 6) Set the source for our graphics layer to our buffer graphics.

Things I have thought/tried:

1) Loop through all the buffer results and in that loop through all the feature layer points like so:
            foreach (var bufferGraphic in e.Results)             {                 bufferGraphic.Attributes.Add("IntersectIndicator", "N");                 foreach (var featureLayerGraphic in WorkActivityFeatureLayer.Graphics)                 {                     if (bufferGraphic.Geometry.Extent.Intersects(featureLayerGraphic.Geometry.Extent))                     {                         bufferGraphic.Attributes["IntersectIndicator"] = "Y";                         break;                     }                 }             }

Problems with this are it is not removing the point the buffer was created from so it always intersects and also using a square extent for a circle buffer is not accurate.

2) Since I cannot send multiple graphics to the intersect or spatial query task I could union them first... but I still have the issue of the result always returning true because the original point is included.  Also the Buffer service does not retain any attributes from the original points so not sure how I would join the results for the intersection back in.

We are still running on the 2.4 API (waiting on our company to get me an EDN subscription for runtime)

Any help or ideas would be great!  Thanks a lot.