12 Commits

Author SHA1 Message Date
Nyall Dawson
4fe72dd84f [processing] Add algorithms to filter parts by length/area
These new algorithms "Remove parts by length" and
"Remove parts by area" filter out parts of geometries from
a vector layer, by checking their area or length vs
a minimum size parameter.

If the input geometry is a multipart geometry, then the parts
will be filtered by their individual sizes. If no parts match the
required minimum size, then the feature will be skipped and
omitted from the output layer.

If the input geometry is a singlepart geometry, then the feature
will be skipped if the geometry's size is below the required size
and omitted from the output layer.

Attributes are not modified.
2025-07-10 17:42:30 +12:00
Nyall Dawson
8ea8798c52 Add "concave hull by feature" algorithm
The existing concave hull algorithm is quite restrictive as it
forces operation on an entire layer, which makes it useless eg
to create concave hulls from service area outputs.

Rename the existing one to "concave hull (by layer)", and make
sure all the documentation explains this so its more predictable
for users.
2025-06-02 07:17:39 +10:00
Nyall Dawson
fa80bcfd5d [processing] Port SAGA "Fill Sinks Wang & Liu" to native tool
Based on tickets/stackexchange posts/mailing list activity, this
seems to be a highly in demand tool which is fragile and error
prone when run via the SAGA Processing Plugin.

Port to a native tool to avoid this situation, and give a nice
optimised out-of-the-box tool.

Note that this is functionally a 1:1 clone of the SAGA tool. I've
verified that the outputs match SAGAs outputs, but any bugs
present in the SAGA implementation will also be present here.
2025-05-07 13:35:28 +10:00
Jan Caha
f593da593a
New Algorithm - Mesh Surface to Polygon (#58941)
* new algorithm

* update feedback

* allow cancel during mesh face processing

* allow cancel during mesh faces processing

* fix file names

* fix the speed of the algorithm

* drop not needed imports

* fix issues

* more readable

* add mesh layer

* test case

* simplify to avoid warning

* fix issue

* fix data call

* fix call

* fix expected data

* handle meshes with holes

* add test case

* merge from master

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix translation

* typo

* clone

* delete to avoid memory leak

---------

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-11 16:04:48 +02:00
Nyall Dawson
2890df089d [feature] Add raster zonal min/max algorithm
This algorithm extracts point features corresponding to the minimum
and maximum pixel values contained within polygon zones.

The output will contain one point feature for the minimum and one
for the maximum raster value for every individual zonal feature
from a polygon layer.
2024-11-11 13:01:42 +10:00
Nyall Dawson
a7bd4f3bf2 [processing] Add algorithm to extract min/max pixel from raster
This algorithm extracts extrema (minimum and maximum) values
from a given band of the raster layer.

The output is a vector layer containing point features for
the selected extrema, at the center of the associated pixel.

If multiple pixels in the raster share the minimum or maximum
value, then only one of these pixels will be included in the output.

The algorithm uses raster iterator to remain efficient on huge
rasters, and does not require reading the entire raster to
memory
2024-11-07 10:13:55 +11:00
Loïc Bartoletti
015e06575c [Processing] creategrid: Allow negative overlay
The creategrid algorithm had a limit of 0 to 1000000000.0.
I'm removing this limitation to go beyond this maximum limit, but above all to
allow a negative limit, which in fact allows an empty space
(the opposite of superposition).
2024-06-07 23:27:55 +02:00
Nyall Dawson
2456290168 Add tests 2023-11-02 22:03:20 +10:00
Nyall Dawson
c547f56776 [feature] Add 'DTM Filter (slope-based)' algorithm for filtering a
digital elevation model in order to classify pixels into ground
and non-ground cells

This is a port of the SAGA "DTM Filter (slope-based)" tool to a native
QGIS algorithm.

It also serves as a nice reference algorithm for raster based tools
which operate on a neighbourhood of pixels.
2023-07-13 14:10:00 +10:00
Nyall Dawson
4647cfccef [processing] Add "Keep disjoint results separate" option to buffer
algorithm

If checked, then any disjoint parts in the buffer results will be
output as separate single-part features. This setting is designed
to expose a similar functionality as is available for the 'dissolve'
algorithm.

Sponsored by City of Canning
2023-03-08 18:08:43 +10:00
Alexander Bruy
7743cf4641 fix tests 2022-05-02 15:55:01 +10:00
Alexander Bruy
34a20f8b2d add tests 2022-05-02 15:55:01 +10:00