Geoprocesing Server With Dynamic Parameters as REST

874
4
08-18-2014 05:03 PM
SheridanNava
New Contributor III

Hello, am trying to publish a geoprocesig service from a model that creates .DAE files . the problem is when i publish the tool, i cant modify the parameters, so i tried publishing a geoprocesing service from a python script that make the same task, but i fail again, the parameters are constants and i cant modify them.

i would like to know if  is possible to have a gp service with modificable inputs, for example, if i had a shapefile input, i would like to pass "c:/myfolder/myshape.shp" as parameter.

this is my model.

Captura.PNG

this is my script

Captura2.PNG

any help!

0 Kudos
4 Replies
FilipKrál
Occasional Contributor III

Hi,

It is certainly possible, although I am not sure if you can have intermediate output as a parameter of a geoprocessing service like the Multipatch Feature Class in your model. I guess it is important to make the distinction between input and output parameters.

I'd recommend adding Copy Features or Feature Class To Feature Class tool to copy the Multipatch Feature Class into say Multipatch Output, and making the Multipatch Output a Parameter instead of the Multipatch Feature Class (wchich will reside in some scratch workspace).

Similarly, you are missing arcpy.SetParameter in your python script to tell ArcGIS what to use as output from the script.

Hope this helps.

Filip

0 Kudos
SheridanNava
New Contributor III

Thanks. when i run on desktop the gptool acepts dynamic, like this.

dasd.PNG

but, when is arcgis server, there are no option to set parameter via rest.

0 Kudos
OwenEarley
Occasional Contributor III

One thing to be aware of is that server GP Tools do not have as many data types available as the desktop tools.

Check out this ArcGIS Help 10.1‌ page for a list of REST geoprocessing task data types. There does not appear to be a data type supporting TINs.

0 Kudos
XanderBakker
Esri Esteemed Contributor

Owen is right, TIN's are not supported as parameter in a geoprocessing service. In case the TIN's are pretty much static you could include them in your script, without being parameters. If you have multiple TIN's then you could provide some intelligence (for instance the extent) in your script to use those needed for the provided input featureclass.

Kind regards, Xander

0 Kudos