1286 Commits

Author SHA1 Message Date
Matthias Kuhn
e9d4c06cb2 Make string translatable 2017-12-14 09:04:07 +01:00
Mathieu Pellerin
353ca633b0
Tiny spatialite-related improvement & fix (#5857)
* [spatialite provider] when creating an empty layer, primary key should be autoincrement
* [processing] fix import into spatialite's primary key parameter
* [spatialite provider] case insensitive search for table names
2017-12-13 14:38:42 +07:00
Nyall Dawson
ca75e8c0a5 Remove obsolete python alg, add unit tests 2017-12-07 06:28:54 +11: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
Nyall Dawson
928afdd8c5 Fix geometry snapper sometimes creates unwanted overlapping segments
when snapping line layers

Because the default behavior of the snapper is to insert extra
vertices into the snapped geometry in order to make it 'follow'
the reference geometries exactly, this can result in unwanted
results for line layers where the resultant snapped layer
has overlapping line segments.

Since we can't always know what the desired result is that the
user wants (maybe they do want overlapping lines), instead
give them control over the result by exposing extra enum
options which never insert extra vertices.
2017-12-03 07:10:42 +10:00
Nyall Dawson
8c9147eabd [processing] Make set m value accept dynamic m values 2017-12-02 11:17:19 +10:00
Nyall Dawson
d1a71f0971 Update algorithms for new API 2017-12-02 11:17:19 +10:00
Nyall Dawson
4b464f3d68 [processing] Allow data defined z value for "set z value" algorithm
Allows easy setting of z from an existing height attribute!
2017-12-02 11:17:18 +10:00
Nyall Dawson
d7111b7849 Standardise some algorithm names 2017-12-01 10:00:42 +11:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Nyall Dawson
14531964a8
Merge pull request #5719 from nyalldawson/translate_z
geometries: translate Z/M
2017-11-24 22:12:11 +11:00
Mathieu Pellerin
97f749e6b4
[processing] fix error when adding refactor fields alg in empty model
(fixes #17421)
2017-11-24 18:04:50 +07:00
Nyall Dawson
ff900c0b05 [processing] Make translate algorithm native
And add option to translate z/m values
2017-11-24 16:18:13 +10:00
Mathieu Pellerin
1fcadb72ff
[processing] fix for import into spatialite and execute sql algorithms 2017-11-24 12:22:19 +07:00
Nyall Dawson
aca22663d0 [processing] Change save as spatialite option to save as GeoPackage
Since it's much more useful. Also add a prompt for layer name, so that
you can save the results of an algorithm into an existing geopackage
without wiping existing layers.
2017-11-24 09:31:50 +10:00
Nyall Dawson
8775aff71b Fix error in Geometry by Expression
We can't depend on preparing the expression, as we may not have
enough context to do this during the algorithm preparation step
2017-11-24 09:31:50 +10:00
Matthias Kuhn
cd0ba918ba Use layer context in RefactorFields algorithm
Fix #17533
2017-11-23 15:24:40 +01:00
Mathieu Pellerin
793fb6114b
[processing] add vertex id details to extract nodes algorithms 2017-11-16 17:46:47 +07:00
Alexander Bruy
ee8ef42c42 [processing] boolean fieds support in the Refactor Fields algorithm (fix #17168) 2017-11-16 12:46:00 +02:00
Nyall Dawson
75885d70d5 Rename various WKT/WKB/GeoJSON/GML methods for consistency
and consistent capitalisation
2017-11-15 20:51:05 +10:00
matteo
2d188e95cd processing Union fix 2017-11-15 11:27:30 +11:00
Nyall Dawson
b0c13da854 Fix exception in find projection algorithm 2017-11-15 11:27:30 +11:00
nirvn
66b27dcd50 Use vertex iterator 2017-11-13 17:12:57 +07:00
nirvn
7cb15c08b9 Optimize extract nodes algorithm 2017-11-13 12:13:30 +07:00
Nyall Dawson
fe78611cf5 Simplify interpolation API
Don't require both pixel size and row/col count in constructor,
since we can calculate the pixel size from the extent and row/column
count.
2017-11-03 14:00:07 +10:00
Nyall Dawson
8631472089 QgsTINInterpolator->QgsTinInterpolator 2017-11-03 10:49:33 +10:00
Nyall Dawson
e91ee5b71c More flexible API for interpolation
E.g. adds API support for interpolating by m value
2017-11-03 09:18:45 +10:00
Nyall Dawson
73306f1266 Update python code 2017-11-03 07:47:40 +10:00
Nyall Dawson
8f22f5eb3b [processing] Misc fixes for network analysis tools
Also maintain attributes in service area from layer alg, add test

Fixes #17325
2017-10-31 16:01:32 +10:00
Nyall Dawson
8d32bf729e Fix QgsGraphAnalyzer::dijkstra traverses through edges backwards
This means that it flips the direction of the graph edge, breaking
route restrictions.

Refs #17325
2017-10-31 16:01:32 +10:00
Nyall Dawson
57edec668e Fix incorrect enum values in network analysis algs
Didn't result in a bug, but made the code confusing to read
2017-10-31 16:01:32 +10:00
Nyall Dawson
ab05fe7603 Fix extremely confusing network graph API naming
Since names of api calls were backwards to expectations
2017-10-31 16:00:19 +10:00
Nyall Dawson
5ffd7214ee [processing] Shortest path handling for multipoint layers
Fixes shortest path algorithms fail for multipoint source layers
or layers with null geometries

Refs #17325
2017-10-31 16:00:18 +10:00
Nyall Dawson
4149da0556 Better reporting of errors when paths cannot be found, also
output point but with no geometry and missing attributes so
that it's clear which points could not be linked
2017-10-31 16:00:18 +10:00
Nyall Dawson
36a38f4e2d [processing] Keep attributes from start/end points layer in
output layer for shortest path algorithms

Otherwise the paths are nearly impossible to link back to
the source layer for further analysis
2017-10-31 16:00:18 +10:00
Nyall Dawson
49254384df Fix index out of range error in shortest path algs 2017-10-31 16:00:18 +10:00
Matthias Kuhn
d2c1011a13
Convert missing from[Geometry]XY calls 2017-10-30 09:14:06 +01: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
Matthias Kuhn
750a54f8f6
More drop V2 suffix fixes 2017-10-30 09:14:05 +01:00
Matthias Kuhn
7f3ad76882
Rename QgsMultiPolygonV2 to QgsMultiPolygon 2017-10-30 09:14:04 +01:00
Matthias Kuhn
3fcdcd87af
Rename QgsMultiPointV2 to QgsMultiPoint 2017-10-30 09:14:04 +01:00
Matthias Kuhn
b6f46eae11
Rename QgsPolygonV2 to QgsPolygon 2017-10-30 09:14:04 +01:00
Nyall Dawson
68179e224c Merge pull request #5475 from nyalldawson/snap_to_grid
[FEATURE][processing] Native c++ snap to grid algorithm
2017-10-27 17:19:37 +11:00
Nyall Dawson
4372ac2658 [FEATURE][processing] Native c++ snap to grid algorithm
With support for snapping Z/M values, keeping curves
2017-10-27 15:16:15 +10:00
Harrissou Sant-anna
30aa5f5f96 Allow double typed values in algorithm
Also homogenize the output name
2017-10-27 13:09:39 +11:00
Nyall Dawson
c50ee6d42f Update python code to new API 2017-10-26 07:06:34 +10:00
Alexander Bruy
c64f03d0a4 [processing] keep column names in standard distance matrix (fix #17150) 2017-10-24 15:27:22 +03:00
Nyall Dawson
c4f3832af2 Rename QgsGeometry::fromPolyline as QgsGeometry::fromPolylineXY
and add new QgsGeometry::fromPolyline which uses QgsPoint

We want to encourage people not to use the QgsPointXY method, as it drops
Z/M values. So it's moved across to a different name to make way
for a new QgsGeometry::fromPolyline which uses a QgsPoint list
instead of QgsPointXY, thus keeping Z/M values intact.

Similarly, QgsPolyline now is a list of QgsPoint (keeping z/m values)
and the old 2d QgsPolyline type was renamed to QgsPolylineXY.

Making the QgsPoint method the "preferred" method and making linestrings
just as easy to create from z/m dimensioned points as 2d points is
important to push people to write code which does not discard
these important dimensions.

As a bonus, the QgsPoint methods are more efficient anyway, since
they don't require creation of a temporary list.
2017-10-22 18:10:14 +10:00