Extract Data Task - Clip and Ship Not exporting

1818
20
05-09-2011 07:25 AM
BenSayers
New Contributor II
Hi there,
I am trying to replicate the Clip and Ship Geoprocessing sample using my own data and I am having trouble getting the data to export.

I am getting a zip file exported and downloaded but the shapefile is empty although the .DBF does have the column names.

My data is held in Oracle in British National Grid (SRID 27700) and the map uses web mercator (102100). I am setting the geoprocessing output spatial refernce but this does not seem to affect anything.
gp = new esri.tasks.Geoprocessor("http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/UKOGLTools/GPServer/Extract%20Data%20Task");
gp.setOutSpatialReference({wkid:27700});

Does anyone have any idea what I need to do to fix this?
0 Kudos
20 Replies
HemingZhu
Occasional Contributor III
Hi there,
I am trying to replicate the Clip and Ship Geoprocessing sample using my own data and I am having trouble getting the data to export.

I am getting a zip file exported and downloaded but the shapefile is empty although the .DBF does have the column names.

My data is held in Oracle in British National Grid (SRID 27700) and the map uses web mercator (102100). I am setting the geoprocessing output spatial refernce but this does not seem to affect anything.
gp = new esri.tasks.Geoprocessor("http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/UKOGLTools/GPServer/Extract%20Data%20Task");
gp.setOutSpatialReference({wkid:27700});

Does anyone have any idea what I need to do to fix this?


if you set up your schema AOI polygon feature class to wkid 27700 and your mxd (that contains the gp layer and your clip layers) data frame to wkid 102100. you should be good to go.
0 Kudos
BenSayers
New Contributor II
hzhu,
Thank you for your continued help.
Can you let me know what you mean by "set up your schema AOI polygon feature class"
Do you mean in the ExtractDataTask model? Or in the Javascript code, something like:
var clipFeatureSet = new esri.tasks.FeatureSet();
clipFeatureSet.setSpatialReference(27700)


Thank you,
Ben
0 Kudos
HemingZhu
Occasional Contributor III
hzhu,
Thank you for your continued help.
Can you let me know what you mean by "set up your schema AOI polygon feature class"
Do you mean in the ExtractDataTask model? Or in the Javascript code, something like:
var clipFeatureSet = new esri.tasks.FeatureSet();
clipFeatureSet.setSpatialReference(27700)


Thank you,
Ben


I mean in your ExtractData model. Modify your AOI parameter ->Data Type -> Import schema and symbology from:. The polygon feature class (your schema) should have SR as 27700. What happen is that even though you draw or add a AOI on the web map and your mxd (both has WKID 10200), its internal SR is still 27700 so that your AOI and cliped layer are in the same SR-27700.
0 Kudos
BenSayers
New Contributor II
I mean in your ExtractData model. Modify your AOI parameter ->Data Type -> Import schema and symbology from:. The polygon feature class (your schema) should have SR as 27700. What happen is that even though you draw or add a AOI on the web map and your mxd (both has WKID 10200), its internal SR is still 27700 so that your AOI and cliped layer are in the same SR-27700.


I tried that and unfortunately I still can't get this working. I know have a layer in my MXD called AOI with the SRID 27700 and I have used this  as the Import schema and symbology from part of the Extract Data Task model.

Using Firebug, I think the problem is with passing the AOI geometry from the graphics. Is this the way to do it:
 
function showTResults(results){
dojo.forEach(results, function(result) {
      var graphic = result.feature;
   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]));
      var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);
      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]));
      switch (graphic.geometry.type) {
    case "point":
           graphic.setSymbol(fMarkerSymbol);
        break;
        case "polyline":
           graphic.setSymbol(fLineSymbol);
  break;
        case "polygon":
            graphic.setSymbol(fPolygonSymbol);
        break;
        }
map.graphics.add(graphic);
    })

ext = esri.graphicsExtent(graphics);

