Nyall Dawson
3e1c84e07e
Finalize sinks to get proper error reporting when flushing features
...
Fixes #59237
2024-11-12 08:49:18 +01:00
Andrea Giudiceandrea
81fb58f997
[processing] Fix deprecated QgsField constructor
...
Using QMetaType.Type in place of QVariant types for:
- "Check validity" qgis:checkvalidity
- "Climb along line" qgis:climbalongline
- "Add geometry attributes" qgis:exportaddgeometrycolumns
- "Advanced Python field calculator" qgis:advancedpythonfieldcalculator
- "Find projection" qgis:findprojection
- "Distance to nearest hub (line to hub)" qgis:distancetonearesthublinetohub
- "Distance to nearest hub (points)" qgis:distancetonearesthubpoints
- "Concave hull (k-nearest neighbor)" qgis:knearestconcavehull
- "Minimum bounding geometry" qgis:minimumboundinggeometry
- "Distance matrix" qgis:distancematrix
- "Generate points (pixel centroids) along line" qgis:generatepointspixelcentroidsalongline
- "Random points along line" qgis:randompointsalongline
- "Random points in layer bounds" qgis:randompointsinlayerbounds
- "Random points inside polygons" qgis:randompointsinsidepolygons
- "Regular points" qgis:regularpoints
- "Statistics by categories" qgis:statisticsbycategories
- "Text to float" qgis:texttofloat
- "Topological coloring" qgis:topologicalcoloring
2024-09-16 08:48:01 +10:00
Jacky Volpes
ae57030135
Fix global QGIS setting key in check validity algorithm
2024-03-08 09:13:32 +10:00
Nyall Dawson
c16a1e2b3d
Update enums
2024-01-19 19:44:48 +10:00
Etienne Trimaille
3cab3c43a2
Python - Run pyupgrade on the processing plugin
2023-04-24 10:03:57 +02:00
Germán Carrillo
e9fd5f1fe5
[processing] Harmonize tags in processing algorithms related to error finding and fixing
2022-08-22 11:16:07 +10:00
Nyall Dawson
4f56a42275
Fix processing algs
2021-08-04 09:54:32 +10:00
Evan Derickson
0e63799012
Reduce appends
2021-02-20 12:26:00 +10:00
Nyall Dawson
b6a7a10703
Fix some more python formatting issues, remove more flake exceptions
2020-05-11 11:41:50 +10:00
Nyall Dawson
c98cd8d1a8
Partial port of destination wrappers to c++ API
2020-04-02 02:29:54 +10:00
Bas Couwenberg
2628c480c5
Don't include revision in sources.
...
Prevent changes to files that weren't changed between releases.
This eases review of the changes between releases significantly.
2019-05-17 16:47:47 +02:00
Matthias Kuhn
b90a01847f
Prefer parameterAsBoolean over parameterAsBool
2019-04-16 08:30:00 +02:00
Nyall Dawson
cccf974211
[processing] Port enum widget wrapper to new API
...
Fixes:
- enum parameters set to "allow multiple" only allow a single
value selection when used in modeler
- optional enum parameters cannot be set to no value when
used outside of modeler
Fixes #20406
2019-03-08 15:46:59 +10:00
Nyall Dawson
49742c302a
[needs-docs][processing] Add option to check validity alg to ignore self-intersection
...
causing rings errors
By default the algorithm now uses the strict OGC definition of polygon validity, where
a polygon is marked as invalid if a self-intersecting ring causes an interior hole.
If the "Ignore ring self intersections" option is checked, then this rule will be
ignored and a more lenient validity check will be performed.
Refs #16418 , refs #21336
2019-02-27 06:05:26 +10:00
Alessandro Pasotti
001a81bc46
Fix processing algorithm checkvalidity reason
...
Fixex #19617 - Check validity algorithm returns empty reason in attribute table
2018-09-18 16:36:30 +02:00
Nyall Dawson
74b0e910db
[processing] Fix some exceptions
2018-05-16 04:35:17 +10:00
nirvn
5cb8c2523e
[needs-docs][processing] vectorize and improve remaining geometry tools menu icons
2018-05-15 12:10:11 +07:00
Nyall Dawson
5339d62715
[processing] More helpful errors when sources cannot be loaded
...
Include descriptive text with the specified parameter value
in error, and always check that sources were loaded to avoid
raw Python exceptions when they are not
2018-04-28 05:50:47 +10:00
Nyall Dawson
405d8f29d4
[processing] Skip more unnecessary geometry checks
2018-04-10 12:27:46 +10:00
Alexander Bruy
dca37abd0e
[processing] add group id to QGIS algorithms
2017-12-14 18:04:12 +02:00
Nyall Dawson
5b5560aaf9
Set default method for check validity alg
2017-12-03 15:16:17 +10:00
Nyall Dawson
5b05699fc9
Add some tags to check validity algorithm
2017-12-03 14:58:21 +10:00
Matthias Kuhn
e0025b65b1
Rename QgsGeometry::fromPoint to QgsGeometry::fromPointXY
...
Also introduces the from[Geometry]XY for QgsGeometryFactory
2017-10-30 09:14:06 +01:00
Nyall Dawson
ecf7dd5e4f
Update class name
2017-09-16 09:59:13 +10:00
arnaud.morvan@camptocamp.com
53df3699fd
[processing] add ui option useCheckBoxes in CheckValidity
2017-09-16 09:57:13 +10:00
Nyall Dawson
2a442c7886
Rationalise algorithm groups a bit
2017-08-22 23:36:42 +10:00
Nyall Dawson
ebda2fd212
Rename some enum values for clarity
2017-08-19 02:46:22 +10:00
Nyall Dawson
e0fbe3409a
Use ellipsis for isolated strings in plugins too
2017-08-11 04:33:18 +10:00
Nyall Dawson
d92583c10e
Take advantage of auto created outputs in ported algorithms
2017-07-12 07:39:43 +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
f82b41e001
Move an enum to new QgsProcessing class
2017-07-08 20:49:17 +10:00
nirvn
1730bc95d1
[processing] include invalid geometries in check validity alg
2017-06-26 10:53:12 +07:00
Nyall Dawson
81855a715b
Use FastInsert when adding features from processing
2017-06-23 14:34:38 +10:00
Nyall Dawson
99cfb8faf3
Fix processing algs crash when no source features exist
...
Instead we output an empty layer - this may be critical for
multi-step models where there is validly no features present
in a source layer
2017-06-23 13:49:32 +10:00
Nyall Dawson
92397537fe
Check validity outputs counts of valid/invalid features
2017-06-12 07:26:02 +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
f64f74fb63
Fix incorrect import
2017-06-06 13:41:42 +10:00
Nyall Dawson
c1d9d57dd2
First working pure c++ algorithms
2017-06-06 07:41:19 +10:00
Nyall Dawson
4cb7d18b1c
Push parameters into processAlgorithm and related functions
2017-06-06 07:41:19 +10:00
Nyall Dawson
77ab933788
Move alg character definitions to __init__
2017-06-06 07:41:19 +10:00
Nyall Dawson
168f16276c
Remove help related methods from GeoAlgorithm
2017-06-06 07:41:19 +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
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
f84d703234
Add method QgsProcessingUtils::mapLayerFromString
...
Algorithms and other processing code should use this method
(instead of dataobjects.getLayerFromString) to
retrieve layers from a string, as it considers the processing
context and allows resolving strings to temporarily stored layers.
This permits processing models to function correctly when
intermediate results are stored as memory layers. Subsequent
model algorithms can then access these temporary layers as inputs.
All temporary layers will be removed when the context object
is destroyed after the model algorithm is run.
2017-05-02 12:33:04 +10:00
Nyall Dawson
fd2c18ee16
Refactor processing writer to use QgsFeatureSink, and to store
...
temporary output layers in the provided processing context
Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
427c3b1684
Remove vector.features
...
Use QgsProcessingUtils.getFeatures instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
6397386fda
Remove len method from vector.features
...
Use QgsProcessingUtils::featureCount instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
adc7cf0ec2
Add context argument to vector.features
2017-04-26 12:53:35 +10:00
Nyall Dawson
dd4f530cfb
[processing] Pass context argument to processAlgorithm
2017-04-26 12:53:35 +10:00