From c8d04e9ba4c2452ff33b079ed80794d3b1aa35ef Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Sat, 4 Jan 2025 09:58:50 +0000 Subject: [PATCH 1/3] Indicate vertices order orientation in polygon part and ring geometries fixes #8658 --- .../editing_geometry_attributes.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst index 839b3acdb31..f5d489cf189 100644 --- a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst +++ b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst @@ -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. + 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. + .. index:: single: Digitizing tools; Delete Part @@ -1209,6 +1217,14 @@ as a ring polygon. .. Like many digitizing tools, the |addRing| :sup:`Add Ring` tool adds ring to all .. selected features if any, otherwise all overlapping features are pierced. +.. note:: **Order of vertices in polygon rings** + + 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. + .. index:: single: Digitizing tools; Fill Ring From 6938bbd8395d0adef2abda2efda50adb2abf96d5 Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Sat, 4 Jan 2025 21:28:07 +0100 Subject: [PATCH 2/3] Add steps for drawing ring and remove a fix me (refs qgis/QGIS#50447) --- .../editing_geometry_attributes.rst | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst index f5d489cf189..3b6ac50b640 100644 --- a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst +++ b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst @@ -1207,15 +1207,20 @@ 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. - -.. 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. +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 `. + 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. .. note:: **Order of vertices in polygon rings** From 68d5b585264dcf4e92ca47c7738e7d69fbd0630d Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Mon, 20 Jan 2025 20:05:54 +0000 Subject: [PATCH 3/3] Mention the "force rhr" alg for fixing vertices ordering --- .../working_with_vector/editing_geometry_attributes.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst index 3b6ac50b640..d46514c34c9 100644 --- a/docs/user_manual/working_with_vector/editing_geometry_attributes.rst +++ b/docs/user_manual/working_with_vector/editing_geometry_attributes.rst @@ -1185,6 +1185,8 @@ geometry with the |addPart| :sup:`Add Part` tool. However, every parts of the same multipolygon feature will have their outer vertices ordered following the same direction. + 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 @@ -1230,6 +1232,9 @@ To add a ring: However, every rings of the same (multi)polygon feature will have their vertices ordered in the opposite direction to the outer boundary's. + 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:: single: Digitizing tools; Fill Ring