<?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 Using sketch widget to draw polygon. It returns polygon rings from selection. I need to convert the ring data to geoJSON and having issues. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-sketch-widget-to-draw-polygon-it-returns/m-p/1092003#M74401</link>
    <description>&lt;P&gt;Hello, as the title says I am having trouble converting ring data to geoJSON.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a look at the Geometry class from the ArcGIS javascript library, but I don't understand how to use it to convert the ring data to geoJSON.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The array of rings that I am working with looks like this:&lt;/P&gt;&lt;PRE&gt;rings = [
          [
           -&lt;SPAN class="hljs-number"&gt;13441425.32511117&lt;/SPAN&gt;,
           &lt;SPAN class="hljs-number"&gt;4491520.711015136&lt;/SPAN&gt;
        ],
        [
          -&lt;SPAN class="hljs-number"&gt;13440894.1920939&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4491511.685098792&lt;/SPAN&gt;
        ],
       [
          -&lt;SPAN class="hljs-number"&gt;13440922.71925878&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4490494.010447212&lt;/SPAN&gt;
        ],
      [
          -&lt;SPAN class="hljs-number"&gt;13441438.25014971&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4490494.010447212&lt;/SPAN&gt;
        ],
       [
          -&lt;SPAN class="hljs-number"&gt;13441425.32511117&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4491520.711015136&lt;/SPAN&gt;
      ]
  ]&lt;/PRE&gt;&lt;P&gt;Any help would be greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Aug 2021 21:30:19 GMT</pubDate>
    <dc:creator>naglane</dc:creator>
    <dc:date>2021-08-24T21:30:19Z</dc:date>
    <item>
      <title>Using sketch widget to draw polygon. It returns polygon rings from selection. I need to convert the ring data to geoJSON and having issues.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-sketch-widget-to-draw-polygon-it-returns/m-p/1092003#M74401</link>
      <description>&lt;P&gt;Hello, as the title says I am having trouble converting ring data to geoJSON.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had a look at the Geometry class from the ArcGIS javascript library, but I don't understand how to use it to convert the ring data to geoJSON.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The array of rings that I am working with looks like this:&lt;/P&gt;&lt;PRE&gt;rings = [
          [
           -&lt;SPAN class="hljs-number"&gt;13441425.32511117&lt;/SPAN&gt;,
           &lt;SPAN class="hljs-number"&gt;4491520.711015136&lt;/SPAN&gt;
        ],
        [
          -&lt;SPAN class="hljs-number"&gt;13440894.1920939&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4491511.685098792&lt;/SPAN&gt;
        ],
       [
          -&lt;SPAN class="hljs-number"&gt;13440922.71925878&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4490494.010447212&lt;/SPAN&gt;
        ],
      [
          -&lt;SPAN class="hljs-number"&gt;13441438.25014971&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4490494.010447212&lt;/SPAN&gt;
        ],
       [
          -&lt;SPAN class="hljs-number"&gt;13441425.32511117&lt;/SPAN&gt;,
          &lt;SPAN class="hljs-number"&gt;4491520.711015136&lt;/SPAN&gt;
      ]
  ]&lt;/PRE&gt;&lt;P&gt;Any help would be greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 21:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-sketch-widget-to-draw-polygon-it-returns/m-p/1092003#M74401</guid>
      <dc:creator>naglane</dc:creator>
      <dc:date>2021-08-24T21:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using sketch widget to draw polygon. It returns polygon rings from selection. I need to convert the ring data to geoJSON and having issues.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-sketch-widget-to-draw-polygon-it-returns/m-p/1093878#M74483</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/514511"&gt;@naglane&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The following code snippet converts rings to polygonJson (geojson):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const rings = [
 [
       [
          -13441425.32511117,
          4491520.711015136
        ],
        [
          -13440894.1920939,
          4491511.685098792
        ],
       [
          -13440922.71925878,
          4490494.010447212
        ],
      [
          -13441438.25014971,
          4490494.010447212
        ],
       [
          -13441425.32511117,
          4491520.711015136
      ]
  ]
];

const polygon = new Polygon({
  rings: rings,
  spatialReference: { wkid: 4326 }
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I hope that's helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 02:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-sketch-widget-to-draw-polygon-it-returns/m-p/1093878#M74483</guid>
      <dc:creator>MehdiPira1</dc:creator>
      <dc:date>2021-08-31T02:15:34Z</dc:date>
    </item>
  </channel>
</rss>

