1377 Commits

Author SHA1 Message Date
nirvn
4a4ffa4c1b [processing] fix grass/grass7 installation check 2016-11-15 09:27:22 +07:00
Nyall Dawson
29d33b47fe [processing] Polygons to line fixes
- Maintain Z/M values
- Handle curved geometries without segmentizing
- Retain null geometries
2016-11-15 09:43:45 +10:00
Alexander Bruy
6e9631ea87 Merge pull request #3701 from alexbruy/processing-ogr-tests
[processsing] tests for GDAL algorithms
2016-11-14 11:05:51 +02:00
Nyall Dawson
880647e50e Add some tags to algorithm 2016-11-14 15:52:41 +10:00
Nyall Dawson
b44093914b Fix test failure, report distance from pole 2016-11-14 15:52:41 +10:00
Nyall Dawson
d6f09c012e [FEATURE] Add method to calculate pole of inaccessibility for polygons
Implements a method in QgsGeometry and a processing algorithm to
calculate the pole of inaccessibility for a surface, which is the
most distant internal point from the boundary of the surface. This function
uses the 'polylabel' algorithm (Vladimir Agafonkin, 2016), which is an iterative
approach guaranteed to find the true pole of inaccessibility within a specified
tolerance. More precise tolerances require more iterations and will take longer
to calculate.
2016-11-14 15:52:41 +10:00
Martin Dobias
d729951dcd Remove caching of WKB from QgsGeometry (was kept just for compatibility)
Also improves the API to export/import WKB as QByteArray
2016-11-14 13:36:12 +08:00
Nyall Dawson
3ef7b3b7eb [processing] Use standard QGIS projection selection widget for CRS params 2016-11-13 20:34:35 +10:00
Alexander Bruy
2287230f0f [processing] fix parameter definition in offset curve algorithm 2016-11-12 13:31:45 +02:00
Alexander Bruy
b6d5f35be2 [processing] cleanup OGR dissolve algorithm code
Avoid double extensions when creating temp files
2016-11-12 13:31:44 +02:00
Alexander Bruy
85d1fd720b [processing] cleanup test data 2016-11-12 13:31:44 +02:00
Alexander Bruy
652addb507 [processing] don't pass layer name when '-sql' parameter is used 2016-11-12 13:31:44 +02:00
Alexander Bruy
e1ee477c40 [processing] use numeric parameter for buffer distance 2016-11-12 13:31:44 +02:00
Alexander Bruy
02ed0aa628 [processing] fix OGR offset curve and one-side buffer 2016-11-12 13:31:43 +02:00
Alexander Bruy
5991eccb47 [processing] simple test for ogr buffering 2016-11-12 13:31:42 +02:00
Nyall Dawson
132e76a596 [FEATURE][processing] New input type for expressions
This adds a new input type for expression inputs. Expression
inputs can be linked to a parent layer so that the builder
shows the correct fields and layer variables.

It's designed for two use cases:

1. to be used when an algorithm specifically requires an expression,
eg Select by Expression and Extract by Expression.

2. to be potentially used as a replacement input instead of string
or number literals in algorithms. Eg - if the simplify algorithm
tolerance parameter was replaced with an expression paremeter, then
this expression would be evaluated for every feature before
simplifying that feature. It would allow parameters to be calculated
per feature, as opposed to the current approach of calculating
a parameter once before running the algorithm. It would also
mean algorithms like "variable distance buffer" would no longer
be needed, as a single "buffer" algorithm could then be used
for either a fixed distance, field based, or expression based
distance.
2016-11-11 13:26:31 +10:00
Alvaro Huarte
dc800dbab7 Fix iteration of features 2016-11-11 00:28:27 +01:00
Alexander Bruy
51a56573c5 Merge pull request #3727 from arnaud-morvan/processing_ogr2ogr_defaults
[processing] fix Ogr2OgrToPostGisList algorithm
2016-11-10 11:45:56 +02:00
volaya
72fddb8b5e Merge pull request #3470 from arnaud-morvan/refactor_fields_context_generator
[Processing] Fix processing refactor fields algorithm using expression context generators
2016-11-08 10:45:32 +01:00
volaya
7c4e66b360 Merge pull request #3726 from arnaud-morvan/processing_various_fixes
[processing] small fixes
2016-11-08 10:30:06 +01:00
Nyall Dawson
3550cc99a6 [processing] Allow algorithms to specify tags
Tags are used while searching in the toolbox. This should help with
finding algorithms when the exact name is not known, eg
you could search for "envelope" or "bounds" and find the
'Polygon from Layer Extent' algorithm.

At the moment it's quite hard to discover algorithms which exist
when you don't know what their called and have to instead search
for every possible naming variant which could exist...
2016-11-08 10:15:31 +10:00
Nyall Dawson
4e4bb2bf6b Merge pull request #3728 from nyalldawson/open
Cleanup processing file handling
2016-11-07 13:20:13 +10:00
Nyall Dawson
8acc286b0f [FEATURE] Snap to layer algorithm accepts a mode parameter
With a new option to prefer to snap to closest point on geometry.
The old behaviour was to prefer to snap to nodes, even if a node
was further from the input geometry than a segment. The new option
allows you to snap geometries to the closest point, regardless
of whether it's a node or segment.
2016-11-07 12:20:59 +10:00
Nyall Dawson
dae0a01761 [FEATURE][processing] Snap geometries algorithm allows snapping
to other layer types, supports point/line layers

