4265 Commits

Author SHA1 Message Date
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
Denis Rouzaud
2bf92f34f3 sipify analysis raster 2017-06-21 12:08:25 +02: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
Ilya Zverev
391f76b4fc A test for atlas feature extent after rotation 2017-06-18 13:38:54 +03:00
Andrea Aime
f22ee6bee5 Fixes 16712, SLD export of categorized style fails if attribute name conflicts with a built-in function name 2017-06-15 10:09:49 +02:00
Andrea Aime
b64f256e84 Fixes 16707, export of hairline results in a different visual thickness 2017-06-15 10:04:58 +02:00
Nyall Dawson
ee043956b9 Astyle 2017-06-15 17:05:16 +10:00
Nyall Dawson
fc339f9ac5 Add a flag argument to QgsFeatureSink::addFeatures
Flags can be used to control how features are added to the sink.

For now, there's only a single flag available - FastInsert.
When FastInsert is set, faster inserts will be use at the cost
of updating the passed features to reflect changes made at the
provider.

This includes skipping the update of the passed feature IDs
to match the resulting feature IDs for the feature within
the data provider.

Individual sink subclasses may or may not choose to respect
this flag, depending on whether or not skipping this update
represents a significant speed boost for the operation.

QgsVectorLayer always ignores the flag - feature ids are
required for the featureAdded signal to be correctly emitted,
and it's expected that performance critical applications will
add features directly to a data provider instead of
via QgsVectorLayer's edit buffer.
2017-06-15 17:04:27 +10:00
Nyall Dawson
fbd1d00f42 Expand tests for subdivide 2017-06-15 08:18:42 +10:00
Nyall Dawson
e74395d95b [FEATURE] Subdivide algorithm for QgsGeometry
Subdivides the geometry. The returned geometry will be a collection
containing subdivided parts from the original geometry, where no
part has more then the specified maximum number of nodes.
2017-06-14 22:57:20 +10:00
Nyall Dawson
bde0c7267e Expose GEOS clip by rect algorithm via QgsGeometry API
Performs a fast, non-robust intersection between the geometry and
a rectangle. The returned geometry may be invalid.
2017-06-14 22:02:01 +10: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
Matthias Kuhn
41892d3ecf Fix point test 2017-06-14 07:37:31 +02:00
Matthias Kuhn
1808dc9c95 More intuitive QgsPoint python constructors
In python, the wkb type of a QgsPoint will by default be determined from
the provided parameters, where Z and M will be added as required if the
wkbType is Undefined.

    QgsPoint(x, y, z=nan, m=nan, wkbType=QgsWkbTypes.Undefined)

Thanks to the python API support of named parameters, it's also
straightforward to specify z, m and wkbType in any desired combination.

On the other hand, on C++ side it's often preferable to use

    QgsPoint(QgsWkbTypes::WkbType wkbType, double x, double y, double z, double m);

due to the lack of named parameters which make it harder to specify a
specific type and the advantage of typesafety that makes it possible to
verload the first constructor with this one.
2017-06-14 07:37:31 +02:00
Matthias Kuhn
7e487190e8 Add an easy to use Z/M default value constructor to QgsPoint 2017-06-14 07:37:31 +02:00
Denis Rouzaud
abe48bf466 move acceptable missing doc to code_layout tests path 2017-06-13 13:32:17 +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
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
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
rldhont
faa7c750bc Merge pull request #4699 from pblottiere/getlegendgraphic
[Server] WMS GetLegendGraphics refactoring
2017-06-12 09:40:57 +02: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
40cae29228 Merge pull request #4702 from nyalldawson/processing_pt31
More processing goodness, restore algs
2017-06-12 11:17:47 +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
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
Nyall Dawson
10341310c2 Add a provider unit test checking extent after adding/deleting features 2017-06-11 13:02:49 +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