Geoprocessing service output parameter hasZ disabled?

243
1
05-24-2023 01:08 AM
EvelynHsu
New Contributor III

We have a geoprocessing service that takes a point feature layer, runs some calculation steps, and output a line feature layer. The input and output feature layers both need to have z values. The service was published from a python script tool. 

When we run the GP service as a web tool in Pro, it all works fine, generates a line feature that has z values.

However, when we run the GP service on REST endpoint (or by JS API) using the same input, the output feature layer does NOT have Z. The REST page of the GPservice also shows that output parameter hasZ=False.

EvelynHsu_0-1684915457492.png

 

We tried to explicitly set arcpy.env.outputZFlag = 'enabled' in the script, and setting the output parameter environment setting in the toolbox, but none of them worked. The output parameter is still not Z-aware. 

Does anyone have an idea on how to solve this issue? Thanks in advance!

 

0 Kudos
1 Reply
EvelynHsu
New Contributor III

Updates: We've solved the parameter hasZ=false problem - by changing the parameter type in the toolbox from a Feature Set to a Feature Layer and republish the tool.

Problem is, even with parameter hasZ=true and returnZ set to true when submitting a job, the result returned from REST endpoint still shows no Z value.

EvelynHsu_0-1684923285767.png

 

0 Kudos