function doFind(textSearch) {
      params.searchText = textSearch;
      find.execute(params, showTResults);
}

function download(){
var clipLayers = [];
var seismicCount = (jQuery("#selectedSeismicTable").getGridParam("reccount"));
var wellCount = (jQuery("#selectedWellTable").getGridParam("reccount"));
var rpCount = (jQuery("#selectedRPTable").getGridParam("reccount"));
if (seismicCount > 0) {
  clipLayers.push('2D Seismic');
  for (i = 1; i < seismicCount + 1; i++) {
   var ref = $('#selectedSeismicTable').getCell(i, 1);
   //alert(ref);
   doFind(ref);
  }
};
if (rpCount > 0) {
  clipLayers.push('Regional Profiles');
    for (i = 1; i < rpCount + 1; i++) {
   var ref = $('#selectedRPTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};
if (wellCount > 0) {
  clipLayers.push('Wells');
  for (i = 1; i < wellCount + 1; i++) {
   var ref = $('#selectedWellTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};

var dlFormat = 'Shapefile - SHP - .shp';

var params2 = {
  "Layers_to_Clip": clipLayers,
  "Area_of_Interest": ext,
   "Feature_Format": dlFormat
}
esri.show(loading);
gp.submitJob(params2, completeCallback, statusCallback, function(error){
  alert(error);
esri.hide(loading)
});
}




Thank you for your continued help. I know I'm so close to getting this working but somethings not quite right.
0 Kudos
HemingZhu
Occasional Contributor III
I tried that and unfortunately I still can't get this working. I know have a layer in my MXD called AOI with the SRID 27700 and I have used this  as the Import schema and symbology from part of the Extract Data Task model.

Using Firebug, I think the problem is with passing the AOI geometry from the graphics. Is this the way to do it:
 
function showTResults(results){
dojo.forEach(results, function(result) {
      var graphic = result.feature;
   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]));
      var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);
      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]));
      switch (graphic.geometry.type) {
    case "point":
           graphic.setSymbol(fMarkerSymbol);
        break;
        case "polyline":
           graphic.setSymbol(fLineSymbol);
  break;
        case "polygon":
            graphic.setSymbol(fPolygonSymbol);
        break;
        }
map.graphics.add(graphic);
    })

ext = esri.graphicsExtent(graphics);

function doFind(textSearch) {
      params.searchText = textSearch;
      find.execute(params, showTResults);
}

