How to set the input parameter for "define projection" local geoprocessing package

09-29-2019 07:25 PM
New Contributor

Hi Experts,

I made the "define project" local geoprocessing package via arcmap 10.2 toolbox->data management tools->projections and transformations->Define Projection via option "support Arcgis runtime" checked. and then I call this local service via arcgis runtime .net 100.6, the code snippet is shown as below:

GeoprocessingParameters gpParams = new GeoprocessingParameters(GeoprocessingExecutionType.AsynchronousSubmit);
gpParams.Inputs["coor_system"] = new GeoprocessingString(projectString);
gpParams.Inputs["in_dataset"] = new GeoprocessingFeatures(new Uri(tifPath));//with loca tif abosolute path, is it wrong here?
// Create the job
m_gpJob = m_gpTask.CreateJob(gpParams);

I got error on JobChanged event saying, "Illegal state: Server job has failed. Invalid return value: c:\users\peter\appdata\local\temp\arcgisruntime_28976\defineprojection_dom\jobs\defineprojection_dom_gpserver\j98a707d142604f029a969ffa2d886c9e\scratch\dom.tif."

Could anyone help find out where is going wrong and give some clues to make the local service work as expected? thanks in advance.

The attached snapshot is the 'define projection' local service submit job page, how to set the correct value for the input 'in_dataset‘ with type GPRasterDataLayer?

0 Kudos
0 Replies