I'm using the Extract Data Geoprocessing service at this link:
Extract Data Task (HomelandSecurity/Incident_Data_Extraction)
I've created a GeoprocessingTask and I've added the GeoprocessingParameters for "Layers_to_Clip" and "Feature_Format". I'm struggling with trying to determine what I need to provide for the "Area_of_Interest" parameter as I can get the geometry from my GraphicsOverlay, but I don't know how to turn the geometry into a GPFeatureRecordSetLayer as referred to in the service as this no longer exists to my knowledge in the newest version of the SDK. Any help would be appreciated.
Link to the code I'm referring to: https://paste.ofcode.org/uAnZfzTNUUcuMaCBYnLFS
Alright, so I've figured out the "Area_of_Interest" parameter, but now I'm having issues with the "Layers_to_Clip" parameter. I'm passing a list of GeoprocessingStrings here:
extractDataParameters.Inputs.Add("Layers_to_Clip", new GeoprocessingMultiValue<GeoprocessingString>(geoprocessingStrings));
So geoprocessingStrings is the list of GeoprocessingStrings and I am getting the string containing the layer name when I check the list, but I am still getting an error when I try to create the job and get the results as the HTTP request says "Invalid value for parameter 'Layers_to_Clip". Could someone help with this issue?
Hi,
I recommend testing the service endpoint in the browser and comparing the request URL with that made by ArcGIS Runtime (add a handler for the HttpRequestBegin event).
It is possible, since that service is running on a version of ArcGIS that is no longer supported that there could be a difference in the way the parameters are requested in later versions.
ArcGISHttpClientHandler.HttpRequestBegin += (sender, request) =>
{
// ... Check the request URL
};
Thanks
Mike
Hi Michael,
I just checked this and it doesn't appear that the request URL is asking for different parameters as I just made a post request with Postman and the parameters are the same.
Hi,
Are you able to get the job to succeed when running via the web browser? (Submit Job: Extract Data Task)
Thanks
Mike
I've marked this question as answered as I've came up with a better solution to my issue than using the GeoProcessing service. Thank you for your time.