<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Polygon point relation problem. Help! in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43560#M1180</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see what you meant Daniel. I will try that and let you know if it worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Feb 2011 18:31:09 GMT</pubDate>
    <dc:creator>SamuelDantas</dc:creator>
    <dc:date>2011-02-07T18:31:09Z</dc:date>
    <item>
      <title>Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43556#M1176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm just asking about this problem because I can't think of anything else.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me explain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map with 2 layers, polygons and points, just like attached picture 01.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need to do is to display a line and a text to identify each point inside a polygon, just like picture 02. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I need to know in which direction and angle I should draw the line and the text. They must be drawn in the nearest outside region of the polygon. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's why I can't make it work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to scan the region near to the point using the circle equation and rising the radius to find the nearest point in the outside region (x = a * r + cos t, y = b * r + sin t) and it works (picture 03), but takes too long (a LOT of steps in loop) to consult the server using RelationWithin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe there is a way to do all the consult stuff on the server side... Or a fastest way to do that...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I really need help here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 16:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43556#M1176</guid>
      <dc:creator>SamuelDantas</dc:creator>
      <dc:date>2011-02-07T16:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43557#M1177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: danwallie&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're safe in assuming that your polygons are simple (in the trigonometric sense), you could do it all in the client using a simple PointInPolygon routine (see &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/21061-How-select-symbol-of-graphiclayer-added-in-runtime?p=68544&amp;amp;viewfull=1#post68544"&gt;this post&lt;/A&gt;&lt;SPAN&gt;). You could simplify the search pattern by only testing points N,E,W,S of the original point (which would mean your leader lines would be horizontal or vertical only), and stop as soon as you find a point outside the polygon, and use that point as the first line vertex, and you can easily extrapolate the second vertex and annotation position. This would be much faster than doing a bunch of server roundtrips.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 17:44:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43557#M1177</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-07T17:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43558#M1178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for answering Daniel.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that the polygons are not simple. I have attached 2 screenshots with samples of the real map. Notice that the angle in picture 04 is tangent to the line between the point and the outside region.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 18:05:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43558#M1178</guid>
      <dc:creator>SamuelDantas</dc:creator>
      <dc:date>2011-02-07T18:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43559#M1179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: danwallie&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All those polygons in the pictures are &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Simple_polygon"&gt;geometrically simple&lt;/A&gt;&lt;SPAN&gt;. I still think its doable even if you sample along, say, 30 degree steps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 18:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43559#M1179</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-07T18:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43560#M1180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I see what you meant Daniel. I will try that and let you know if it worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 18:31:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43560#M1180</guid>
      <dc:creator>SamuelDantas</dc:creator>
      <dc:date>2011-02-07T18:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon point relation problem. Help!</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43561#M1181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: sdantas&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot Daniel. I changed the code to work on client with the method you gave and it's working like a charm.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 18:06:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/polygon-point-relation-problem-help/m-p/43561#M1181</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-02-09T18:06:12Z</dc:date>
    </item>
  </channel>
</rss>

