Monday, May 9, 2011

Some code I wanted to save for work

import arcpy
from arcpy import env
 
#Search Cursor example
parnum = raw_input("Parcel ID ?")
 
env.workspace= "p:/MyData.gdb" #This tells it which GDB to work in.
   
for row in arcpy.SearchCursor("Owners"): #This tell it what feature class to look in.
   
    if row.PID== parnum :
        print "Parcel number:    ",row.PID
        print "Owner name:       ",row.ONAME
        print "Parcel address:   ",row.PADDRESS
        print "Deed book & page: ",row.DBOOKPAGE
 

No comments:

Post a Comment

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.