doncav

Problems with Data Extraction GP Task

Discussion created by doncav on Sep 8, 2010
Latest reply on May 6, 2011 by ryankelley001
I have created a data extraction gp task and I have run into a problem that I can't seem to figure out.  In the gp service I have a list of choices that can be clipped, not all of the data is in the same coordinate system.  I have my JS code set so that I can pass the proper params to the service.  I am passing the "Layers_to_Clip", "Area_of_Interest", and "format" to the service, the service processes the information and I can get the zip file that is output.  The problem is that the created shapefile does not have any data associated with it.  At first I thought my service was the problem but I was able to extract any of the data using the Flex API.  Here is my JS code that I am using.  Does anyone know that the my issue could be?

var gpFeatureSet = new esri.tasks.FeatureSet();
var features= [];
    var xmax, ymax, xmin, ymin;
var mapExtentPoly;
var clipLayers = [];

        esri.config.defaults.io.proxyUrl = "proxy.ashx";
        esri.config.defaults.io.alwaysUseProxy = false;
 
var gp = new esri.tasks.Geoprocessor("http://server/ArcGIS/rest/services/DetailDataDownload_GP/GPServer/Extract%20Data%20Task");

    xmax = mapAll.extent.xmax;
    xmin = mapAll.extent.xmin;
    ymax = mapAll.extent.ymax;
    ymin = mapAll.extent.ymin;
   
    mapExtentPoly = new esri.geometry.Polygon(mapAll.spatialReference);
    mapExtentPoly.addRing([[xmin, ymax], [xmax, ymax], [xmax, ymin], [xmin, ymin], [xmin, ymax]]);
     
    var mapSymbol = new esri.symbol.SimpleFillSymbol();
    var mapGraphic = new esri.Graphic(mapExtentPoly, mapSymbol, "", "");
    mapAll.graphics.add(mapGraphic);
   
          features.push(mapGraphic);
    gpFeatureSet.features = features;
   
     layersToClip = clipLayers;
    
  var params = {
    "Area_of_Interest":gpFeatureSet,
    "Feature_Format":format,
    "Layers_to_Clip":layersToClip
    };
  
        gp.submitJob(params, completeCallback, statusCallback);

Outcomes