Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate vertices order orientation in polygon part and ring geometries #9523

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,14 @@ The |addPart| :sup:`Add Part` can also be used to add a geometry to a geometryle
feature. First, select the feature in the attribute table and digitize the new
geometry with the |addPart| :sup:`Add Part` tool.

.. note:: **Order of vertices in polygon parts**

Unlike the OGC standards, QGIS doesn't constrain vertices
of the exterior boundary of a polygon feature to be ordered counterclockwise.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact. However, you can "fix" the case using processing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main point I wanted to highlight in the note is the parts being oriented the same way. I thus added the "fix" tip in another paragraph.

Thus, you can find both directions in a layer.
However, every parts of the same multipolygon feature
will have their outer vertices ordered following the same direction.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can however use the :ref:`qgisforcerhr` algorithm to constrain features of a layer
to have vertices of their outer boundaries ordered in the clockwise direction.


.. index::
single: Digitizing tools; Delete Part
Expand All @@ -1199,15 +1207,28 @@ To delete a part, simply click within the target part.
Add Ring
--------

You can create ring polygons using the |addRing|
:sup:`Add Ring` icon in the toolbar. This means that inside an existing area, it
is possible to digitize further polygons that will occur as a 'hole', so
only the area between the boundaries of the outer and inner polygons remains
as a ring polygon.
You can create ring polygons using the |addRing| :sup:`Add Ring` icon in the toolbar.
This means that inside an existing area, it is possible to digitize further polygons
that will occur as a 'hole', so only the area between the boundaries
of the outer and inner polygons remains as a ring polygon.

To add a ring:

#. Select the feature(s) to modify
#. Activate the |addRing| :sup:`Add Ring` tool
#. Draw a polygon within the selected geometries,
using the aforementioned :ref:`techniques <drawing_methods>`.
A hole appears in the selected geometries.
#. If no geometry is selected when the ring is drawn,
then a hole is added to each of the polygons the ring is drawn over.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, you can add a note indicating that after AddRing, the vertices of the inner rings are oriented in the opposite direction to the exterior ring.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm... Isn't this covered in the note just below?

.. note:: **Order of vertices in polygon rings**

.. FixMe: I think this tool should behave as below
.. Like many digitizing tools, the |addRing| :sup:`Add Ring` tool adds ring to all
.. selected features if any, otherwise all overlapping features are pierced.
Unlike the OGC standards, QGIS doesn't constrain vertices
of the exterior boundary of a polygon feature to be ordered counterclockwise.
Thus, you can find both directions in a layer.
However, every rings of the same (multi)polygon feature
will have their vertices ordered in the opposite direction to the outer boundary's.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can however use the :ref:`qgisforcerhr` algorithm to constrain features of a layer
to have vertices of their outer boundaries ordered in the clockwise direction,
and vertices of their interior rings ordered in the counter-clockwise direction.


.. index::
Expand Down
Loading