<?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 Data from ArcGIS JS API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1306002#M81627</link>
    <description>&lt;P&gt;Hello., Did you ever find out how to extract data?&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2023 01:09:54 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2023-07-06T01:09:54Z</dc:date>
    <item>
      <title>Extract Data from ArcGIS JS API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1037547#M72093</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to let my users export data from an ArcGIS Online FeatureService as a shapefile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am aware of solutions based on the shp-write JS library. However, the process of converting ArcGIS JSON to geojson and then exporting this is way too slow and buggy. The shp-write library do not have proper support for saving multiple polygons in one shapefile.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have stumpled upon this:&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/analysis/api-reference/extract-data.htm" target="_blank"&gt;https://developers.arcgis.com/rest/analysis/api-reference/extract-data.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This seems to be exactly what I need. Is it possible to call this from the ArcGIS JS API?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The REST API refers to an "analysis url", for example: &lt;STRONG&gt;&lt;FONT color="#339966"&gt;http://&amp;lt;analysis url&amp;gt;/ExtractData/submitJob&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is it possible to get such a thing for ArcGIS Online, or is it limited to on premise ArcGIS Server solutions?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 10:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1037547#M72093</guid>
      <dc:creator>Niras_EditorNiras</dc:creator>
      <dc:date>2021-03-17T10:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from ArcGIS JS API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1037607#M72096</link>
      <description>&lt;P&gt;Using the ArcGIS API for JavaScript, check out&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/request/" target="_self"&gt;esriRequest()&lt;/A&gt;. Alternatively, it would be an ajax call; &lt;A href="https://gomakethings.com/making-ajax-requests-with-native-javascript/" target="_self"&gt;plain JS&lt;/A&gt; or &lt;A href="https://api.jquery.com/jquery.ajax/" target="_self"&gt;jQuery&lt;/A&gt;&amp;nbsp;for example. Could also try &lt;A href="https://gomakethings.com/how-to-use-the-fetch-api-with-vanilla-js/" target="_self"&gt;fetch()&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 14:40:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1037607#M72096</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-03-17T14:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from ArcGIS JS API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1039188#M72145</link>
      <description>&lt;P&gt;Hi Blake,&lt;/P&gt;&lt;P&gt;The esriRequest makes it possible to request data, yes, but it is not clear where to request the data.&lt;/P&gt;&lt;P&gt;I have solved it by requesting geojson data directly from the Feature Service. Luckily, the layer is publicly available, so I don't need to worry about tokens. Using the terraformer/arcgis library to convert arcgis JSON to geojson is way too slow.&lt;/P&gt;&lt;P&gt;The geojson data CAN be converted with shp-write, however, you need to use the fixes done here, in order to export polygons:&amp;nbsp;&lt;A href="https://github.com/hwbllmnn/shp-write/tree/master/src" target="_blank"&gt;https://github.com/hwbllmnn/shp-write/tree/master/src&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice, if an export feature was available in the JS API right out of the box, but it obviously isn't. People expect to be able to work with shapefiles in ESRI products. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 07:24:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1039188#M72145</guid>
      <dc:creator>Niras_EditorNiras</dc:creator>
      <dc:date>2021-03-22T07:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data from ArcGIS JS API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1306002#M81627</link>
      <description>&lt;P&gt;Hello., Did you ever find out how to extract data?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 01:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-from-arcgis-js-api/m-p/1306002#M81627</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2023-07-06T01:09:54Z</dc:date>
    </item>
  </channel>
</rss>

