84 Commits

Author SHA1 Message Date
Denis Rouzaud
631c7016db
scope enum for QgsProcessing::LayerHint (#9639) 2019-03-27 17:23:36 -05:00
Denis Rouzaud
375a0aa253 create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
the enum is moved out of the class
this will allow forward declaration more easily since the enum is not nested in the class
2019-03-24 21:40:33 -05:00
Nyall Dawson
a38e9e66fc [processing] Fix layerName= suffix is incorrectly passed to SAGA algorithms
Fixes #21569
2019-03-18 18:24:02 +10:00
Víctor Olaya
13bff9620c [processing] do not allow using unsupported file formats
Show warning message if user selects incompatible output file format

fixes #21089
2019-02-23 05:24:56 +10:00
Nyall Dawson
37774f9aa9 [processing] Add util to convert QVariant value to Python literal 2019-02-01 17:54:28 +11:00
Peter Petrik
e71660215c [processing] add QgsProcessingParameterMeshLayer parameter 2018-12-17 11:50:53 +01:00
Matthias Kuhn
229c617785
Ignore FID field when merging vector layers to geopackage 2018-10-31 10:27:54 +01:00
Nyall Dawson
308d7136b4 [processing] More fixes to convertToCompatibleFormat, lots of unit
tests

Fixes #19938
2018-09-28 14:25:38 +10:00
Nyall Dawson
737ab3069a [processing][gdal] Correctly handle geopackage paths with layername argument
Fixes #19938
2018-09-28 14:25:38 +10:00
Nyall Dawson
e2082a0935 [processing] Fix modeler help/description generation, allow setting
of model short description text

Fixes #18767
2018-09-26 04:26:49 +10:00
Nyall Dawson
17567ee5aa [processing] Never run feature validity check for point layers
Saves a few cycles. The feature validity checks have no meaning
for point layers.

Refs #19919
2018-09-25 05:21:12 +10:00
Matthias Kuhn
17279a42e2 Only include qgsvectorlayer.h where required 2018-09-05 08:54:11 +02:00
Nyall Dawson
0b4694fbee More efficient case insensitive string comparison 2018-09-05 07:54:35 +10:00
Nyall Dawson
4930061b21 [processing] Fix incorrect OGR warnings when loading raster layer results
Fixes #19597
2018-08-16 06:37:18 +10:00
Alexander Bruy
c515a666b2 [processing] fix typo 2018-08-13 15:25:23 +03:00
Nyall Dawson
41825cab1b [processing] Also accept QgsProcessingOutputLayerDefinition for
layer input values

Since these may result from the output of an earlier child algorithm running
in a processing model.

Fixes #19372
2018-07-12 10:14:03 +10:00
Nyall Dawson
ead18fc488 [processing] Fix managled paths in history which contain '\' chars 2018-07-02 10:23:01 +10:00
Matthias Kuhn
ae6bffde24
Update to QgsProcessingFeatureSource::hasFeatures 2018-06-26 11:22:34 +02:00
Matthias Kuhn
1b15e68f64
Add minimal smartness for QgsProcessingFeatureSource::hasFeatures 2018-06-22 14:41:42 +02:00
Nyall Dawson
f6416a1990 [processing] Fix missing vector inputs when run in batch mode
Fix incorrect definition of compatibleVectorLayers, which was
using layer WKB type values instead of processing source types.
2018-06-01 15:55:11 +10:00
Martin Dobias
091ed912ab Move fieldNamesToIndices() and indicesToFields() to QgsProcessingUtils 2018-04-26 10:34:30 +02:00
Peter Petrik
50422a1165 [FEATURE] QgsMeshLayer part 1: Reading raw mesh
Introducting MDAL, QgsMeshLayer, mesh data providers (mesh_memory, mdal)
to read and visualize raw meshes: vertices and faces. Support dragging
2dm files from browser on canvas to visualize 2dm meshes.
Support for QgsMeshLayer in Python API.
2018-04-19 10:50:33 +02:00
Nyall Dawson
84cdd609ab [processing] Fix invalid filenames are used for temporary files
during models

Fixes #18263
2018-03-05 12:06:50 +11:00
Nyall Dawson
1f3ee0501a [processing] Always report errors if features cannot be written
to a destination

Before we silently ignored these - now algorithms will automatically
push errors to the log if a feature cannot be written to a sink (no
changes to algorithms or special handling required)
2018-02-17 19:10:46 +11:00
Nyall Dawson
5c40975fe7 [processing] Don't replace " with ' when handling layer paths
Since netcdf, and possibly other gdal drivers, use layer uris
of the format NETCDF:"/tmp/test.nc":var1 we can't safely
remove or reformat these quotations.
2018-02-15 16:43:21 +10:00
Nyall Dawson
2682a74a1b Fix clazy pass big type by ref, small by value warnings 2018-02-02 19:52:01 +11:00
Nyall Dawson
22de251156 [processing] Correctly supress CRS selector dialog when testing
input layer validity

TODO: we NEED a non-hacky way to supress this dialog and allow
invalid CRS for layers!

Fixes #17948
2018-01-30 06:15:32 +11:00
Nyall Dawson
86d9492372 Remove context-unaware QgsCoordinateTransform constructors from Python bindings
This forces Python code and plugins to become datum transform
aware, and given that upgrading python code is easy (just
add QgsProject.instance() as a new argument to the constructor)
it's relatively painless to force this on PyQGIS users.

Also fix upgrade the easy QgsCoordinateTransform c++ constructors
where the project is available, or where using QgsProject::instance()
is safe to do.

For others, just avoid the deprecated warnings until we can
get access to the correct project instance where the transform
is being constructed.
2017-12-15 14:13:22 +10:00
Nyall Dawson
3a5caaf94c Add missing proxy calls for QgsProcessingFeatureSource, causing
inefficient base class methods to be used instead.
2017-12-08 15:05:56 +10:00
Nyall Dawson
3d307b4109 Improve name of memory layers output from processing 2017-11-27 06:38:21 +11:00
Matthias Kuhn
916c9c4cdb Open heart surgery on expression context for processing sources 2017-11-24 16:09:05 +01:00
Matthias Kuhn
abe1a9b661 Expression context creation for processing improvements
Hiding away the implementation directly in QgsProcessingFeatureSource

See discussion ec97102bc6 (r152903378)
2017-11-24 16:09:05 +01:00
Nyall Dawson
0a092cc38a [processing] Throw an exception when sinks cannot be created
Gives users debugging information messages on why the layers could
not be created

Also allow overwriting existing layers in geopackage outputs
2017-11-24 09:31:50 +10:00
Nyall Dawson
59d55fc44c [processing] Ensure correct sublayer is loaded when saving output
to destination with multiple sublayers
2017-11-24 09:31:50 +10:00
Nyall Dawson
f7a317be78 [processing] Fix saving outputs to non-file formats 2017-11-24 09:31:50 +10:00
Matthias Kuhn
851adb0a3d Allow adding sources to processing expression context 2017-11-23 15:24:40 +01:00
Nyall Dawson
ba62ffce2c Make constructors for QgsVectorLayer and QgsRasterLayer more flexible
...by moving extra arguments to new LayerOptions structs. This allows
us to more easily add new layer constructor options without making
the API cumbersome to use.
2017-11-09 14:28:51 +11:00
Harrissou Sant-anna
2614ca1a96 Remove trailing spacing and punctuation in ui items 2017-10-27 01:43:26 +02:00
Etienne Trimaille
fb4e84a052 allow pipe character in filepath in processing 2017-10-25 00:49:00 +02:00
Jachym Cepicky
28daa1a0e0 Adding more default SHP->GPKG changes 2017-10-19 15:45:04 +02:00
Nyall Dawson
b27382d011 [processing] Fix history doesn't correctly escape values
Fixes #17229
2017-10-03 19:01:13 +10:00
Nyall Dawson
a87d352bd7 Run clang-tidy modernize-use-default-member-init to move member
initialization to headers (c++11 style)
2017-09-27 05:02:34 +10:00
Nyall Dawson
31c1ae1c6a Add missing QStringLiterals 2017-09-25 17:12:03 +10:00
Nyall Dawson
c41dca937c Port processing combineFields to c++ 2017-09-22 15:19:32 +10:00
Nyall Dawson
f1ac0be867 Fix processing setting to use filename as layer name 2017-08-19 00:56:18 +10:00
Nyall Dawson
c7affb3b70 Use const references to options instead of pointers in QgsVectorLayerExporter
The use of pointers make ownership of the argument confusing, and there's
nothing stopping us just using an empty map as the default value instead.
2017-08-17 19:26:57 +10:00
Nyall Dawson
b7ae44fb30 Move method to evaluate a variant to a feature source to QgsProcessingUtils 2017-07-13 20:51:47 +10:00
Nyall Dawson
eb0c3015f9 Push minimumValues/maximumValues up to QgsFeatureSource base class
Allows these methods to be called on feature sources
2017-07-13 20:07:33 +10:00
Nyall Dawson
9e184feaed Add method to evaluate parameters to compatible vector layers
of a specified type
2017-07-08 20:49:17 +10:00
Nyall Dawson
e2e829cacf Fix generation of temporary processing filenames 2017-06-27 12:33:05 +10:00