function download(){
var clipLayers = [];
var seismicCount = (jQuery("#selectedSeismicTable").getGridParam("reccount"));
var wellCount = (jQuery("#selectedWellTable").getGridParam("reccount"));
var rpCount = (jQuery("#selectedRPTable").getGridParam("reccount"));
if (seismicCount > 0) {
  clipLayers.push('2D Seismic');
  for (i = 1; i < seismicCount + 1; i++) {
   var ref = $('#selectedSeismicTable').getCell(i, 1);
   //alert(ref);
   doFind(ref);
  }
};
if (rpCount > 0) {
  clipLayers.push('Regional Profiles');
    for (i = 1; i < rpCount + 1; i++) {
   var ref = $('#selectedRPTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};
if (wellCount > 0) {
  clipLayers.push('Wells');
  for (i = 1; i < wellCount + 1; i++) {
   var ref = $('#selectedWellTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};

var dlFormat = 'Shapefile - SHP - .shp';

var params2 = {
  "Layers_to_Clip": clipLayers,
  "Area_of_Interest": ext,
   "Feature_Format": dlFormat
}
esri.show(loading);
gp.submitJob(params2, completeCallback, statusCallback, function(error){
  alert(error);
esri.hide(loading)
});
}




Thank you for your continued help. I know I'm so close to getting this working but somethings not quite right.


The Parameter "Area_of_Interest" is a featureSet, not just a geometry (polygon or extent). You should define it like this:

var graphic = new esri.Graphic();
    graphic.geometry = ext;

    /* parameter AOI */
    var clipFeature = [];
    clipFeature.push(graphic);
    var clipFeatureSet = new esri.tasks.FeatureSet();
    clipFeatureSet.features = clipFeature;
....
    var params2 = {
  "Layers_to_Clip": clipLayers,
  "Area_of_Interest": clipFeatureSet,
   "Feature_Format": dlFormat
}
....

Try test your GP layer in your source .mxd to see if you get the right result and then publish it on your server.
0 Kudos
BenSayers
New Contributor II
I've still not got this working, I feel like I've been banging my head against brick wall for well over a week now.
I have tried re-writing my JavaScript Page and I have also re-published the geoprocessing task to the server again but I'm not getting anywhere.
The link to my Geoprocessing task is: http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/ClipAndShip/GPServer/Extract%20Data%20Task
The link to my dataset is:
http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/UKOGL_vers3/MapServer

The code I am not rying to run is:
function qtResults(fset){
var resultFeatures = fset.features;
var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);
for (var i = 0, il = resultFeatures.length; i < il; i++) {
  var graphic = resultFeatures;
  graphic.setSymbol(fLineSymbol);
  map.graphics.add(graphic);
  clipFeature.push(graphic)

}

clipFeatureSet.features = clipFeature;
var dlFormat = 'Shapefile - SHP - .shp';
params2 = {
  "Layers_to_Clip": clipLayers,
  "Area_of_Interest": clipFeatureSet,
   "Feature_Format": dlFormat
}

}
function action(){

esri.show(loading);
if (confirm('Ready to Download?')) {
  gp.submitJob(params2, completeCallback, statusCallback, function(error){
   alert(error);
   esri.hide(loading)
  });
}   
   
}
function download(){

var seismicCount = (jQuery("#selectedSeismicTable").getGridParam("reccount"));
var wellCount = (jQuery("#selectedWellTable").getGridParam("reccount"));
var rpCount = (jQuery("#selectedRPTable").getGridParam("reccount"));
if (seismicCount > 0) {
  clipLayers.push('2D Seismic');
  for (i = 1; i < seismicCount + 1; i++) {
   var ref = $('#selectedSeismicTable').getCell(i, 1);
   //alert(ref);
   //doFind(ref);
   twoDQuery.where = "UKOGL_LINE_REF = "+ref;
  //alert(twoDQuery.where);
   twoDQueryTask.execute(twoDQuery,qtResults);
  }
};
if (rpCount > 0) {
  clipLayers.push('Regional Profiles');
    for (i = 1; i < rpCount + 1; i++) {
   var ref = $('#selectedRPTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};
if (wellCount > 0) {
  clipLayers.push('Wells');
  for (i = 1; i < wellCount + 1; i++) {
   var ref = $('#selectedWellTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};


}


The error I am getting from my Tomcat error log is:
13-May-2011 16:48:57 com.esri.rest.gpserver.GPUtil a

SEVERE: Invalid param value: {"geometryType":"esriGeometryPolyline","features":[{"geometry":{"paths":[[[125125.00000000006,856615],[125077.00000000012,856599.0000000006],[124837.00000000017,856536.0000000001],[124595.00000000006,856481.0000000005],[124570.00000000017,856473.0000000008]]],"spatialReference":{"wkid":27700}},"attributes":{"UKOGL_LINE_REF":18096,"LINE_NAME":"LB-1A"}}],"sr":{"wkid":27700}}
com.esri.rest.util.json.JSONException: JSONObject["rings"] not found.
at com.esri.rest.util.json.JSONObject.get(JSONObject.java:372)
at com.esri.rest.util.json.JSONObject.getJSONArray(JSONObject.java:448)
at com.esri.rest.ags.AGSUtil.getGeometry(AGSUtil.java:791)
at com.esri.rest.ags.AGSUtil.getGeometry(AGSUtil.java:745)
at com.esri.rest.gpserver.GPUtil.a(GPUtil.java:197)
at com.esri.rest.gpserver.GPUtil.createGPFeatureRecordSetLayer(GPUtil.java:105)
at com.esri.rest.gpserver.GPTaskServlet.a(GPTaskServlet.java:1014)
at com.esri.rest.gpserver.GPTaskServlet.a(GPTaskServlet.java:748)
at com.esri.rest.gpserver.GPTaskServlet.service(GPTaskServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.gpserver.GPServerServlet.service(GPServerServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.catalog.CatalogServlet.service(CatalogServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.DispatchServlet.service(DispatchServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.esri.rest.security.SecurityFilter.doFilter(SecurityFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.esri.rest.RestFilter.doFilter(RestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
13-May-2011 16:48:57 com.esri.rest.gpserver.GPTaskServlet a
SEVERE: Unable to create the GP Value for parameter 'Area_of_Interest'
0 Kudos
HemingZhu
Occasional Contributor III
I've still not got this working, I feel like I've been banging my head against brick wall for well over a week now.
I have tried re-writing my JavaScript Page and I have also re-published the geoprocessing task to the server again but I'm not getting anywhere.
The link to my Geoprocessing task is: http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/ClipAndShip/GPServer/Extract%20Data%20Task
The link to my dataset is:
http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/UKOGL_vers3/MapServer

The code I am not rying to run is:
function qtResults(fset){
var resultFeatures = fset.features;
var fLineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DASH, new dojo.Color([255, 0, 0]), 3);
for (var i = 0, il = resultFeatures.length; i < il; i++) {
  var graphic = resultFeatures;
  graphic.setSymbol(fLineSymbol);
  map.graphics.add(graphic);
  clipFeature.push(graphic)

}

clipFeatureSet.features = clipFeature;
var dlFormat = 'Shapefile - SHP - .shp';
params2 = {
  "Layers_to_Clip": clipLayers,
  "Area_of_Interest": clipFeatureSet,
   "Feature_Format": dlFormat
}

}
function action(){

esri.show(loading);
if (confirm('Ready to Download?')) {
  gp.submitJob(params2, completeCallback, statusCallback, function(error){
   alert(error);
   esri.hide(loading)
  });
}   
   
}
function download(){

var seismicCount = (jQuery("#selectedSeismicTable").getGridParam("reccount"));
var wellCount = (jQuery("#selectedWellTable").getGridParam("reccount"));
var rpCount = (jQuery("#selectedRPTable").getGridParam("reccount"));
if (seismicCount > 0) {
  clipLayers.push('2D Seismic');
  for (i = 1; i < seismicCount + 1; i++) {
   var ref = $('#selectedSeismicTable').getCell(i, 1);
   //alert(ref);
   //doFind(ref);
   twoDQuery.where = "UKOGL_LINE_REF = "+ref;
  //alert(twoDQuery.where);
   twoDQueryTask.execute(twoDQuery,qtResults);
  }
};
if (rpCount > 0) {
  clipLayers.push('Regional Profiles');
    for (i = 1; i < rpCount + 1; i++) {
   var ref = $('#selectedRPTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};
if (wellCount > 0) {
  clipLayers.push('Wells');
  for (i = 1; i < wellCount + 1; i++) {
   var ref = $('#selectedWellTable').getCell(i, 1);
  // alert(ref);
   doFind(ref);
  }
};


}


The error I am getting from my Tomcat error log is:
13-May-2011 16:48:57 com.esri.rest.gpserver.GPUtil a
SEVERE: Invalid param value: {"geometryType":"esriGeometryPolyline","features":[{"geometry":{"paths":[[[125125.00000000006,856615],[125077.00000000012,856599.0000000006],[124837.00000000017,856536.0000000001],[124595.00000000006,856481.0000000005],[124570.00000000017,856473.0000000008]]],"spatialReference":{"wkid":27700}},"attributes":{"UKOGL_LINE_REF":18096,"LINE_NAME":"LB-1A"}}],"sr":{"wkid":27700}}
com.esri.rest.util.json.JSONException: JSONObject["rings"] not found.
at com.esri.rest.util.json.JSONObject.get(JSONObject.java:372)
at com.esri.rest.util.json.JSONObject.getJSONArray(JSONObject.java:448)
at com.esri.rest.ags.AGSUtil.getGeometry(AGSUtil.java:791)
at com.esri.rest.ags.AGSUtil.getGeometry(AGSUtil.java:745)
at com.esri.rest.gpserver.GPUtil.a(GPUtil.java:197)
at com.esri.rest.gpserver.GPUtil.createGPFeatureRecordSetLayer(GPUtil.java:105)
at com.esri.rest.gpserver.GPTaskServlet.a(GPTaskServlet.java:1014)
at com.esri.rest.gpserver.GPTaskServlet.a(GPTaskServlet.java:748)
at com.esri.rest.gpserver.GPTaskServlet.service(GPTaskServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.gpserver.GPServerServlet.service(GPServerServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.catalog.CatalogServlet.service(CatalogServlet.java:181)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.esri.rest.DispatchServlet.service(DispatchServlet.java:117)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.esri.rest.security.SecurityFilter.doFilter(SecurityFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.esri.rest.RestFilter.doFilter(RestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
13-May-2011 16:48:57 com.esri.rest.gpserver.GPTaskServlet a
SEVERE: Unable to create the GP Value for parameter 'Area_of_Interest'


your AOI parameter has to be a featureSet with Geometry type as POLYGON!!. Looked at your code and your clipFeature's geometryType is esriGeometryPolyline !! ( {"geometryType":"esriGeometryPolyline","features":[{"geometry":{"paths":[[[125125.00000000006,856615],[125077.00000000012,856599.0000000006],[124837.00000000017,856536.0000000001],[124595.00000000006,856481.0000000005],[124570.00000000017,856473.0000000008]]],"spatialReference":{"wkid":27700}},"attributes":{"UKOGL_LINE_REF":18096,"LINE_NAME":"LB-1A"}}],"sr":{"wkid":27700}} )
0 Kudos
BenSayers
New Contributor II
your AOI parameter has to be a featureSet with Geometry type as POLYGON!!. Looked at your code and your clipFeature's geometryType is esriGeometryPolyline !! ( {"geometryType":"esriGeometryPolyline","features":[{"geometry":{"paths":[[[125125.00000000006,856615],[125077.00000000012,856599.0000000006],[124837.00000000017,856536.0000000001],[124595.00000000006,856481.0000000005],[124570.00000000017,856473.0000000008]]],"spatialReference":{"wkid":27700}},"attributes":{"UKOGL_LINE_REF":18096,"LINE_NAME":"LB-1A"}}],"sr":{"wkid":27700}} )


Hzhu,
I am unable to get a polygon featureSet using esri.graphicsExtent(map.graphics). Is there another way I can try?
Many thanks,
Ben
0 Kudos
HemingZhu
Occasional Contributor III
Hzhu,
I am unable to get a polygon featureSet using esri.graphicsExtent(map.graphics). Is there another way I can try?
Many thanks,
Ben


From you code, i create a featureSet json like this:

{"features" :[{ "geometry" :{"rings" : [[[125125.00000000006, 856615], [125077.00000000012, 856599.0000000006], [124837.00000000017, 856536.0000000001], [124595.00000000006, 856481.0000000005], [124570.00000000017, 856473.0000000008], [125125.00000000006, 856615]]]}}]}

Put it into your AOI parameter at your service url: http://maps.lynxinfo.co.uk:8080/LIVE/services/UKOGL/ClipAndShip/GPServer/Extract%20Data%20Task/submi.... Test it. if your AOI set up is OK, you should get some results.
0 Kudos