1

I am trying to create an Elevation Profile service using the Python code found on the Setting up an on-premise elevation Profile service page:

And I followed all the instructions. I am able to run the tool with no errors in ArcGIS and I can publish the geoprocessing service, but when I run the gp service inside ArcGIS I get an error saying:

Error executing tool.: Failed to execute. Parameters are not valid. 
ERROR 000840: The value is not a TIN Layer. 
ERROR 000840: The value is not a Raster Layer. 
ERROR 000840: The value is not a Terrain Layer.
ERROR 000840: The value is not a LAS Dataset Layer. Failed to execute (InterpolateShape). Failed to execute. Parameters are not valid. 
ERROR 000840: The value is not a TIN Layer. 
ERROR 000840: The value is not a Raster Layer. 
ERROR 000840: The value is not a Terrain Layer. 
ERROR 000840: The value is not a LAS Dataset Layer. Failed to execute (InterpolateShape). Failed to execute (Profile). Failed to execute (Profile).

The problem seems to be in the Interpolate Shape analysis in line 307 in the Profile Tool.py but I am not sure what is wrong with it. Do you guys have any ideas?

  • Would you be able to edit your question to indicate whether you see the same error using the Python script tool you made the geoprocessing service task from in ArcGIS for Desktop, please? – PolyGeo Sep 4 '14 at 20:20
  • I'm still not clear exactly what you are doing inside ArcGIS for Desktop - presumably just running a Python script tool but with what parameters? And then how are you using the Geoprocessing service task from ArcGIS for Server? Presumably via its REST API but what are you passing on its service URL? Also, what you mean by running a "gp service inside ArcGIS" is ambiguous to me. Can you edit it some more to make your precise steps clear, please? – PolyGeo Sep 4 '14 at 21:30
  • I ran the gp service in ArcMap through an ArcCatalog connection to the service. I found the issue. I created a raster layer used in the interpolation dem = "D:\\ArcGISData\\Elevation\\Profile\\ProfileData\\demdata.gdb\\dem10m" arcpy.MakeRasterLayer_management(dem, "demlayer") arcpy.InterpolateShape_3d("demlayer", in_feature_class=in_line_features, out_feature_class=interp_line_temp, vertices_only="VERTICES_ONLY") – ionara wilson Sep 8 '14 at 20:35
2

I found the issue.

I created a raster layer used in the interpolation by first creating a variable that referenced an absolute path to the raster, then I created the raster layer, then used it in the interpolation. That's why I was getting the error. Before it could not identify the raster layer used.

dem = "D:\\ArcGISData\\Elevation\\Profile\\ProfileData\\demdata.gdb\\dem10m" 

arcpy.MakeRasterLayer_management(dem, "demlayer")

arcpy.InterpolateShape_3d("demlayer", in_feature_class=in_line_features, out_feature_class=interp_line_temp, vertices_only="VERTICES_ONLY")
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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