Wednesday, 16 September 2015

geoprocessing - Extending batch of lines to another object using ArcGIS Desktop?



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?



Answer



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.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...