Drawing polygon and adding buffer to it

Discussion created by p.racz on Aug 25, 2017
Latest reply on Aug 29, 2017 by p.racz


I would like to draw polygon on my map and afterwards add 1,5 m buffer to it. I managed to draw a polygon however I have no idea how to create a buffer. The idea is that a user of ArcGIS will draw a polygon and receive directly the buffer. Is that possible?

def onLine(self, line_geometry):
        array = arcpy.Array() 
        part = line_geometry.getPart(0) 
        for pt in part: 
            print pt.X, pt.
        polygon = arcpy.Polygon(array) 
        # Local Variables 
        Input = polygon 
        NewPolygons = "\\\\abc\\home\\xxx\\Documents\\moje dokumenty\\xyz\\arcgis\\new polygons"
        # Process: Append Polygon to existing file or Create new file if one is not created.   
        if arcpy.Exists("NewPolygons"):   
            arcpy.Append_management(Input, NewPolygons, "Test", "", "") 
            arcpy.CopyFeatures_management(Input,NewPolygons, "", "0","0","0")
        print " Excavation Polygon located"