I am looking to create a user-input script for finding surrounding features of a given point. However, the parameters for it are very sensitive and I would like for it not to have to be such a process to create results.
This is the script that I have so far:
import arcpy import sys inFc = sys.argv #input feature class (for some reason must be shapefile because the feature classes in a geodatabase don't have FIDs nearFc = sys.argv #near feature class for near table analysis (feature class) outTable = sys.argv #output table for near table analysis, also used as input for field name change so that the "IN_FID" field changes to "FID" to match the input and so the selection can be performed (table parameter) distance = sys.argv #search radius for near table analysis outLyr = sys.argv #X/Y event layer so that the near table analysis can be presented on the map projection = sys.argv #projection for the x/y coordinates selId = sys.argv #Query expression obtained from input feature class so the user can choose one feature from the input to highlight all the surrounding near features from arcpy.GenerateNearTable_analysis(inFc, nearFc, outTable, distance, "LOCATION", "NO_ANGLE", "ALL", "", "GEODESIC") arcpy.AlterField_management(outTable, "IN_FID", "FID") arcpy.MakeXYEventLayer_management(outTable, "NEAR_X", "NEAR_Y", outLyr, projection) arcpy.SelectLayerByAttribute_management(outLyr, "NEW_SELECTION", selID)
As you can see, there are too many parameters and it would not be easy for a user to perform this quickly for a demonstration. Taking into consideration my comments, are there any possible ways that this could be streamlined and adjusted?