Is there a way to run arcpy.Intersect_analysis using an arcpy.Geometry object as one of the input datasets?
I’ve tried different variations of the following, but I can’t seem to get it to work.
with arcpy.da.SearchCursor(input_feature_class, ["SHAPE@"], "ObjectID = 100") as cursor:
for row in cursor:
geometry = row[0]
intersection = arcpy.Intersect_analysis([geometry,input_feature_class], arcpy.Geometry(), output_type="POINT")[0]
Results in:
File "C:Program Files (x86)ArcGISDesktop10.3ArcPyarcpyanalysis.py", line 289, in Intersect
raise e
ValueError: DescribeGeometry: Unexpected error
I’m already using a feature layer and SelectLayerByAttribute to achieve the same thing. I’m curious as to why the above code doesn’t work.