コード例 #1
0
                              "", "", 1000)
    arcpy.AddField_management(output_fc_temp, "GeometricElementErrors", "TEXT",
                              "", "", 1000)

    #Create update cursor then use it to iterate through records in feature class
    arcpy.AddMessage("Testing the data for various attribute error types.")
    with arcpy.da.UpdateCursor(output_fc_temp, fieldNames) as cursor:
        for row in cursor:
            #Construct the Parcel object for the row
            currParcel = Parcel(row, fieldNames)

            #Execute in-cursor error tests
            totError, currParcel = Error.checkGeometricQuality(
                totError, currParcel, pinSkips)

            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "addnum", "address", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "parcelfips", "general", False)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "zipcode", "address", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "zip4", "address", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "cntassdvalue", "tax", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "lndvalue", "tax", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "impvalue", "tax", True)
            totError, currParcel = Error.checkNumericTextValue(
                totError, currParcel, "mflvalue", "tax", True)
            totError, currParcel = Error.checkNumericTextValue(