Select to view content in your preferred language

Intersection Point

948
1
02-11-2011 08:05 AM
deleted-user-hb3f0SCDAPf8
Deactivated User
Could someone please tell me how to get the intersection point(s) of a graphic object and a feature element?



Best regards,
0 Kudos
1 Reply
JenniferNery
Esri Regular Contributor
Have you looked at this sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#Intersect

When the Intersect is completed, you can get the vertices in your geometry. These are your intersection points.

I think another way is to do the following (assuming you are working with polygon):
if (first.Geometry.Extent.Intersects(second.Geometry.Extent))
{
 PointCollection pc = new PointCollection(); // will contain all intersection points
 foreach (var p in (first.Geometry as Polygon).Rings)
 {
  for (int i = 0; i < p.Count; i++)
   if (p.Extent.Intersects(second.Geometry.Extent))
    pc.Add(p.Clone());
 }
}


The intersection in the above code checks against geometry extent though. So maybe you need to get the polylines formed by the vertices and check intersection against these polyline extent.
0 Kudos