Skip to content
Open
Show file tree
Hide file tree
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we add more space between the different scenarios to help distinguish the different groups? And instead of reading from top to bottom, what about organizing the images from left to right, i.e. rotate -90°.

Question: the feature in the middle has a hole, right? A hole whose vertices touch the outer ring of the polygon? Is this valid?

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
103 changes: 102 additions & 1 deletion docs/user_manual/processing_algs/qgis/vectorgeometry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ Parameters
- Description
* - **Input layer**
- ``INPUT``
- [vector: point]
- [vector: geometry]
- Input vector layer with multipoint features
Comment on lines +1304 to 1305

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You need to review this description as well as the algorithm description. They are outdated because of focusing on multipoint input fetures.

* - **Threshold**
- ``ALPHA``
Expand Down Expand Up @@ -3253,6 +3253,107 @@ Python code
:start-after: **algorithm_code_section**
:end-before: **end_algorithm_code_section**

.. _qgistightconcavehullofpolygons:

Fill gaps between polygons
---------------------------

``Added in 4.2``

Calculates a concave hull for each multi-polygon feature in an input layer.

Unlike the standard Concave Hull algorithm, a tight concave hull is a (possibly)
non-convex polygon containing all the input polygons.
The computed hull fills the gaps between the polygons without intersecting their interiors.
It strictly follows the outer boundaries of the input polygons, allowing you to fill gaps between
them without distorting their original shapes.

It is particularly useful for cases such as generalizing groups of building outlines,
creating 'district' polygons around blocks, or removing gaps and joining disjoint sets of polygons.

The algorithm works by creating a constrained Delaunay Triangulation of the space between
the polygons and removing the longest outer edges until a target criterion is reached.

The input geometry must be a valid Polygon or MultiPolygon (i.e., the individual polygons must not overlap).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I know this sentence is taken from the GUI but something makes me uncomfortable with it:

  • "a valid polygon": is it about individual parts of the expected multipolygon or are single polygons also allowed inputs?
  • individual polygons within the same multipolygons shouldn't overlap?
  • individual polygons from two different multipolygons shouldn't overlap?


.. figure:: img/fill_gaps_between_polygons.png
:align: center

Filling gaps between polygons using ratio values of 0, 0.3 and 1.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As suggested above, turn the images -90°?
And instead of ratio of 0, can we consider the first group as "input features". The ratio=0 output would have had blue hash above, right?



.. seealso:: :ref:`qgisconvexhull`, :ref:`qgisconcavehullbyfeature`

Parameters
..........

.. list-table::
:header-rows: 1
:widths: 20 20 20 40
:class: longtable

* - Label
- Name
- Type
- Description
* - **Input layer**
- ``INPUT``
- [vector: polygon]
- Input vector layer with multipolygon features
* - **Ratio**
- ``RATIO``
- [numeric: double]

Default: 0.3
- Specifies the maximum edge length as a fraction of the difference between the longest and shortest edge
lengths between the polygons. This normalizes the maximum edge length to be scale-free.
A value of 1 produces the convex hull; a value of 0 produces the original polygons.
* - **Allow holes**
- ``HOLES``
- [boolean]

Default: True
- Controls whether the computed concave hull is allowed to contain holes.
* - **Tight concave hulls**
- ``OUTPUT``
- [vector: polygon]

Default: ``[Create temporary layer]``
- Specify the output vector layer. :ref:`One of <output_parameter_widget>`:

.. include:: ../algs_include.rst
:start-after: **layer_output_types**
:end-before: **end_layer_output_types**


Outputs
.......

.. list-table::
:header-rows: 1
:widths: 20 20 20 40
:class: longtable

* - Label
- Name
- Type
- Description
* - **Tight concave hulls**
- ``OUTPUT``
- [vector: polygon]
- The output vector layer containing the tight concave hull
for each input multipolygon feature.

Python code
...........

**Algorithm ID**: ``native:tightconcavehullofpolygons``

.. include:: ../algs_include.rst
:start-after: **algorithm_code_section**
:end-before: **end_algorithm_code_section**



.. _qgisfilterverticesbym:

Expand Down