4

I have two shapefiles (blue_polyline.shp and red_polyline.shp). How to subtract blue line from red line and keep the different line(keep the red line in the third figure).


blue_polyline.shp

blue)polyline.shp


red_polyline.shp

enter image description here


Overlay figure

enter image description here

4

It depends on the license that you have. If you have ArcGIS Advanced license, then you can use Symmetrical Difference. Unfortunately, Union tool cannot be used because it works only with polygon geometry not polyline:

All input feature classes and feature layers must have polygon geometry.

If you don't have advanced license, and you have QGIS, then you can use Difference tool from Vector -> Geoprocessing tools -> Difference in QGIS 2.14.15, as follows:

enter image description here

Input polyline:

enter image description here

Difference polyline layer:

enter image description here

Output:

enter image description here

3

What you're looking for in ArcGIS is the Erase tool in the data management toolbox. This tool is only available if you have an advanced license however...

If you don't have access to the Erase tool, read the following workaround: Subtracting Polygons which also works with Polylines - just use a minor buffer on them first, in order to convert them to polygons.

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.