5175 Commits

Author SHA1 Message Date
Juergen E. Fischer
5aecf74e9a saga help fix 2019-02-26 23:17:50 +01:00
Juergen E. Fischer
2f431bc1f3 i18n:
* include processing algorithm descriptions from yaml (with yaml fixes)
* create ui instead of cpp where possible and use -no-ui-lines to avoid
  artificial ever changing line numbers in ts files
* drop old used scripts: create_new_ts.sh, create_new_ts.sh and
  integrate_function_help.pl, update_ts_files.sh
2019-02-26 22:38:53 +01: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
Nyall Dawson
4e04d02293 By default, validity check should treat ring self intersections as invalid
We use the OGC definition of validity to ensure consistent results
with PostGIS, GDAL, etc

Fixes #16418, fixes #21336
2019-02-27 06:05:26 +10:00
Matthias Kuhn
81f0c5ce00
Merge pull request #9241 from m-kuhn/merge-lines-on-dissolve
[processing] Merge lines on dissolve
2019-02-26 07:54:51 +01:00
volaya
2f305c560e [processing] fixed finding grass folder 2019-02-25 08:49:57 +01:00
Matthias Kuhn
7f30680bed
Add test files for dissolve consecutive lines 2019-02-25 08:49:05 +01:00
Nyall Dawson
ec1218314d [processing] Fix "Add geometry attributes" handling of multipoint geom
For multipoints, export the count of geometries only
2019-02-25 07:50:48 +10:00
Bas Couwenberg
371176357b Fix spelling errors.
* cancelation -> cancellation
 * overal      -> overall
2019-02-24 22:39:40 +01:00
Alessandro Pasotti
a9652316af Tiny cosmetic fix: error by 1 on iteration counter text 2019-02-23 15:30:57 +01: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
c1aac3228c [FEATURE][processing] Allow expression variables to be set for a model
This adds a new "Model Variables" dock panel to the model editor, allowing
users to create and set custom expression variables for use in the model.
These variables are available anywhere expressions are (correctly) evaluated
within the model, so can be used as input parameter values for child
algorithms, within data-defined dynamic parameters, etc.

The use case here is for models which use a constant value throughout
multiple steps within the model (e.g. @target_resolution: a target
raster resolution, @max_simplification: a simplification value for
input features coming from different sources, etc), allowing users
one single place to define and edit these constant values (instead
of hunting down and setting them in multiple places throughout the model).

These variables are stored within the model itself, and are not exposed
outside of the model designer dialog.
2019-02-23 05:23:23 +10:00
Rashad Kanavath
9983961ee3 update Otb Algorithm test to use Map Layer instance 2019-02-23 05:20:17 +10:00
Rashad Kanavath
08b4c1ae9c check for layer providers and authid
OTB only supports gdal and ogr providers for now. Maybe memory
provider can be easily supported using some conversion on the fly.
For the moment, we can go with this method. IO Formats in OTB not
using GDAL/OGR (LUM, ONERA) are not supported by QGis. Those can be
treated as simple files.

nyalldawson,  pointed that AUTHORITY id can have types not starting
with 'EPSG:'. Current otb takes just EPSG number and run with it. The
algorithm doesn't know what to with a number which is not EPSG because
it uses Gdal's 'ImportFromEpsg' method AFAIR.

QgsProecessing Exception is raised in both the above invalid cases.
2019-02-23 05:20:17 +10:00
Rashad Kanavath
70be3aae9c add unit-test for passing values other than type str 2019-02-23 05:20:17 +10:00
Rashad Kanavath
9a6a70a0c0 Reset outputpixeltype parameter options 2019-02-23 05:20:17 +10:00
Rashad Kanavath
8afb80e164 [test] new test for OtbChoiceWidget
This can easily go into GuiTests.py but we tend to keep it out due to
usage of create_from_metadata(). All widget in GuiTests uses
create_from_class() which will not work for this special widget
2019-02-23 05:20:17 +10:00
Rashad Kanavath
e26e0981d3 [test] a new test for otb algorithm that used crs 2019-02-23 05:20:17 +10:00
Rashad Kanavath
e7ce84cb22 Use parameterAs methods in OtbAlgorithm
This will accept stuff other than string type if needed by a user.
2019-02-23 05:20:17 +10:00
Rashad Kanavath
5666db2871 pass file names with quotes to otb 2019-02-23 05:20:17 +10:00
Rashad Kanavath
be52385ef2 using parameterAs from qgis api 2019-02-23 05:20:17 +10:00
Rashad Kanavath
0c1de0407a [review] fix issues from code review 2019-02-23 05:20:17 +10:00
Rashad Kanavath
471865afd1 [CI] fix travis test for OtbAlgorithms 2019-02-23 05:20:17 +10:00
Rashad Kanavath
30bcfebb47 [TEST] add test for OTB processing provider
This includes yaml test like SAGA, GRASS and also test for loading
OTB Algorithms
2019-02-23 05:20:17 +10:00
Rashad Kanavath
3b87f7b17f [FEATURE] [needs-docs] integrate OTB provider to processing plugin 2019-02-23 05:20:17 +10:00
Matthias Kuhn
bb78d1c933
Add test for dissolve consecutive lines 2019-02-22 14:12:24 +01:00
Luigi Pirelli
5a96fab775
Merge pull request #8968 from volaya/fix_saga_non_ascii
fixed handling of input filenames with non-ascii characters [processing]
2019-02-21 12:35:49 +01:00
volaya
52546db839 [processing] fixed saga test 2019-02-21 10:11:57 +01:00
volaya
40134d6473 [processing] fixed SAGA command writing and test 2019-02-21 10:05:46 +01:00
Matthias Kuhn
9c0606148d
Adjust test 2019-02-20 19:11:13 +01:00
Alessandro Pasotti
ff9a65c1b4
Merge pull request #9193 from elpaso/bugfix-21270-processing-algrunner-crash
Processing: fix crash in alg runner task with bad scripts
2019-02-20 07:43:50 +01:00
Nyall Dawson
7acfefadad Fix infinite progress when an algorithm could not be created 2019-02-20 13:05:13 +10:00
Panos Mavrogiorgos
c8d3f74f4a [grass7][mac] Use the most recent GRASS version
This is a continuation of:

- #8db3dead87e385f2798356d
- #5c97d22b16320874dbe1

This commit only affects users that have multiple GRASS installations on
their Macs. Using the most recent GRASS version is what we do on Linux too.
2019-02-20 11:14:06 +10:00
Panos Mavrogiorgos
1d8bd004a6 [grass7] Make it easier to subclass "Grass7AlgorithmProvider"
After @Nyalldawson suggestion [1], we've implemented a Processing plugin
that exposes a GRASS Addon [2]. In order to do this we had to subclass
`Grass7AlgorithmProvider` and override `createAlgsList()`.

`createAlgsList()` had to be overriden in order to change the
"description folder" location.

Nyall wrote:

> And if you do it right (and only import existing
> processing grass code, minimising the copy/paste of this code), then
> your provider will automatically inherit any future fixes and
> features added to the main grass provider.

With this commit we convert the `descriptionFolder` to a class attribute
and in this way, subclasses of `Grass7AlgorithmProvider` will no longer
have to override `createAlgsList()` and will be able to continue inheriting
future enhancements.

References:

1. https://lists.osgeo.org/pipermail/qgis-developer/2019-February/056155.html
2. 948820b1c0/estimap_recreation_provider.py (L40-59)
2019-02-20 05:41:47 +10:00
Nyall Dawson
6021683c35 Capitalization 2019-02-20 05:39:04 +10:00
Nyall Dawson
346f33544c [processing] Expose correct expression context in Refactor fields alg 2019-02-20 05:39:04 +10:00
Nyall Dawson
521ebdc973 [processing] Wrappers built off old API can still take advantage of the full widget context 2019-02-20 05:39:04 +10:00
Nyall Dawson
eb335c3973 [processing] Set full context for QgsProcessingAlgorithmConfigurationWidget in modeler config dialogs 2019-02-20 05:39:04 +10:00
Nyall Dawson
e5a416ea11 [processing][gdal] Ensure no filename clashes occur in writeLayerParameterToTextFile 2019-02-19 12:55:15 +10:00
Nyall Dawson
342c093d91 [processing] Use text file for input file list to gdal tile index alg
Avoids too long command being generated with many inputs

Fixes #21296
2019-02-19 12:55:15 +10:00
dulle droid
edbfb0a1df
#21264 bug in saga algorithm python 2019-02-18 16:15:12 +01:00
Panos Mavrogiorgos
5c97d22b16 [grass7] Add support for GRASS 76 on Mac too.
This is a continuation of 8db3dead87e385f2798356d1c3048d2b7df73efd
2019-02-14 00:32:10 +02:00
Nyall Dawson
29fa7b6e7b Fix build, indentation 2019-02-13 07:59:30 +10:00
Nyall Dawson
60a1d6306f Fix some missing expression context variables in processing expression based widgets 2019-02-13 07:59:30 +10:00
Nyall Dawson
d614ff39e7 [processing] Field calculator algorithms should not force an upper limit
on string field lengths

Don't hold back the algorithms because of outdated format limitations!
2019-02-12 12:58:55 +10:00
Juergen E. Fischer
eea4eda6a3 osgeo4w: fix b6293f23c8c (fixes #21210) 2019-02-10 21:31:31 +01:00
Nyall Dawson
f22f182bcf [processing] Buffer algorithm should always export multipolygon layers
We can never predict when a buffer will create a multipolygon output
(e.g. for negative buffer sizes), so ALWAYS export multipolygons

Fixes #21191
2019-02-08 18:53:18 +10:00
Nyall Dawson
7f3640d8a1 [processing] Fix evaluation of linked parameters in batch mode
e.g. missing fields after selecting a layer parameter
2019-02-08 06:38:49 +11:00
Nyall Dawson
06d5b996bf [processing][gdal] Fix polygonize field name is ignored 2019-02-06 04:16:40 +11:00
Nyall Dawson
c6f3d5ff48 [processing][needs-docs] Make Find Projection algorithm simpler to use
We no longer require the seperate CRS parameter, because the extent
parameter contains the CRS information itself. This means the algorithm
is simplified to just picking the layer and drawing the desired area
on the canvas.
2019-02-05 16:55:54 +11:00