Feature request #18436

ArcMap style clipping in QGIS 3.0

Added by eino jaskari about 6 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:Editing
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:26325

Description

Hi,
I'd like to have ArcMap style clipping feature in QGIS 3.0. There is a plugin (https://github.com/demarcog/Clipper) for QGIS 2.xx, but it does not work for 3.xx.
Basically the clipper cuts all intersecting shapes, like overlaying polygons, with the boundaries of a selected polygon. It also DOES NOT create a new file, like the clip-processing tool currently does in QGIS, but instead it manages to modify the layer itself. So if one layer has 5 polygons that overlap, I select one of the polygons and click "clipper -button", other polygons within the same layer are cut with the boundaries of a selected polygon directly within the layer and it does not even ask you to create a new layer. There is also a merger tool build in QGIS, so this just does the opposite - kind of.
Clipper plugin ( https://github.com/demarcog/Clipper ) had some issues with PostGis functionality. It would be grate if QGIS 3.0 had build in clipper that supports all data formats that are supported by the program itself, including PostGis, Oracle, Shapefile, etc...

Selection_342.png (259 KB) Richard Duivenvoorde, 2018-03-14 02:07 PM

p1.JPG - start (33.9 KB) eino jaskari, 2018-03-15 08:32 AM

p2.JPG - added new polygon to the same layer (27.3 KB) eino jaskari, 2018-03-15 08:32 AM

p3.JPG - selected the polygon I just added (24.8 KB) eino jaskari, 2018-03-15 08:32 AM

p4.JPG - used Clipper (similar as reshape of those 3 polygons under the new one) (26.6 KB) eino jaskari, 2018-03-15 08:32 AM

p5.JPG - Shows how original polygons are altered after clip (28.2 KB) eino jaskari, 2018-03-15 08:32 AM

History

#1 Updated by Richard Duivenvoorde about 6 years ago

Well, about 'in layer editing', there is talk about it here:
https://github.com/qgis/QGIS-Enhancement-Proposals/issues/114

I will reference this issue/feature request to it.

#2 Updated by eino jaskari about 6 years ago

Nice to know there is already a talk in place about "in layer editing".
To add to that talk, if for example there was 3 polygons in the layer (polygon A, B, C ). Then one polygon (X) was added to the layer which would cover (overlap) polygon (A) completely and the rest 2 polygons (B, C) only partly. Then I'd like to clip A, B and C with polygon X. Well, B and C would be clipped accordingly to the boundaries of polygon X, but polygon A was completely covered by polygon X. In my opinion if done right, there should be a pop-up window asking if I would like polygon A to be removed completely from the layer while clipping is done, or should it be preserved completely untouched (question would pop-up, if X covered 100 % of A's area). This function was something I always missed even in ArcMap, since sometimes I had no idea if some areas were lost during the clip process. But even if there was no pop-up question, in my personal work completely deleting polygon A in this case would be preferred. In case there was more than 1 polygon about to be deleted while clipping, there should be (delete: "yes"/"no"/"yes to all"/"no to all") options to choose from.

#3 Updated by Richard Duivenvoorde about 6 years ago

Hi, I just tried, but there is already a 'processing algorithem' called 'clip.
That indeed does not do the IN-layer clipping, but loading a simple shape of The Netherlands, draw a big box, (in the NL layer), select the box, and then use 'clip' I got the result as in the image.

Is that about what you want? Except then that you want the original layer to be changed?

#4 Updated by eino jaskari about 6 years ago

Hi,
Here are some example images. So basically the clipper should alter the layer itself (not produce a new layer). In my case I need to add new polygons to existing database and clip the old polygons in the DB with the new one. So I copy-paste the new parcel (polygon) to my layer. After that, I would like to select that new polygon, click "clip" and see how "old" polygons (parcels) are cut with the outer line of my new polygon. Everything that is under my new polygon should be deleted completely with the extent of new polygons outer boundaries. As seen in Pic 5, old polygons are in yellow after the clip and the new polygon now covers partly the areas of old polygons. Parts of those old polygons have been reshaped. So the new polygon does kind of the same thing as "reshape tool", except it deletes features completely left under it. Hope this clarifies a bit what is the function that i need.

#5 Updated by Bernhard Ströbl over 5 years ago

You can use DigitizingTools plugin in the meantime, but be careful: The tool you need is called cut there.

#6 Updated by Jan Lippmann over 5 years ago

This Plugin https://github.com/demarcog/Clipper works now with QGIS 3.x

AND since 3.4 you can use edit-in-place alg's in order to clip features

Also available in: Atom PDF