Nyall Dawson
f304828f59
Allow storing arbitrary metadata in parameter definitions
2017-06-22 18:18:51 +10:00
Nyall Dawson
0db4cf37fe
Add another test
2017-06-22 07:02:29 +10:00
Nyall Dawson
1d69939dde
Fix build
2017-06-22 06:58:31 +10:00
Nyall Dawson
86f33c682d
Expand model unit test coverage
2017-06-22 06:49:09 +10:00
Nyall Dawson
780f4331cc
Add method to generate temporary destination parameter value
2017-06-22 06:49:09 +10:00
Nyall Dawson
a87ca09e34
Move some temp file/folder utils to c++
2017-06-22 06:48:25 +10:00
Nyall Dawson
e8a03b918b
Move default file extension code to c++
2017-06-22 06:48:25 +10:00
Nyall Dawson
b1879df34b
Destination parameters track whether they support non-file based outputs
2017-06-22 06:48:19 +10:00
Nyall Dawson
47f2cc895c
Fix generation of outputs for models
2017-06-22 06:47:11 +10:00
Nyall Dawson
fe0f2498d4
Fix generation of destination parameters for models
2017-06-22 06:45:21 +10:00
Martin Dobias
415d3e90a6
Use bold font in tests + fix a unit test
2017-06-21 14:54:52 +02:00
Nyall Dawson
c685ec2b30
Add missing tests for vector input parameter, add vector out parameter
2017-06-21 22:13:36 +10:00
Nyall Dawson
0da3652257
Rename some parameter classes for consistency
2017-06-21 22:13:16 +10:00
Nyall Dawson
d3a2f7cd65
Models can now be saved and restored
2017-06-20 19:23:21 +10:00
Nyall Dawson
f21f502a18
Add methods to convert parameter definitions to/from variants
2017-06-20 18:33:46 +10:00
Nyall Dawson
9a2f14b931
First steps to model/save restore in c++
...
Models now save to QVariantMap, using QgsXmlUtils to save to
an xml based format (with extension .model3)
2017-06-20 17:26:57 +10:00
Nyall Dawson
179a377da0
Port more model to c++
2017-06-20 15:31:53 +10:00
Nyall Dawson
1a4a654f8b
Port more model API across to c++
2017-06-20 14:45:13 +10:00
Nyall Dawson
f6358b2118
Begin port of modeler algorithm to c++
2017-06-20 14:45:13 +10:00
Martin Dobias
c9c42169ce
Added unit tests
2017-06-19 16:37:00 +02:00
Martin Dobias
517fefe02a
GUI for configuration of size-based legend for diagrams
2017-06-19 13:16:54 +02:00
Nyall Dawson
b620b6e00e
Add method to QgsGeometryFactory to create a multigeometry
...
from any wkb type
Eg calling QgsGeometryFactory::createCollectionOfType( QgsWkbTypes::PolygonM )
will return a new QgsMultiPolygonV2 with M values.
2017-06-14 21:15:48 +10:00
Matthias Kuhn
37a306e3f2
Fix tests
2017-06-14 07:37:31 +02:00
Matthias Kuhn
21dae496a9
Fix geometry tests for NaN
2017-06-14 07:37:31 +02:00
Nyall Dawson
b45e572500
Add QgsProcessingParameterFolderOuput
2017-06-13 10:58:53 +10:00
Martin Dobias
a8999639c7
API cleanup for legend support in renderers
2017-06-13 00:07:00 +02:00
Nyall Dawson
1be9997dd3
Fix some memory leaks in tests
2017-06-12 20:25:18 +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
60ea095d01
Port calculation of iterating destination to c++
2017-06-12 13:35:17 +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
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
74ce5550ad
Remove duplicate QgsRectangle::unionRect method
...
QgsRectangle::combineExtentWith does the exact same thing
2017-06-12 07:03:08 +10: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
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
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
37f86f5f04
Unify diagram scale API with rest of scale API
2017-06-09 10:34:34 +10:00
Nyall Dawson
b07726592c
Flip remaining scale API from real to denominators
2017-06-09 09:12:42 +10:00
Nyall Dawson
9f71156a13
Merge pull request #4678 from nyalldawson/layer_scale
...
Swap QgsMapLayer min/max scale API definitions (unify scale api, pt 2)
2017-06-09 07:44:01 +10:00
Martin Dobias
2964c33d63
Reshape tool: use default Z value for 3D geometries
2017-06-08 21:56:21 +02:00
Martin Dobias
9cd3ef02ac
Use invalid CRS as default in map settings
...
I have got caught by the default set to WGS 84 when I loaded a layer
in projected CRS, set extent to layer's extent and... nothing got rendered
because map renderer was reprojecting to WGS 84.
This default is closer to the default in 2.x where reprojection is turned off.
2017-06-06 15:06:01 +02:00
Nyall Dawson
c1d35a043b
Port getHTMLOutputsCount to c++ API
2017-06-06 15:39:54 +10:00
Nyall Dawson
1f0a3d9719
Add file based and HTML outputs to c++ API
2017-06-06 15:36:39 +10:00
Nyall Dawson
a27c22d9b1
Add raster layer output parameters
2017-06-06 14:38:24 +10:00
Nyall Dawson
e6a71ab5fc
Allow direct map layer parameter/default values were appropriate
2017-06-06 14:33:06 +10:00
Nyall Dawson
b75a174780
Rename QgsProcessingFeatureSinkDefinition to QgsProcessingOutputLayerDefinition
...
Since it also applies to raster layer outputs, we need a more generic name
2017-06-06 13:43:55 +10:00
Nyall Dawson
39d20a4cb4
Move algorithm expression context generation to QgsProcessingAlgorithm
...
Fix error when selecting "from expression" in algorithm parameter dialog
2017-06-06 11:25:09 +10:00
Nyall Dawson
607fed8c48
Restore ability to save outputs directly to Spatialite/PostGIS providers
2017-06-06 10:34:57 +10:00
Nyall Dawson
77072b15ac
Rename QgsProcessingFeatureSink to QgsProcessingFeatureSinkDefinition
...
For consistency with QgsProcessingFeatureSourceDefinition
2017-06-06 08:42:48 +10:00
Nyall Dawson
81da209bf5
Use a QgsProject pointer instead of bool loadIntoProject
...
Allows potential future use case of loading results into
a different open project
2017-06-06 08:40:23 +10:00
Nyall Dawson
72be86dc61
Only accept QgsPropertys in QgsProcessingFeatureSourceDefinition/
...
QgsProcessingFeatureSink, not all QVariant types
Only strings/QgsPropertys are valid anyway, so instead of strings
use static properties. This makes it clearer what possible
values are permitted for the underlying source/sink definition.
2017-06-06 08:25:03 +10:00