39438 Commits

Author SHA1 Message Date
Luigi Pirelli
ac1a579b42 adapted to the return value as QgsGeometry() 2017-06-12 17:38:26 +02:00
Luigi Pirelli
e5e887f66a more QgsPointXY 2017-06-12 16:12:36 +02:00
Alexander Bruy
22b7498cf8 more QgsPoint -> QgsPointXY fixes 2017-06-12 16:09:25 +02:00
Luigi Pirelli
44c6560221 typo 2017-06-12 16:09:25 +02:00
Luigi Pirelli
008cc79d9f added check if no gemetry is available 2017-06-12 16:09:25 +02:00
Luigi Pirelli
fdd5a50cb5 avoid control on all geometries if one fail 2017-06-12 16:09:25 +02:00
Luigi Pirelli
87116abd72 fix Postgis Merge selected features regression: port 3.0 fixes #15741 2017-06-12 16:09:25 +02:00
Nyall Dawson
1be9997dd3 Fix some memory leaks in tests 2017-06-12 20:25:18 +10:00
Denis Rouzaud
82cfc31870 avoid python signature overloads to handle NaN default values 2017-06-12 11:35:16 +02:00
Denis Rouzaud
2eb3e64803 [sipify] properly handle python signatures 2017-06-12 11:35:16 +02:00
rldhont
faa7c750bc Merge pull request #4699 from pblottiere/getlegendgraphic
[Server] WMS GetLegendGraphics refactoring
2017-06-12 09:40:57 +02:00
Nyall Dawson
492ad2db08 Merge pull request #4715 from nyalldawson/processing_pt31
[processing] Bring back iterating mode for algorithms
2017-06-12 16:32:34 +10:00
Nyall Dawson
63611b1d8f Port script code functions to c++ classes
Restore logging executed algorithms
2017-06-12 15:59:56 +10:00
Nyall Dawson
5177c7d181 Add a more descriptive tooltip for iterate mode button 2017-06-12 13:39:42 +10:00
Nyall Dawson
4b81630aa6 More responsive feedback when using iterate mode 2017-06-12 13:39:33 +10:00
Nyall Dawson
b9e0b46f9f Fix running algorithms in iterating mode 2017-06-12 13:35:31 +10:00
Nyall Dawson
60ea095d01 Port calculation of iterating destination to c++ 2017-06-12 13:35:17 +10:00
Nyall Dawson
40cae29228 Merge pull request #4702 from nyalldawson/processing_pt31
More processing goodness, restore algs
2017-06-12 11:17:47 +10:00
Nyall Dawson
277926047b Respect dissolve setting in c++ buffer alg 2017-06-12 10:47:46 +10:00
Nyall Dawson
15b30124c1 Hide qgis scripts for now (non-functional) 2017-06-12 10:39:57 +10:00
Nyall Dawson
d8302a26f2 Fix feature source widget returns source even when not set 2017-06-12 10:38:40 +10:00
Nyall Dawson
c52e6a72ba Fix raster layers showing as input choices for vector algs 2017-06-12 10:35:22 +10:00
Nyall Dawson
36ce8d15bc Port clip alg to c++
Rough benchtests reveal it's about 25% faster then the python
version
2017-06-12 10:27:49 +10:00
Nyall Dawson
0ceeb297f8 Merge pull request #4706 from nyalldawson/id
Use uuid instead of timestamp when generating layer ids
2017-06-12 10:21:09 +10:00
Nyall Dawson
d89b160429 Native c++ dissolve alg 2017-06-12 09:16:34 +10:00
Nyall Dawson
9f018e67e2 Fix handling optional multiple table field parameter with no fields set 2017-06-12 09:16:10 +10:00
Nyall Dawson
b40f409de2 Nicer formatting for log in algorithm dialog 2017-06-12 08:31:37 +10:00
Nyall Dawson
29f50b72ee [processing] Catch transform errors in when iterating features 2017-06-12 08:05:32 +10:00
Nyall Dawson
bc9b1b64f9 Astyle 2017-06-12 07:28:36 +10:00
Nyall Dawson
92397537fe Check validity outputs counts of valid/invalid features 2017-06-12 07:26:02 +10:00
Nyall Dawson
355549ad19 Avoid creating unused sinks 2017-06-12 07:26:02 +10:00
Nyall Dawson
e49cc78674 Make html output in basic stats algorithm optional 2017-06-12 07:26:02 +10:00
Nyall Dawson
cb41ef1adc Output useful logging when running algorithms from toolbox
Now outputs the input parameters, execution time, and results
2017-06-12 07:26:02 +10:00
Nyall Dawson
1d6d4be556 Correctly reject algorithm dialog
Algorithm dialog was not being rejected when close button was
called (only hidden), leading to old dialogs and widgets
hanging around forever...
2017-06-12 07:26:02 +10:00
Nyall Dawson
aa544a14c0 Only use a temporary feedback object when running algorithms
Otherwise canceling a run causes all future runs to be canceled
2017-06-12 07:26:02 +10:00
Nyall Dawson
2d2c229332 Port checkInputCRS to c++, and allow algorithms to flag when they
require all input layers to be in the same CRS

