39404 Commits

Author SHA1 Message Date
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
Alexander Bruy
6896548521 Merge pull request #4705 from PedroVenancio/master
[processing] fixes GRASS 7 v.net.alloc (fix #16672)
2017-06-10 20:40:58 +03:00
Nyall Dawson
e839ab1dab Indentation 2017-06-10 19:38:33 +10:00
Nyall Dawson
03bfe9bfbc Use uuid instead of timestamp when generating layer ids
Timestamps can result in duplicate layer ids when layers
are created rapidly or in different threads.

Fix #14390
2017-06-10 19:07:27 +10:00
Nyall Dawson
326e442548 Fix crash when saving vector layer in background task 2017-06-10 18:53:01 +10:00
PedroVenancio
aedb95b1aa Fixes GRASS 7 v.net.alloc #16672 2017-06-10 09:41:05 +01:00
Nyall Dawson
30e145a202 Cleanup and unify text formatting in projection combo box 2017-06-10 18:30:27 +10:00
Juergen E. Fischer
4386be831a spelling fixes 2017-06-10 08:55:07 +02:00
Juergen E. Fischer
afc230c7a5 re-run t2tdoc 2017-06-10 08:38:12 +02:00
Juergen E. Fischer
43fac74738 include expect/unbuffer in INSTALL install list 2017-06-09 19:25:52 +02:00
Juergen E. Fischer
c21846a880 fix install (followup 532b9a14) 2017-06-09 19:23:09 +02:00
Blottiere Paul
7b844837bb [Server] Fonts used in GetLegendGraphics tests are bolded and increased 2017-06-09 12:55:27 +01:00
Blottiere Paul
c1657ac853 [Server] Add/update tests 2017-06-09 12:55:27 +01:00
Blottiere Paul
dae8447b0b [Server] GetLegendGraphics refactoring 2017-06-09 12:55:26 +01:00
rldhont
0489839374 Merge pull request #4700 from sbrunner/service-onlineressource
[Server] WMS Fix the mandatory OnlineResource
2017-06-09 13:52:06 +02:00
Stéphane Brunner
9d9e94e6b9 Fix the mandatory OnlineResource 2017-06-09 13:32:47 +02:00
Stéphane Brunner
2346f59f56 More verbose response 2017-06-09 13:32:47 +02:00
rldhont
f80a1f54ce Merge pull request #4687 from rldhont/server-wms-dxf-writer
[Server] WMS DXF writer refactoring
2017-06-09 12:07:46 +02:00
rldhont
8df3391fc4 [Server] dxf writer refactoring 2017-06-09 10:58:28 +02:00
Denis Rouzaud
00b2d24247 sipiy gui symbology 2017-06-09 10:16:08 +02:00
Denis Rouzaud
58674146af sipify gui effects + layertree 2017-06-09 10:16:08 +02:00
Denis Rouzaud
2454e56b32 sipify gui attribute table 2017-06-09 10:16:08 +02:00
Denis Rouzaud
f5c3b8a1f8 [sipify] fix enum again 2017-06-09 10:16:08 +02:00
Denis Rouzaud
532b9a142a sipify gui part n 2017-06-09 10:16:08 +02:00
Juliusz Hoffman
f677eaf04f consider middle geometry column when retrieving default values (fixes #16685) 2017-06-09 08:15:44 +02:00
Juergen E. Fischer
6326947968 fix 8c873b14 (fixes #16624) 2017-06-09 08:00:12 +02:00
Juergen E. Fischer
5ff6b14fe9 update translation scripts 2017-06-09 08:00:11 +02:00
Nyall Dawson
d4acdac618 Merge pull request #4701 from nyalldawson/processing_pt31
[processing] allow optional feature sink parameters
2017-06-09 14:54:10 +10:00
Nyall Dawson
57a6735810 Merge pull request #4672 from nyalldawson/scale
Unify scale widgets API, pt 1
2017-06-09 14:51:39 +10:00
Nyall Dawson
a8ca3b28ae Port test to new API 2017-06-09 14:26:35 +10:00
Nyall Dawson
8c73bcbcfe [FEATURE] Port CheckValidity alg to new API
Also make outputs optional from the alg - now you can select
which outputs you need for your model!
2017-06-09 14:24:27 +10:00
Nyall Dawson
6b55300fbc If a feature sink parameter is optional and not set, don't create the sink
This adds a lot of flexibility to algorithms, as it makes output
sinks truely optional. For instance, the various "Extract by..."
algorithms could add a new optional sink for features which
'fail' the extraction criteria. This effectively allows these
algorithms to become feature 'routers', directing features onto
other parts of a model depending on whether they pass or fail
the test.

But in this situation we don't always care about these failing
features, and we don't want to force them to always be fetched
from the provider. By making the outputs truely optional,
the algorithm can tweak its logic to either fetch all features
and send them to the correct output, or only fetch
matching features from the provider in the first place (a big
speed boost).
2017-06-09 14:22:29 +10:00
Nyall Dawson
2d2dff9b4a Restore basic stats alg 2017-06-09 13:17:48 +10:00
Nyall Dawson
e413463755 [needs-docs] Use standard scale widgets and terminology for labeling
Also unify API with other scale API.

Fix #16349
2017-06-09 12:46:41 +10:00
Nyall Dawson
b2e102d2f5 Improve API docs 2017-06-09 11:56:14 +10:00