Is there a way to automatically delete vertices in line features using a polygon file in ArcGIS so that it wouldn't cut up the line but just straightens the line inside the polygon?
The lines are lines and the box represents a polygon that covers them. I want to delete line vertices that are inside the polygon so the line would be straight inside the polygon boundary like on the illustration.
I use ArcGIS 10.1 but have access to other software also if something offers the solution.
Best Answer
The key is the
difference
method on geometry objects. The following code is far from efficient, since a new update cursor is opened for each polygon. But it has the added benefit of supporting multiple polygons on the same line:I haven't tested it with edge cases, but this should get you started.