[Qgis-user] Split features tool behavior

Andreas Wicht a.wicht at gmail.com
Thu Jun 1 04:18:50 PDT 2017


Hi Bernhard,

> In my tests only the halves of the part that was split became new features,
> the rest of the mulit-part feature stays multipart, so all the islands would
> stay in the feature and you would only have to merge one half with the
> island multi polygon.

Yes, you are right.

>> For ArcGIS I don't exactly know. It just produces the result which I
>> expect.
>> The result is (using my sample data screenshots) 2 features. The right
>> features (which was cut off) and the left features (multipart polygon
>> of the other half + the part which is in this case a literal island).
>> How it exactly determines the correct relations of the parts, I can't
>> tell you.
>
> Maybe it depends on the direction the splitting line is drawn? This
> approach, however, would only work if the polygons are following the
> right-hand rule which is not the case for all providers [1].
>
> [1] http://postgis.net/docs/manual-2.3/ST_ForceRHR.html

In both GIS the line direction of the digitised splitting  line does
not influence the outcome.
After some more investigating in the ArcGIS behaviour I also found
some disturbing results. Here it can happen that parts on either side
of the splitting geometry are parts of a split off part. This might
actually be a right-hand-rule issue.

>> MapInfo has a more obvious approach. When you split a
>> multipart-feature with a line (2 vertices), it will extend the line to
>> the boundingbox-boundary, and split the feature with a polygon which
>> is constructed by the intersection of the bounding box and the
>> (extended) digitized line. Therefore the new feature which is created
>> will always be the portion which was covered by that polygon. The
>> other half of the feature remains a multipart feature and keeps all
>> parts which lie outside that splitting polygon.
>> When splitting a multipart polygon by a polyline (more than 2
>> vertices) it will always close the polyline automatically and
>> therefore construct the splitting polygon.
>
> If I have a bounding box and a splitting line there are two polygons
> possible: one to the left and one to the right of the splitting line. How
> does MapInfo decide which one to use? Or is this a user's choice? Maybe it's
> the same as I assumed for ArcInfo (right-hand rule).

Exactly. The result will be 2 polygons. The user can't decide. But he
does not have to in this case.
Each intersection of the original feature with one of those two halves
of the bounding box will end up being a multipart feature (given the
fact there are parts in both halves).
Same applies for the polyline split. It will automatically close the
polyline with the shortest connection and therefore you also have 2
"cutting polygons". One which is formed by the polyline and the other
would be the bbbox except the digitised cutting polygon.

Actually this is a quite straight forward approach to this matter,
which is also easy to understand for somebody who has never heard of
e.g. the right hand rule.

>> Chaining those 2 tools manually produces exactly the output I would
>> expect.
>> - I use "Split Parts" and receive the halves which form the invalid
>> geometry
>> - then I use "Split off one part and add it as a new feature" on the
>> part which I want to separate
>> - make sure the primary key is valid and
>> - done
>>
> this sounds like a straight workflow, although changing tools all the time
> seems a bit inconvenient :-)

Exactly. Therefore having this combined in one tool would be a nice addition.
You could have following input flow:
- select "insert name here" tool
- digitise splitting geometry
- split
- click on split part
- further attribute editing

Or use e.g. the MapInfo logic to that.

Andreas



More information about the Qgis-user mailing list