<?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: Extract the coordinates of polyline (wpf) in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070860#M10184</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thank you. That's the information I wanted.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 07:01:39 GMT</pubDate>
    <dc:creator>SungHyunKim</dc:creator>
    <dc:date>2021-06-22T07:01:39Z</dc:date>
    <item>
      <title>Extract the coordinates of polyline (wpf)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070263#M10172</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;I would like to extract the coordinates of polyline one by one later.&lt;/P&gt;&lt;P&gt;Is there a way?&lt;/P&gt;&lt;P&gt;here is my Code&lt;/P&gt;&lt;P&gt;foreach (CableGPSInfo gpsinfo in StaticCommon.CableGPSInfoList)&lt;BR /&gt;{&lt;BR /&gt;string[] gps = gpsinfo.GPS.Split(';');&lt;BR /&gt;double[] mappoint = new double[2];&lt;BR /&gt;Dictionary&amp;lt;double, double&amp;gt; posdic = new Dictionary&amp;lt;double, double&amp;gt;();&lt;BR /&gt;foreach (string point in gps)&lt;BR /&gt;{&lt;BR /&gt;string[] text = point.Split(',');&lt;BR /&gt;//if(gpsinfo.Fiberstart==)&lt;BR /&gt;if (text.Length &amp;gt; 1)&lt;BR /&gt;{&lt;BR /&gt;mappoint[0] = Convert.ToDouble(text[0]);&lt;BR /&gt;mappoint[1] = Convert.ToDouble(text[1]);&lt;BR /&gt;points.Add(mappoint[1], mappoint[0]);&lt;BR /&gt;posdic.Add(mappoint[1], mappoint[0]);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;polyline = new Esri.ArcGISRuntime.Geometry.Polyline(points);&lt;BR /&gt;points.Clear();&lt;/P&gt;&lt;P&gt;overlay.Graphics.Add(graphic);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I'm saying is that I want to extract the coordinate value of polyline drawn in overlay graphic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SungHyunKim_1-1624238299867.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/16426iA3577F494ED60644/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SungHyunKim_1-1624238299867.png" alt="SungHyunKim_1-1624238299867.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 01:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070263#M10172</guid>
      <dc:creator>SungHyunKim</dc:creator>
      <dc:date>2021-06-21T01:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract the coordinates of polyline (wpf)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070496#M10176</link>
      <description>&lt;P&gt;Hi Sung Hyun Kim. Every polyline has a&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/wpf/api-reference/html/P_Esri_ArcGISRuntime_Geometry_Multipart_Parts.htm" target="_self"&gt;parts property&lt;/A&gt;&amp;nbsp;that contains a collection of&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/wpf/api-reference/html/T_Esri_ArcGISRuntime_Geometry_ReadOnlyPart.htm" target="_self"&gt;read only parts&lt;/A&gt;&amp;nbsp;. Each of these parts has a &lt;A href="https://developers.arcgis.com/net/wpf/api-reference/html/P_Esri_ArcGISRuntime_Geometry_ReadOnlyPart_Points.htm" target="_self"&gt;collection of points&lt;/A&gt;. You can project these points to Wgs84 to get latitude and longitude values for each point. This code snippet demonstrates getting coordinates from all of the points in the parts of a polyline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;foreach (ReadOnlyPart part in polyline.Parts)
{
    foreach (MapPoint point in part.Points)
    {
        MapPoint projectedPoint = GeometryEngine.Project(point, SpatialReferences.Wgs84) as MapPoint;
        double longitude = projectedPoint.X;
        double latitude = projectedPoint.Y;

        // Use the longitude / latitude values.
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps, please let me know if you have any more questions.&lt;/P&gt;&lt;P&gt;Zack&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 15:36:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070496#M10176</guid>
      <dc:creator>ZackAllen</dc:creator>
      <dc:date>2021-06-21T15:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract the coordinates of polyline (wpf)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070860#M10184</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you. That's the information I wanted.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 07:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/extract-the-coordinates-of-polyline-wpf/m-p/1070860#M10184</guid>
      <dc:creator>SungHyunKim</dc:creator>
      <dc:date>2021-06-22T07:01:39Z</dc:date>
    </item>
  </channel>
</rss>