Fix #14791, #15313
2016-11-07 12:20:59 +10:00
Nyall Dawson
c3a978b9da [FEATURE][processing] Snap geometries to layer algorithm
Port the Geometry Snapper plugin across to the analysis lib, and
expose to python bindings

Add a new algorithm which performs the snapping to layers
2016-11-07 12:20:59 +10:00
Nyall Dawson
0484769b7d [processing] Use subprocess.DEVNULL instead of open(os.devnull) 2016-11-07 12:13:18 +10:00
Nyall Dawson
6a99017bf0 [processing] Use with ... when opening files 2016-11-07 11:36:38 +10:00
Nyall Dawson
eefa7115bf [processing] Fix invalid geometries made by densify when input geom is null 2016-11-07 09:22:50 +10:00
arnaud.morvan@camptocamp.com
78236c0be1 Use contextGenerator in refactor fields algorithm 2016-11-06 18:11:15 +01:00
arnaud.morvan@camptocamp.com
a6a09d9ae2 [processing] Fix Ogr2OgrToPostGisList with 8798c42339 and 3472ac80d8bd 2016-11-06 15:25:11 +01:00
arnaud.morvan@camptocamp.com
01941176c5 [processing] Log gdal calls 2016-11-06 15:21:39 +01:00
arnaud.morvan@camptocamp.com
93be141af5 [processing] Fix import error in FieldsMappingPanel 2016-11-06 13:03:06 +01:00
Alexander Bruy
8b3c39a220 [processing] add missed description files for OTB 5.4.0 2016-11-03 16:58:18 +02:00
nirvn
03e29d4f01 [processing] optimise singlepart to multipart algorithm
- keep z/m/curved geometries intact
- rewrite loop to avoid the cost of nb. feature x unique values
2016-11-03 09:05:31 +07:00
Nyall Dawson
a44ea22880 Small refinement to multipart to singlepart alg 2016-11-03 05:40:11 +10:00
Alexander Bruy
5d877fd888 Merge pull request #3707 from nyalldawson/multipart_to_single
[processing] optimise multipart to singlepart algorithm
2016-11-02 10:06:25 +02:00
Nyall Dawson
18fc0c6fad [processing] optimise multipart to singlepart algorithm
- simplify code
- keep z/m/curved geometries intact
- might be a bit faster
2016-11-02 16:06:00 +10:00
Nyall Dawson
f65e770242 [FEATURE[processing] New algorithm to compute geometry by expression
This algorithm updates existing geometries (or creates new
geometries) for input features by use of a QGIS expression. This
allows complex geometry modifications which can utilise all the
flexibility of the QGIS expression engine to manipulate and create
geometries for output features.
2016-11-02 16:05:46 +10:00
Juergen E. Fischer
d3c7a04193 fix typo
(cherry picked from commit 658cfe68c91ec24f04f8ebda307fbec7d55a412f)
2016-11-01 13:51:49 +01:00
Juergen E. Fischer
7a326b1b8d fix typos 2016-11-01 13:46:29 +01:00
nirvn
8e663309c0 [processing] remove console error message when optional otb provider not installed 2016-10-31 12:53:42 +07:00
Nyall Dawson
a117df2205 Merge pull request #3656 from nirvn/processing_import_to_spatialite
[processing] add "Import into Spatialite" algorithm
2016-10-31 09:14:19 +10:00
Nyall Dawson
82312e10e4 [FEATURE][processing] New algorithm to extract specific nodes
This algorithm allows you to extract specific nodes from geometries.
Eg you can extract the first or last node in the geometry.

The algorithm accepts a comma separated list of node indices to
extract, eg 0 = first node, 1 = second node, etc. Negative indices
can be used to extract nodes from the end of the geometry. Eg
-1 = last node, -2 = second last node.
2016-10-31 07:56:24 +10:00
Nyall Dawson
8dab2cd4d7 [FEATURE][processing] New algorithm to extend lines
Allows extending linestrings by a set distance at the start
and end of the line
2016-10-31 07:56:24 +10:00
Nyall Dawson
c494c472ac Merge pull request #3690 from nyalldawson/extract_by_exp
[FEATURE][processing] New extract by expression algorithm
2016-10-30 08:23:40 +10:00
nirvn
121f48d654 [processing] add import into spatialite algorithm 2016-10-29 09:33:47 +07:00
Nyall Dawson
74e64645e4 [FEATURE][processing] New extract by expression algorithm
Filters an input layer by expression
2016-10-29 08:05:26 +10:00
Paolo Cavallini
79e5911e07 Update RegularPoints.py
Fixes #15773
2016-10-28 09:11:28 +02:00
volaya
b58229009b indentation fix 2016-10-27 14:36:31 +02:00
volaya
472a550168 [processing] fixed field loading in field calculator
fixes #15767

Conflicts:
	python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py
2016-10-27 14:36:30 +02:00