1328 Commits

Author SHA1 Message Date
rldhont
f5b819fc4c [Tests] Check that GDAL Assign Projection updates QgsRasterLayer info 2020-07-31 14:32:48 +02:00
Nyall Dawson
95bd7b296b [feature][processing] New algorithm "Align points to features"
This algorithm calculates the rotation required to align point features
with their nearest feature from another reference layer. A new field is
added to the output layer which is filled with the angle (in degrees,
clockwise) to the nearest reference feature.

Optionally, the output layer's symbology can be set to automatically
use the calculated rotation field to rotate marker symbols.

If desired, a maximum distance to use when aligning points can be set,
to avoid aligning isolated points to distant features.

Designed for use cases like aligning building point symbols to follow
the nearest road direction!
2020-07-26 09:56:46 +10:00
Alexander Bruy
bc8b55e1f7 add tests 2020-07-08 12:43:51 +03:00
Håvard Tveite
2a786aede2
[feature][processing] Random points in polygons C++ algorithm
Offers the same functionality as the Random points inside polygons
algorithm, and in addition it includes (possible to opt-out) the attributes
from the containing polygon and the ability to specify a seed for the random
number generator.

Could replace the Python algorithm Random points inside polygons, but
this C++ implementation only supports "Points count" ("number of points
for each feature") directly, while "Points density" is supported by allowing the
point count to be data defined (using the polygon area to calculate the
number of points).
2020-07-02 08:25:42 +10:00
Alessandro Pasotti
672d6ec5b2 Fix test: cast to float 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
4304d8636d Fix precision in test 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
50f66ba3cb Increase tolerance when comparing floats in processing tests 2020-06-20 04:30:18 +10:00
Even Rouault
93bc7c2f04 Raster rendering: enable provider-side resampling when available, and reprojection is done 2020-06-20 04:29:36 +10:00
Alexander Bruy
7d58502b3b
Merge pull request #37097 from alexbruy/processing-tests
reduce precision when checking service area test results
2020-06-10 17:09:04 +03:00
Alexander Bruy
de6ec479f0 reduce precision when checking service area test results 2020-06-10 14:44:41 +03:00
Alessandro Pasotti
954ab15276
Merge pull request #37074 from alexbruy/fix-servicearea
fix saving attributes in the service area algorithm
2020-06-10 09:26:59 +02:00
nirvn
5385ae64d4 [processing] Make gdaladdo optional parameters truly optional 2020-06-10 13:13:58 +07:00
Alexander Bruy
18195e2ad0 fix saving attributes in the service area algorithm 2020-06-10 07:44:52 +03:00
Alexander Bruy
072c76747c fix calculating raster size in the TIN and IDW algorithms to maintain
accurate pixel size (fix #31970)
2020-05-29 11:26:22 +03:00
Alexander Bruy
a20fe6f527
Merge pull request #36645 from alexbruy/r-tileset
fix r.tileset Processing GRASS algorithm
2020-05-25 09:04:32 +03:00
Nyall Dawson
97d098884a Fix oriented minimum bounding box calculation is wrong in some cases
Fixes #36632
2020-05-25 13:37:58 +10:00
Alexander Bruy
779bd52a79 add test 2020-05-24 20:39:23 +03:00
Alexander Bruy
53d70ea357 add tests 2020-05-24 08:52:53 +03:00
Alexander Bruy
3a51f93498 fix tests 2020-05-12 20:32:15 +03:00
Alexander Bruy
23ee945b0a update tests and cleanup help file 2020-05-12 13:48:07 +03:00
Nyall Dawson
b6a7a10703 Fix some more python formatting issues, remove more flake exceptions 2020-05-11 11:41:50 +10:00
Martin Dobias
502429a0c0 Add processing test for the vector tile writer alg 2020-05-08 12:55:08 +02:00
Matthias Kuhn
2dafee528b Fix some remaining issues 2020-05-05 23:43:36 +02:00
Matthias Kuhn
9602e0faad Fix imports 2020-05-05 23:36:06 +02:00
Matthias Kuhn
a5f557f085 Fix escaping issues 2020-05-05 23:22:12 +02:00
Matthias Kuhn
f39a5b62fe Fix code issues 2020-05-05 22:39:53 +02:00
Matthias Kuhn
0457875f00 noqa 2020-05-05 22:39:40 +02:00
Matthias Kuhn
a7e0831dcf Code style 2020-05-05 22:38:37 +02:00
Germap
5623229f8c
[processing] Set distanceArea CRS properly in SumLineLengths algorithm
Fix #36135
2020-05-04 06:26:56 +10:00
Alexander Bruy
5d7871fa0c fix tests 2020-04-30 18:52:35 +03:00
Alexander Bruy
9a53837946 add new parameter and hide old one 2020-04-30 07:46:05 +03:00
Nyall Dawson
40db7f9efd [processing] Fix subset string is ignored for vector layers when
running GDAL algorithms

If a subset string is set, we must export the subset of the layer
for use by the GDAL command*

Fixes #35981

* well, we probably **should** just build the gdal command to include
the SQL definition of the subset filter, but that's non-trivial, so
this fix is a good simple solution for now
2020-04-28 19:21:00 +10:00
Håvard Tveite
860645ab42
Offer a per feature, as well as a global minimum distance parameter, for the Random points on lines algorithm (#35793) 2020-04-19 14:21:55 +10:00
root676
4d4a7a4a08 remove old python teststring 2020-04-14 09:20:56 +10:00
Paul Wicks
b73bd58cfb
[FEATURE][processing] New algorithm "Contour Polygons"
With similar functionality to the existing GDAL contour algorithm, but exporting polygon representations of the contours
2020-04-08 08:34:55 +10:00
Nyall Dawson
dac7bd7272 Update test results due to different random algorithm used 2020-03-31 18:22:12 +10:00
Håvard Tveite
c774ade88f
[FEATURE][processing] Add "random points on lines" algorithm
The Random points on lines algorithm supplements the existing "Random points along line" algorithm, and will prove to be more useful to the majority of users than the "original".

Features:

The points are distributed randomly over the lines based on "along the line" distance, meaning that the distribution of the points will be flat over the length of the line (each place on the feature has the same probability of being "hit"). 

The Random points along line, on the other hand, uses a line segment based approach, meaning that the density will depend on the segment length (short segments will have a higher point density than longer ones).
2020-03-31 08:55:47 +10:00
Marco Hugentobler
4cd464059c Revert test gpkg files 2020-03-30 08:26:16 +02:00
Marco Hugentobler
934e30f30e Adapt expected test output 2020-03-27 14:38:32 +01:00
Nyall Dawson
ab4016209a More Travis fixes 2020-03-25 09:42:17 +10:00
Nyall Dawson
ffda225796 Travis fixes 2020-03-25 09:42:17 +10:00
Cédric Traizet
fb419b638d OTB plugin modification for OTB 7.1 2020-03-25 08:22:46 +10:00
lbartoletti
364dc3fd4f
Fix multi split for multilinestring (#34510)
* Fix multi split for multilinestring
2020-03-20 13:23:11 +01:00
Nyall Dawson
dee6f3f30d Add flag to allow a child algorithm's results to prune back the remaining model branches
When an algorithm returns this flag, and after executing it in a model it doesn't set a
certain output which remaining model algorithms depend on, then these branches are
pruned back and don't get executed for the model run.

Allows for creation of algorithms which impact the overall model flow.
2020-03-18 02:52:37 +10:00
Nyall Dawson
a7f33be401 [FEATURE][processing] Add new algorithm "Filter by geometry type"
This algorithm filters features by their geometry type. Incoming
features will be directed to different outputs based on whether
they have a point, line or polygon geometry.

Allows for model creation which responds to different input
layer geometry types by applying different logic depending on the
input geometry type.
2020-03-18 02:52:37 +10:00
Nyall Dawson
8b54d2f06c [processing] Fix conversion of ESRI CRS when running GDAL algorithms under proj 6
Fixes #35123
2020-03-17 16:58:09 +10:00
Nyall Dawson
517aa9667b [processing] Port DestinationSelectionPanel to c++
This is basically a 1:1 port (+some fixes relating to incorrect signal
emissions and many more tests)
2020-03-17 07:24:40 +10:00
gacarrillor
f6ee3e81ce Add 5 tests to remove NULL geometries alg with the remove EMPTY geometries option 2020-03-15 17:37:51 +10:00
Nyall Dawson
1ea60faebd Fix test 2020-03-10 19:10:52 +10:00
gacarrillor
8d2f75da0f Test for Remove Duplicate Vertices alg. (Polygons with duplicates in several holes) 2020-03-09 22:22:37 -05:00