Is there any simple tool which allows to extend all lines in .shp to another .shp?

To clarify, I do have river.shp and sections.shp on the river. I'd like to produce buffer from river, extend lines in section.shp to the buffer or clip lines if neccesarly (may happend in some cases).

I thought it would be a simple operation, however can't find any tool which would extend my lines. Do I miss something? Any suggestions?

  • Maybe a diagram would help. Not sure how you want to extend them. – CaptDragon Apr 29 '11 at 12:51
  • Good question, the extend line tool just extends lines to other lines in same featureclass. – Kirk Kuykendall Apr 29 '11 at 13:37

With a little scripting via ModelBuilder, I designed a tool that does what you are looking for. In essence, you convert the polygon (ExtendTo layer) to lines, merge the Input and ExtendTo layers, extend the input layer features, then remove all of the ExtendTo features. Because this model uses the "Extend Lines" tool introduced at 10.0, it obviously will not work with previous versions.

You can download the model, take a look at the details and modify if needed. It is loaded on the Esri Geoprocessing Gallery page: Extend Lines To Layer

Please test it out and let me know if you run into any issues. I would be happy to re-work it if necessary.

|improve this answer|||||
  • This looks promissing, however I do use 9.3.1, so this solution will have to wait some time. Thanks anyway, as I'll probably use it in future. – Tomek May 6 '11 at 10:25
  • Extend Lines To Layer link dead.. – SIslam Aug 9 '15 at 11:25
  • 1
    Link updated to new location – RyanKDalton Aug 21 '15 at 16:25

The best method I can think of is to:

  1. Use the Generate Near Table tool (ArcInfo only) to generate XY fields in your TO and FROM features.
  2. Then use XY to Line on the table you make from those XY fields to create lines.
  3. After that, get your merge on.
  4. Finally create a unique identifier you can use to Dissolve the adjacent (probably not the right word, but you get the idea) lines together.

A bit of a runaround, but I think that will get'er done.

|improve this answer|||||
  • I'll have a look in to this method. Look promissing. Thanks. – Tomek May 6 '11 at 10:33

If none of the suggestions work you might consider ET Geo Wizards.
There are many free functions however the PGSW is not free.

There is a function...

Polygon Global Snap Wizard

Snaps the features of a polygon layer to another layer (Point, Polyline or Polygon)


A polygon layer to be snapped A snap layer - point, polyline or polygon Snap tolerance Snap options Outputs:

A polygon feature class - the vertices from the source layer will be moved to snap to the features of the Snap Layer (if within the snap tolerances Options (Snap to What):

Vertices: The vertices of the polygons will be snapped to the nearest vertex of the nearest feature from the Snap layer Nearest edge: The vertices will be snapped to the nearest point of the nearest feature from the Snap layer Vertices & Edges: If there is a vertex closer than the snap tolerance to a vertex of the polygon to be snapped, the point will snap to it, otherwise it will snap to the nearest edge. Notes:

An option for snapping selected features only is available. The resulting dataset will contain all the features of the original layer. Only currently selected features will be used for snapping and eventually snapped. The snap distance should be in the units of the Data Frame The Source and the Snap datasets can have different spatial references as long as the Data Frame has assigned projection and the Geographic Coordinate systems of all the projections are the same. There is no option to insert vertices into the polygons to be snapped as the one available in the Polyline Snap Wizard . This due to the fact that two adjacent polygons (that share a common boundary) might be densified differently and when snapped to result in gaps or overlaps. The following procedure can be used in order to achieve better snapping: Convert the polygons to polylines Clean the resulting polyline dataset Snap the resulting polyline dataset using the Insert Vertices option Build Polygons from the polylines Example:

Before Snap After Snap Option: Vertices After Snap Option: Nearest Edge After Snap Option: Vertices & Edges


|improve this answer|||||
  • It is great tool set, unfortunetly it doesn't do what I need to do. Thanks. – Tomek May 6 '11 at 10:31

If you only have certain sections that need extended you could only select those river segements to buffer. The buffer result polygon could be converted to a polyline. Next, you could update the old section layer with the buffer river layer by using the Erase Tool. Finally, merge or append the new section polyline features with the result of the erased polyline section layer. This should extend your section layer and eliminate the old section lines.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.