The default behaviour is to assume that algorithms are well behaved
and can handle multi-CRS inputs, but algs have the option to
flag that they do not allow this and require the input CRS check.

Those algs should document that they require all inputs to have
matching CRS - processing 3.0 behaviour is to assume that algs
can handle this.
2017-06-12 07:26:02 +10:00
Nyall Dawson
386c4246b2 Merge algorithm reprojects layers so that all features are
in CRS of first input layer
2017-06-12 07:26:02 +10:00
Nyall Dawson
5ba0b5cd83 Port merge alg to new API 2017-06-12 07:26:02 +10:00
Nyall Dawson
ea18e8e9db Resurrect grid polygon algorithm 2017-06-12 07:26:02 +10:00
Nyall Dawson
d8260b8c47 [FEATURE] Port Extract by Expression to new API, allow saving
non matching features to separate output
2017-06-12 07:26:02 +10:00
Nyall Dawson
a6a3027ea6 [processing] Clip alg allows mask in different CRS to clipped layer 2017-06-12 07:26:02 +10:00
Nyall Dawson
dd0bb8c161 Merge pull request #4713 from nyalldawson/rect_api
Remove duplicate QgsRectangle::unionRect method
2017-06-12 07:25:38 +10:00
Nyall Dawson
74ce5550ad Remove duplicate QgsRectangle::unionRect method
QgsRectangle::combineExtentWith does the exact same thing
2017-06-12 07:03:08 +10:00
Nyall Dawson
10341310c2 Add a provider unit test checking extent after adding/deleting features 2017-06-11 13:02:49 +02:00
Nyall Dawson
6a87889efc Don't wastefully recalculate memory provider extent after every
feature addition

Previously, the memory provider would automatically recalculate
the extent of the layer after new features are added by
looping through the entire set of existing features and calculating
the bounding boxes. This is very wasteful, as many code paths
add features one-by-one, so with every new feature added to
the provider every existing feature is iterated over. This caused
memory layers to slow to a crawl after many features are added.

This commit improves the logic so that IF an existing layer
extent is known, then it's updated on the fly as each individual
feauture is added. Instead of looping through all features, we
just expand the existing known extent with the added features
bounds. If the extent isn't known, we just invalidate it
when adding/deleting/modifying features, and defer the actual
extent calculation until it's next requested.

Makes memory layers many thousands of magnitudes of orders faster
when adding lots of features (e.g. when memory providers
are used as temporary outputs in processing)
2017-06-11 13:02:49 +02:00
Nyall Dawson
be2ec2f1a7 Fix running processing algs through locator 2017-06-11 20:54:03 +10:00
Nyall Dawson
f5a0243c9d Scroll to newly added entries in paletted renderer widget 2017-06-11 20:36:43 +10:00
Nyall Dawson
ad6c46ffe0 When using destination CRS in a feature request and a transform
exception occurs, clear the feature's geometry before returning

We never want to return features with mixed CRS geometries.
2017-06-11 20:08:50 +10:00
Matthias Kuhn
31162adf79 followup cc877c39: fix build 2017-06-11 10:13:05 +02:00
Matthias Kuhn
cc877c39eb No more QgsGeometry pointers in the public API
Geometries are passed as const reference and returned by value.
This make using the API easier and reduces the risk of ownership
problems.

The overhead is minimal due to implicit sharing.

Fix https://github.com/qgis/qgis3.0_api/issues/68
2017-06-11 09:13:16 +02:00