February 2015
Intermediate to advanced
224 pages
4h 57m
English
Once all of the parameters have been collected, the variables are then used to replace the hard-coded field lists or other static script elements with the new dynamic parameters collected from the script tool. In this manner, the script has become a valuable tool that can be used for multiple data analyses, as the fields to be analyzed are now dynamic:
import arcpy, csv busStops = arcpy.GetParameterAsText(0) censusBlocks2010 = arcpy.GetParameterAsText(1) censusBlockField = arcpy.GetParameterAsText(2) csvname = arcpy.GetParameterAsText(3) headers = arcpy.GetParameterAsText(4).split(',') sql = arcpy.GetParameterAsText(5) keyfields = arcpy.GetParameterAsText(6).split(';') dataDic = {} censusFields = [ 'BLOCKID10',censusBlockField,'SHAPE@'] ...
Read now
Unlock full access