Well I think I've gotten it down for lines of any vertex count. I haven't attempted multipart lines since I've never messed with it in arcpy. The coding was made a bit more difficult since there isn't write access to the lastPoint property for Geometry objects. Instead of using the slope (which was my initial thought), I used the code from this SO question. ...
I seems very similar to post "postgis, extrapolate a line". If I avoid repetition of cited post, I think you just need to extrapolate beyond your extreme points. In a query you get something like this should work:
SELECT ST_MakeLine(ST_TRANSLATE(a, sin(az1) * len, cos(az1) *
len),ST_TRANSLATE(b,sin(az2) * len, cos(az2) * len))
SELECT a, b, ...
The most simple workaround to this problem is to create a buffer around your line, then you convert the buffer into a line ("Feature to line" using both the buffers and the original lines) and finally you run the "extend" tool (Info/advanced licence needed for feature to line, and Editor/standard licence needed for extend, but there are free solutions for ...
This is what snap does:
As one can see it is not what @Stella wants
The following workflow based on this structure of original pipes table:
arcpy.CalculateField_management("ENDS", "WHAT", "!FID! % 2", expression_type="...
What if you make a selection of the lines you want to extend.
Buffer those lines by the amount of extension desired.
Convert that to a line fc.
Then extend to intersection.
You might have to break and delete the other end of the buffer to keep from overlapping the line in the middle. (I haven't seen a screenshot of what you have or want to do)
Or I think ...
I think to Extend Lines to your Building Edge you must convert Building Polygons to Lines and Append the Line feature class. Select-by-Location Lines that Intersect Buildings, reverse Selection, Extend 50.
ArcMap has Extend Lines in the Editing Toolbox. A Standard or Advanced license is required. The Parcel Polygons might need to be converted to Lines and added to the same feature class that you are extending.
You could probably do something like this, since the default processing extent is based on the extent of the feature class.
for fc in fcList:
fcext = arcpy.Describe(fc).extent
env.extent = arcpy.Extent(fcext.XMin-5000,fcext.YMin-5000,fcext.XMax+5000,fcext.YMax+5000)
outKDens = KernelDensity(fc,"NONE",500,500,"SQUARE_KILOMETERS","EXPECTED_COUNTS")...
If the 2.8 behaviour is the same as current (3.2 / 2.18) behaviour, you can only specify an increase in percent (a number) of the extent of the input layer. So to achieve what you want, you will have to choose a buffer percentage that is large enough to cover the other data set's extent, and then clip the result using the extent of that layer.
Try using CON in your raster calculator expression. You can use it to specify something like where "river_road" is NULL (or some other value), replace it with the values from the terrain model Conditional evaluation with Con
I am not sure about 10.1, but in 10.0 you can get the 9.3 editor toolbar including the 'Extend/Trim Features'.
Go to :\Program Files\ArcGIS\Desktop10.1\Utilities
Under Editor tab, UNCHECK 'Create features using templates'
The Editor toolbar will now look and function like in 9.3.
If you are doing this manually you could try moving the end vertices a specified distance. To go right use positive values to go left use negative values. Have a look at how to move a vertex relative to its current location (delta x,y).