I'm trying to find a point along a series of line at a specified percentage of each line (the percentage along the line changes with every point too). I found ArcGIS documentation of the data management tool GeneratePointsAlongLines, but when I try to use it I get the error message:
Traceback (most recent call last): File "L:\gathr\indonesia\Sara\Scripts\1234.py", line 11, in arcpy.GeneratePointsAlongLines_management(Input_Features, Output_features, "PERCENTAGE",percentage) AttributeError: 'module' object has no attribute 'GeneratePointsAlongLines_management'
What am I doing wrong here? Is there an easier way to go about this rather than Generate Points Along Lines. I'm having a hard time figuring out how to use positionAlongLine, but it looks like it could be helpful. Thoughts?
import arcpy import os in_data = "L:\\gathr\\indonesia\\Sara\\Lines_withinTimes\\Day_andmmsi\\s20160101fc_lines.gdb\\Detection1_lines_UTM" rows = arcpy.SearchCursor("L:\\gathr\\indonesia\\Sara\\Lines_withinTimes\\Day_andmmsi\\s20160101fc_lines.gdb\\Detection1_lines_UTM") for row in rows: row_name = str(row) Input_Features = in_data Output_path = "L:\\gathr\\indonesia\\Sara\\Lines_withinTimes\\Day_andmmsi\\s20160101fc_lines.gdb\\" Ouput_features = os.path.join(Output_path, "Detection_" + row_name) percentage = row.getValue("duration_fraction") arcpy.GeneratePointsAlongLines_management(Input_Features, Output_features, "PERCENTAGE",percentage)