Saturday, February 16, 2013

Python Tutorial


I'm taking a tutorial on python.  This lesson is showing how to  use the sys module. I am enjoying learning new things about python.

Friday, February 1, 2013

Arcmap program



#Written by Steve Atchison Jan 29 2013
def protestacres():
    totalacre=0.00
    for row in arcpy.SearchCursor("ROW & Protest Acres"):
        acres = row.getValue('ClippedAcres')
        totalacre=float(totalacre)+float(acres)
    print("Area of Protesting Properties = %.2f"  % totalacre)

    return totalacre
def grossacres(): #1000' Buffer acres
    for row in arcpy.SearchCursor("Gross acres including subject & ROW"):
        acres = row.getValue('ClippedAcres')
        print("Gross acres including Subject Property & ROW =  %.2f " %acres)
        return acres
def areasubject():
    for row in arcpy.SearchCursor("SubjectProperty"):
        subjectsqft = row.getValue('Shape_Area')
        subjectacres = float(subjectsqft/43560)
        print("Area of Subject Property is %.2f " % subjectacres)
        return subjectacres
def arearow():
    for row in arcpy.SearchCursor("ROW acres"):
        rowac = row.getValue('ClippedAcres')
        print("Area of Street ROW = %.2f " %rowac)
        return rowac
def extent_of_protest():

    netacreage = grossacres()-(areasubject()+arearow())
    print(protestacres()/float(netacreage))

extent_of_protest()
#SELECT THE PROTESTING PROPERTIES FIRST BEFORE RUNNING THIS PROGRAM!

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.