Extend vector lines

This tool can be used to extend vector lines by a specified distance. The user must input the names of the input and output shapefiles, the distance to extend features by, and whether to extend both ends, line starts, or line ends. The input shapefile must be of a POLYLINE base shape type.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "input.shp"
outputFile = wd + "output.shp"
extendDist = "1000.0"
method = "both ends"
args = [inputFile, outputFile, extendDist, method]
pluginHost.runPlugin("ExtendVectorLines", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "input.shp"
def outputFile = wd + "output.shp"
def extendDist = "1000.0"
def method = "line start"
String[] args = [inputFile, outputFile, extendDist, method]
pluginHost.runPlugin("ExtendVectorLines", args, false)

Credits: