<?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 Task - Variation on Clip and ship in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330877#M30589</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hzhu,&lt;BR /&gt;Thank you for you prompt response. I tried something similar to this but I only want the lines that the user has selected and not others around in and around them, is there a way that I can remove the unwanted lines from the selection, without the process being too time consuming? As I have over 8000 lines and the cart only has a capacity of 25 lines.&lt;BR /&gt;Hopefully this makes sense and you can help me further.&lt;BR /&gt;Many thanks,&lt;BR /&gt;Ben&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a graphic array and push only the selected line into it. And then apply what i said. something like var lines =[]; for (line in your cart...){ lines.push[line];}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 May 2011 20:23:25 GMT</pubDate>
    <dc:creator>HemingZhu</dc:creator>
    <dc:date>2011-05-04T20:23:25Z</dc:date>
    <item>
      <title>Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330874#M30586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to create a variation of the 'Clip and Ship' Extract Data task that instead of having an AOI being passed in the params has a list of the Unique Feature Values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The idea behind what I am try to do is to implement and kind of cart system where users add lines to the cart (JQuery table) from over a wide geographic area and then when they have collected all of the lines they are interested in, they simply click download and the Extract Data Geoprocessing Task runs on the server and clips and ships a zip file containing a shapefile of the lines they had in the cart.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone give me any ideas as to how to edit the python script or the Extract Data model to allow this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben Sayers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 15:02:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330874#M30586</guid>
      <dc:creator>BenSayers</dc:creator>
      <dc:date>2011-05-04T15:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330875#M30587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;I am trying to create a variation of the 'Clip and Ship' Extract Data task that instead of having an AOI being passed in the params has a list of the Unique Feature Values.&lt;BR /&gt;The idea behind what I am try to do is to implement and kind of cart system where users add lines to the cart (JQuery table) from over a wide geographic area and then when they have collected all of the lines they are interested in, they simply click download and the Extract Data Geoprocessing Task runs on the server and clips and ships a zip file containing a shapefile of the lines they had in the cart.&lt;BR /&gt;&lt;BR /&gt;Can anyone give me any ideas as to how to edit the python script or the Extract Data model to allow this?&lt;BR /&gt;Many thanks,&lt;BR /&gt;Ben Sayers&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can achieve this without modify Extract Data Model. Here is the idea: Once you collected all the lines, create a extent that covers all the lines ( var extent =esri.graphicsExtent(lines);). Use this extent as a geometry to create a graphic. Push this graphic into a featureSet as your AOI parameter -somthing like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* parameter AOI - clipFeatureSet*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clipFeature = [];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clipFeature.push(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var clipFeatureSet = new esri.tasks.FeatureSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; clipFeatureSet.features = clipFeature;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;After that, call your GP task.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does it make sense?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 17:16:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330875#M30587</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-05-04T17:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330876#M30588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hzhu,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for you prompt response. I tried something similar to this but I only want the lines that the user has selected and not others around in and around them, is there a way that I can remove the unwanted lines from the selection, without the process being too time consuming? As I have over 8000 lines and the cart only has a capacity of 25 lines.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully this makes sense and you can help me further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 19:11:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330876#M30588</guid>
      <dc:creator>BenSayers</dc:creator>
      <dc:date>2011-05-04T19:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330877#M30589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hzhu,&lt;BR /&gt;Thank you for you prompt response. I tried something similar to this but I only want the lines that the user has selected and not others around in and around them, is there a way that I can remove the unwanted lines from the selection, without the process being too time consuming? As I have over 8000 lines and the cart only has a capacity of 25 lines.&lt;BR /&gt;Hopefully this makes sense and you can help me further.&lt;BR /&gt;Many thanks,&lt;BR /&gt;Ben&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Create a graphic array and push only the selected line into it. And then apply what i said. something like var lines =[]; for (line in your cart...){ lines.push[line];}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 May 2011 20:23:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330877#M30589</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2011-05-04T20:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330878#M30590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your help, I think I'm getting close now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code I am using:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function showTResults(results){
 dojo.forEach(results, function(result) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = result.feature;
&amp;nbsp;&amp;nbsp; var fMarkerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([0, 255, 0, 0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 1);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fPolygonSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_NONE, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASHDOT, new dojo.Color([255, 0, 0]), 2), new dojo.Color([255, 255, 0, 0.25]));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (graphic.geometry.type) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; case "point":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(fMarkerSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cartstuff.push(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "polyline":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(fLineSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cartstuff.push(graphic);
&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; case "polygon":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.setSymbol(fPolygonSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(graphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
}; 

function doFind(text) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.searchText = text;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; find.execute(params, showTResults);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }


function download(){
 var clipLayers = [];
 var seismicCount = (jQuery("#selectedSeismicTable").getGridParam("reccount"));
 var wellCount = (jQuery("#selectedSWellTable").getGridParam("reccount"));
 if (seismicCount &amp;gt; 0) {
&amp;nbsp; clipLayers.push('2D Seismic');
&amp;nbsp; for (i = 1; i &amp;lt; seismicCount + 1; i++) {
&amp;nbsp;&amp;nbsp; var ref = $('#selectedSeismicTable').getCell(i, 1);
&amp;nbsp;&amp;nbsp; doFind(ref);
&amp;nbsp; }
 };
 if ((jQuery("#selectedRPTable").getGridParam("reccount")) &amp;gt; 0) {
&amp;nbsp; clipLayers.push('Regional Profiles');
 };
 if ((jQuery("#selectedWellTable").getGridParam("reccount")) &amp;gt; 0) {
&amp;nbsp; clipLayers.push('Wells');
&amp;nbsp; for (i = 1; i &amp;lt; wellCount + 1; i++) {
&amp;nbsp;&amp;nbsp; var ref = $('#selectedWellTable').getCell(i, 1);
&amp;nbsp;&amp;nbsp; //alert(ref);
&amp;nbsp;&amp;nbsp; doFind(ref);
&amp;nbsp; }
 };

var clipFeatureSet = new esri.tasks.FeatureSet();
clipFeatureSet.features = cartstuff;

 var params = {
&amp;nbsp; "Layers_to_Clip": clipLayers,
&amp;nbsp; "Area_of_Interest": clipFeatureSet,
&amp;nbsp; "Feature_Format": "Shapefile - SHP - .shp"
 }
 gp.submitJob(params, completeCallback, statusCallback, function(error){
&amp;nbsp; alert(error);
 
 });
}
function completeCallback(jobInfo){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(jobInfo.jobStatus !== "esriJobFailed"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.getResultData(jobInfo.jobId,"Output_Zip_File", downloadFile);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp; 
function statusCallback(jobInfo) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var status = jobInfo.jobStatus;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(status === "esriJobFailed"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(status);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (status === "esriJobSucceeded"){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; 
function downloadFile(outputFile){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var theurl = outputFile.value.url;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.location = theurl;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;After I click the download button on my cart I get an Error message saying:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Error: esri.config.defaults.io.proxyUrl is not set&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've googled this and looked for help but I'm not sure how to get around this and what causes it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330878#M30590</guid>
      <dc:creator>BenSayers</dc:creator>
      <dc:date>2021-12-11T15:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Data Task - Variation on Clip and ship</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330879#M30591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thanks for your help, I think I'm getting close now.&lt;BR /&gt;Here is the code I am using:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After I click the download button on my cart I get an Error message saying:&lt;BR /&gt;Error: esri.config.defaults.io.proxyUrl is not set&lt;BR /&gt;&lt;BR /&gt;I've googled this and looked for help but I'm not sure how to get around this and what causes it.&lt;BR /&gt;Any ideas?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This usually happens when the server returns something too big for a normal request to handle. Here's the link to set up a proxy page on your server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/ags_proxy.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/ags_proxy.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 16:43:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extract-data-task-variation-on-clip-and-ship/m-p/330879#M30591</guid>
      <dc:creator>KenDoman</dc:creator>
      <dc:date>2011-05-19T16:43:20Z</dc:date>
    </item>
  </channel>
</rss>

