Hello,
I try to create from ArcGIS Pro a Buffer GP Service that accepts as input multiple geometry type (Point, Polygon, Polyline).
I tried this script :
import arcpy
arcpy.env.overwriteOutput = True
##arcpy.addOutputsToMap = True
if __name__ == "__main__":
inputFc = arcpy.GetParameterAsText(0)
outputFc = r"C:\temp\output_buffer.shp"
## arcpy.AddMessage(inputFc)
# Create a Describe object from the feature class
desc = arcpy.Describe(inputFc)
# Print Sahpe Type
## arcpy.AddMessage("Shape Type : " + desc.shapeType)
shpType = desc.shapeType
if(shpType == "Polygon"):
arcpy.AddMessage("Shape Type : " + desc.shapeType)
arcpy.analysis.Buffer(inputFc, outputFc, "500 meters")
elif(shpType == "Point"):
arcpy.analysis.Buffer(inputFc, outputFc, "500 meters")
elif(shpType == "Polyline"):
arcpy.analysis.Buffer(inputFc, outputFc, "500 meters")
It works with ArcGIS Pro :


However, when I publish the result of the script (from ArcGIS pro) to a Web Tool (GP Service), the Geometry Type is always the same that the input geomtry used in ArcGIS Pro :

Therefore, in a WAB application, i can choose only a point feature layer as input :

I think it's not possible because "The geometry type comes from the input and output features that are used to create the result" | Source : https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/share-analysis/web-tool-settings.htm#GUID-BD393EE7-5839-46A6-A196-8D4E092D9309
Is it really not possible ?
Is there a workaround ?
Do you have any idea ?
Thank you,
Bertrand