I need to create a buffer around each point of a points feature class. I would then want to use the point buffers to clip the streets feature class to calculate the length of the clipped streets using ArcPy.
I need some guidance in summarizing the length of the streets regarding their types.
The "summarizing" in the following script does not work, I receive the following message:
ERROR 000732: Input Table: Dataset roads_0 does not exist or is not supported ERROR 000800: The value is not a member of SUM | MEAN | MIN | MAX | RANGE | STD | COUNT | FIRST | LAST. Failed to execute (Statistics).
My ArcPy script so far:
import arcpy arcpy.env.workspace = "D:/Data/ToYahya" # Perform the buffer which will create one circular buffer per site arcpy.Buffer_analysis("test_point.shp", "Buffer_test.shp", "50 Meters", "FULL", "ROUND", "NONE", "") # Open a search cursor and use the geometry of each buffer polygon in turn to Clip roads # Use the id of each buffer polygon as suffix on the out road shapefile features = arcpy.SearchCursor("Buffer_test.shp") for feature in features: bufferPoly = feature.SHAPE arcpy.Clip_analysis("road.shp", bufferPoly, "road_" + str(feature.FID)) arcpy.Statistics_analysis("road_" + str(feature.FID), "outStatsTable", "Shape_Leng", "type") del feature,features