Hello,
I wrote my own geoprocessing tool that performs Viewshed analysis. The tool works perfectly fine in the Pro environnment but once it's published (no errors when publishing from Pro 3.2.2), the raster output from arcpy.ddd.Viewshed2() returns the error 000732. No file is written.
I've tried using a scratch name for the result. I've tried using 'in-memory/raster_name'. I've tried without specifying a name in the viewshed tool when setting the workspace to the scratchGDB. I've written to os.path.join(arcpy.env.scratchGDB, 'raster_name') with no success. I've attempted to save the result as such
arcpy.sa.Raster(arcpy.ddd.Viewshed2(in_raster=image_service_raster, in_observer_features=observer_feature_layer)). Raster not found in every case.
Here are my questions: Does the server need to have a specific running service (maybe utilitary) in order to handle the output? Is there a rule about using Viewshed outside of pro? Why doesn't the result write on disk?
I don't want to use the ready to use tools 'create viewshed' as I can't use my own raster image as input.
Thanks in advance.
-N