Hi I am looking for suggestions to fix my script to add an additional field.
Here is the script that I used and it calculates the distances that I was
trying to get, but I need to create an additional field in my table that
identifies the classification of the near_field ID so that I can use the
various distances to do a spatial analysis by summing the inverse square of
the distance for each unique classification to get a weighted probability
to classify the unclassified points.
Thank you
R. Brooks
import arcpy
arcpy.env.workspace =
r"G:\GEOS_458\ARDF_Project\CS_MOD_Map\ARDF_reclass.gdb"
# set variables
in_features= "csm_dict1b"
near_features= "csm_dict1b"
out_table ="pt_pt_dis2"
search_radius = "100 miles"
try:
# find distances within a 100 mile radius
arcpy.PointDistance_analysis(in_features,near_features,out_table,search_radius)
print arcpy.GetMessages(0)
except arcpy.ExecuteError:
print arcpy.GetMessages(2)
except Exception as ex:
print ex.args(0)
def main():
pass
if __name__ == '__main__':
main()
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor