Nyall Dawson
a9f4540081
Remove 'precision' option from spatial relation processing algs
...
Rationale:
- the correct use for this option is unclear, and users are
mistakenly using it as a 'tolerance' option
- it's very likely to generate invalid geometries as a result
of the snapping, causing unreliable results
Given these substantial issues, it's safer to remove this
option and require that users who need the snap to grid
precision change explicitly do this via an extra model
step before running the algorithm.
2017-09-08 16:48:59 +10:00
Nyall Dawson
184899ec30
Port remaining plotly based algs to new API
2017-08-30 07:28:25 +10:00
Nyall Dawson
e33647dc5a
Move OGR processing provider specific methods to GdalUtils
2017-08-14 04:56:24 +10:00
Nyall Dawson
ab079f9d92
ogrConnectionString reuses existing context
2017-08-14 04:56:24 +10:00
Mario Baranzini
78af413dcc
Remove python future compatibility layer
2017-08-07 10:27:15 +02:00
Alexander Bruy
27f4d42b23
[processing] remove unused code
2017-08-01 14:52:25 +03:00
Nyall Dawson
ecaee1a3f2
QgsGeometry::vertexAt now returns QgsPoint, not QgsPointXY
...
Since it's easy to convert from a QgsPoint to a QgsPointXY,
but impossible to recover the Z/M values lost by only
returning a QgsPointXY.
2017-07-28 11:48:50 +10:00
Nyall Dawson
18dd09762b
Remove vector.simpleMeasure
...
It's quite a confusing function - instead use optimised versions
of the measurement calculations in its place
2017-07-27 10:46:53 +10:00
Alexander Bruy
56208540f9
[processing] remove GeoAlgorithmExecutionException
2017-07-13 09:02:24 +03:00
Alexander Bruy
69dab42785
[processing] remove unused version() function
2017-07-13 08:38:22 +03:00
Nyall Dawson
77351fdba4
Update processing.algorithmHelp for new API
2017-07-12 18:33:01 +10:00
Nyall Dawson
1e13d733c2
Move declaration of algorithm parameters/outputs to a new virtual
...
initAlgorithm() method
This allows 2 benefits:
- algorithms can be subclassed and have subclasses add additional
parameters/outputs to the algorithm. With the previous approach
of declaring parameters/outputs in the constructor, it's not
possible to call virtual methods to add additional parameters/
outputs (since you can't call virtual methods from a constructor).
- initAlgorithm takes a variant map argument, allowing the algorithm
to dynamically adjust its declared parameters and outputs according
to this configuration map. This potentially allows model algorithms which
can be configured to have variable numbers of parameters and
outputs at run time. E.g. a "router" algorithm which directs
features to one of any number of output sinks depending on some
user configured criteria.
2017-07-10 16:31:14 +10:00
Nyall Dawson
9d04f87249
Rename "output" style parameters for clarity
...
The previous naming was too easily confused with processing outputs.
Rename them to QgsProcessingParameterFileDestination, etc... to
make it clearer what they are used for.
2017-07-08 20:49:17 +10:00
Matthias Kuhn
875a5d6d9d
Merge pull request #4818 from DelazJ/spelling
...
Fix some spelling issues
2017-07-08 10:20:40 +02:00
Nyall Dawson
d8086e549d
Use c++ method for available sources
2017-07-07 11:35:31 +10:00
Nyall Dawson
26cd6017b8
Use an expression context when evaluating child parameters with expression sources
2017-07-07 11:35:31 +10:00
Nyall Dawson
ac9a39f09a
Fix processing.runAndLoadResults
2017-07-07 09:28:20 +10:00
Harrissou Sant-anna
9e6b8ed59d
Use PostGIS and PostgreSQL spelling when appropriate
2017-07-07 01:26:38 +02:00
Harrissou Sant-anna
6fab688298
Use SpatiaLite right spelling when needed
2017-07-07 01:26:38 +02:00
Nyall Dawson
f98bcb2b81
Update processing.run() for new API
2017-06-27 13:18:22 +10:00
Nyall Dawson
d667bf595f
Move iterator exception handling to c++
2017-06-24 08:15:06 +10:00
Nyall Dawson
81855a715b
Use FastInsert when adding features from processing
2017-06-23 14:34:38 +10:00
Nyall Dawson
5ea07684bd
Also call invalidGeometryCallback when skipping features
2017-06-23 12:08:54 +10:00
Nyall Dawson
a8cdde5232
Add test that python exception is caught when executing an alg
2017-06-23 12:08:54 +10:00
Nyall Dawson
4ea85362f4
Transform errors encountered while iterating features in
...
processing are non-fatal. We report them to users, and treat the
feature as having no geometry, but don't stop execution.
2017-06-23 12:08:54 +10:00
Nyall Dawson
57f2c623ce
Move invalid geometry callback from Python to c++
2017-06-23 12:08:54 +10:00
Nyall Dawson
6be4875a82
Restore symmetrical difference alg
2017-06-22 18:21:16 +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
29f50b72ee
[processing] Catch transform errors in when iterating features
2017-06-12 08:05:32 +10:00
Alexander Bruy
a137a7c0f3
[processing] open help in the default webbrowser to be consistent with
...
the rest of QGIS dialogs
2017-06-06 10:51:22 +03:00
Nyall Dawson
ea2e477d91
Fix failing tests, temporarily disable some processing tests during
...
refactoring
2017-06-06 07:41:20 +10:00
Nyall Dawson
a658135693
Remove global processing use selection setting
2017-06-06 07:41:20 +10:00
Nyall Dawson
f9887aabf5
[processing] Remove more UseSelectionIfPresent use
2017-06-06 07:41:20 +10:00
Nyall Dawson
bdf051a03a
Partially port a trial python alg to new API
2017-06-06 07:41:19 +10:00
Nyall Dawson
28f7a8b7e1
Move expression context generation out of parameters
2017-06-06 07:41:19 +10:00
Nyall Dawson
189f804714
Adapt more code to c++ API
2017-06-06 07:41:19 +10:00
Nyall Dawson
03e40f7497
[processing] Remove all remaining algorithm copies
...
Algorithms are no longer copied - just a single const instance
of each algorithm is used
2017-06-06 07:41:19 +10:00
Alexander Bruy
dc5ba8ffe9
[processing] explisitly load outputs as raster or vector depending
...
on the output type. Don't rely on extension or other indirect attributes
2017-05-26 13:30:23 +03:00
Alexander Bruy
e01b7ef60a
[processing] take in account file extension when loading Processing
...
results (fix #16486 )
2017-05-12 17:28:41 +03:00
Nyall Dawson
06c4dea7ff
[processing] Remove vector.createVectorWriter
...
Use QgsProcessingUtils.createFeatureSink instead
2017-05-07 08:02:54 +10:00
Nyall Dawson
a8a3cc82ed
[processing] Port vector.createVectorWriter to c++
...
This implements an improved version of vector.createVectorWriter
in QgsProcessingUtils. The improved version relies on the
core class QgsVectorLayerImport to create empty layers,
which:
- reduces duplicate code and reuses the mature QgsVectorLayerImport
routines
- avoids manual conversion of field types to destination provider
field types
- potentially allows any writable provider to be used as a feature
sink for algorithms (e.g. output direct to MSSQL/Oracle/db2). This
should work now - it just needs exposing via UI.
2017-05-07 08:02:53 +10:00
Nyall Dawson
b5ae888b60
Merge pull request #4478 from nyalldawson/layer_store
...
Split off map layer storage handling from QgsProject to QgsMapLayerStore
2017-05-06 13:00:05 +10:00
Nyall Dawson
f81971daa4
Fix failing tests
2017-05-03 07:09:44 +10:00
Nyall Dawson
15de36ab26
[processing] Always require real QgsFields objects in getVectorWriter,
...
don't allow arrays of fields as inputs
2017-05-03 06:26:12 +10:00
Nyall Dawson
ee1236f067
[processing] Remove unused options argument from (create/get)VectorWriter
2017-05-03 06:25:30 +10:00
Nyall Dawson
877775d2c0
Remove a bunch of unneeded imports
2017-05-02 14:47:58 +10:00
Nyall Dawson
49c688bbe4
Fix use of QgsProcessingUtils.mapLayerFromString
2017-05-02 13:40:49 +10:00
Nyall Dawson
df1ead5ed4
[processing] Remove vector.spatialindex()
...
Use QgsProcessingUtils.createSpatialIndex() instead.
2017-05-02 13:39:36 +10:00
Nyall Dawson
bde1bf457b
[processing] Remove unused vector.duplicateInMemory() function
2017-05-02 13:29:42 +10:00