1

I am trying to send some feature classes from geoprocessing services. I have written Python toolboxes which does some business logic and generates feature classes (both point and polygon for different tools).

I have published these tools as geoprocessing services and want to return these feature classes, but so far I am stuck at points where my tools do all successful processing but are unable to send back the feature classes.

I can generate the JSON output of the result through featureset.JSON and send it across as string but I really don't know how to consume that string to render my map at the JavaScript client side. I tried setting the output parameter type as "feature class", "feature set", "shape file", but the services gives a "invalid return type" error.

Can somebody please help me in this?

3
  • I am using arcgis server 10.1.please let me know if any further information is required. Thanks Commented Jun 8, 2014 at 4:36
  • how do you want to use the results of the GP service run? Just visualize in JS API? Any interactions with the data that application user can perform? Commented Jun 8, 2014 at 6:32
  • Just not visualize,infotemplate will be required for the feature class.Any help with the options, is highly appriciated. Commented Jun 8, 2014 at 12:46

1 Answer 1

1

You don't need to get your results as feature class to be able to interact with the features in a web application. Your options are using GraphicsLayer or FeatureLayer (based on FeatureSet). GP services cannot have complex datasets such as feature classes as a result. Read more here.

4
  • Thanks alot Alex for the reply. Just to clarify.. do you ask me to return a featureset? Commented Jun 8, 2014 at 19:42
  • @ArijitBose, it is up to you in what way you will obtain the results and visualize. The most important is that you will keep the geometry and attributes at the client side for info window use. Another approach you might consider is to write a feature class in the geodatabase on the disk and then use Dynamic Layer to add this fc to the web application, but why bother if you will have you need already in the browser. Commented Jun 8, 2014 at 21:03
  • Thanks a ton. your pointer did the trick.Unable to vote due to low reputation. Commented Jun 9, 2014 at 6:55
  • No problem. Glad it worked out well :) Commented Jun 9, 2014 at 7:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.