AnsweredAssumed Answered

py addin:  buffer error

Question asked by KevinBellSLC on Aug 11, 2014
Latest reply on Aug 12, 2014 by KevinBellSLC

I have a python addin that has a tool, and a combo box.  the combo is quarter mile increments, so 0.25, 0.5, 0.75, 1, 1.25 etc.  The tool is just a map click.  This code creates the buffer where the user clicks, but it's 17 inches, not 1 Mile...  I'm going nuts.

 

def buildWebPage(x, y, cmboDistance):

   

    print 'in buildWebPage def!'

   

    inpoint = arcpy.Point(X=x, Y=y)

    ptGeometry = arcpy.PointGeometry(inpoint)   

    sr = arcpy.SpatialReference(3566)

    arcpy.DefineProjection_management(ptGeometry, sr)

    print 'define prj'

 

    arcpy.Buffer_analysis(ptGeometry, "buffer", str(cmboDistance) + ' Miles')

    print 'buffer complete'

Outcomes