4915 Commits

Author SHA1 Message Date
Nyall Dawson
318735271e Add method to retrieve datum transform ID from a proj string 2017-12-15 16:42:40 +10:00
Nyall Dawson
43d8a6b5be Update unit test 2017-12-15 15:48:12 +10:00
Denis Rouzaud
2fb3c57600 fix transform context test 2017-12-15 14:16:59 +10:00
Nyall Dawson
ab5d895840 Add some more datum related unit tests 2017-12-15 14:16:59 +10:00
Nyall Dawson
69c3debfc0 Nicer API for datum transforms
Instead of using QPairs of ints, use more descriptive structs, also
rename a lot of datum related methods for clarity and add docs
2017-12-15 14:16:59 +10:00
Nyall Dawson
d2353e7c01 Add method to determine whether transform context has a valid transform
for a specific src/dest CRS pair
2017-12-15 14:14:47 +10:00
Nyall Dawson
f55da4affb Update unit tests 2017-12-15 14:14:47 +10:00
Nyall Dawson
670858d81c Fix some transforms missing transform context 2017-12-15 14:14:47 +10:00
Denis Rouzaud
e303f746e1 ifdef 0 single source/destination transforms 2017-12-15 14:14:47 +10:00
Nyall Dawson
3916628212 Fix handling of transform-not-required in QgsCoordinateTransformContext 2017-12-15 14:14:26 +10:00
Nyall Dawson
0a9c107fcc Fix build 2017-12-15 14:14:08 +10:00
Nyall Dawson
439ef20088 Prepare for removal of QgsCoordinateTransformCache 2017-12-15 14:13:59 +10:00
Nyall Dawson
754a6e06bb Tweak transform logic (only remove src/dest transforms when both transforms are -1) 2017-12-15 14:13:22 +10:00
Nyall Dawson
620139054d Add explicit setter for project's transform context
And add transformContextChanged signal, so that we can detect
when the context is changed.
2017-12-15 14:13:22 +10: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
91e0afb613 Add QgsCoordinateTransformContext arguments to QgsCoordinateTransform constructor
And automatically retrieve correct datum transforms for the
transform, based on the information in the context.

Also add a convenience constructor which takes a QgsProject
instance instead of a QgsCoordinateTransformContext and which
automatically retrieves the project's transform context and uses
that. This is designed to make it easy to upgrade existing
Python code (by adding just QgsProject.instance() to the transform
constructors).
2017-12-15 14:12:16 +10:00
Nyall Dawson
76ebfdf2f6 Add a QgsCoordinateTransformContext member to QgsProject 2017-12-15 14:11:38 +10:00
Nyall Dawson
1013c0bdd9 Add support for serializing transform contexts 2017-12-15 14:11:38 +10:00
Nyall Dawson
3d1b8aeeb3 Implement logic for calculating datum transforms to use 2017-12-15 14:11:38 +10:00
Nyall Dawson
5131258b08 QgsCoordinateTransformContext is implicitly shared 2017-12-15 14:11:38 +10:00
Nyall Dawson
2e2e1248a5 Allow removing existing transforms from context 2017-12-15 14:11:38 +10:00
Nyall Dawson
8a0bd08e07 Start on QgsCoordinateTransformContext
Stores settings related to the correct datum transforms to use
when performing a coordinate transform.
2017-12-15 14:11:38 +10:00
Nyall Dawson
db07bc6c07
Merge pull request #5867 from alexbruy/processing-group
[processing] add groupId() method to get untranslated algorithm group
2017-12-15 12:25:45 +11:00
Etienne Trimaille
abdd8759a0 add constructor to QgsBox3d with a QgsRectangle 2017-12-15 12:14:05 +11:00
Nyall Dawson
6c46e47c7c Fix failing unit test
Wow... how did that test ever work? Very odd...
2017-12-15 10:09:21 +10:00
Alexander Bruy
1d482cf953 [processing] add groupId() method to algorithms to get unique ID of the
algorithm group.

Adapt native algorithms
2017-12-14 14:12:00 +02:00
Mathieu Pellerin
73674e8157
[spatialite provider] auto-generate auto-incrementing primary keys (#5849) 2017-12-13 12:35:22 +07:00
Nyall Dawson
a15b54d997 Swap missing 0->nullptr and add missing overrides 2017-12-12 21:14:58 +11:00
Nyall Dawson
cda271f388 Fix leak in unit test 2017-12-12 13:50:43 +10:00
Alexander Bruy
6b73f78198
Merge pull request #5839 from alexbruy/raster-extensions
Add methods to get supported raster formats and extensions to QgsRasterFileWriter
2017-12-11 19:54:28 +02:00
Alexander Bruy
33fdf8f219 add tests for new methods 2017-12-11 15:14:05 +02:00
Alessandro Pasotti
bfa857bb97 [bugfix] Restore binding for QgsCoordinateTransform
Fixes #17600

Binding was lost in commit 10d34ece02bb765f5d9d88bb0524c909235fb0d7
2017-12-11 12:32:46 +01:00
Alessandro Pasotti
e0aa5e1f11
Merge pull request #5817 from m-kuhn/noQtScript
Remove dependency on deprecated QtScript library
2017-12-11 10:20:53 +01:00
Nyall Dawson
83cdd8468b Use GDAL metadata to determine feature styles support
GDAL >= 2.3 only
2017-12-11 19:24:31 +11:00
nirvn
bb90dc3309 Add Z/M test case to the spatialite provider 2017-12-11 10:23:13 +07:00
Matthias Kuhn
02b69763ff Port WCS test away from QScript 2017-12-10 14:17:33 +01:00
Matthias Kuhn
a45908f922 Remove dependency on QtScript 2017-12-10 13:01:51 +01:00
nirvn
1305cccbd9 Fix new geopackage layer test 2017-12-07 16:55:52 +07:00
nirvn
38c96fe373 [ui] use qgsfilewidget in the create geopackage layer dialog 2017-12-07 16:22:58 +07:00
Nyall Dawson
61c57bc20e Save and restore layouts with project 2017-12-07 08:50:01 +10:00
Nyall Dawson
d69290ea50 Indentation 2017-12-07 08:50:01 +10:00
Nyall Dawson
a9896eac05 Port a bunch of QgsLayoutManager methods to use QgsLayouts 2017-12-07 08:50:01 +10:00
Nyall Dawson
b0dea08bbe Fix pages are incorrectly loaded from templates when adding items 2017-12-07 08:49:53 +10:00
Nyall Dawson
885f0a5602 Handle linking items when adding from templates 2017-12-07 08:49:53 +10:00
Nyall Dawson
a4dea9935f Restore ability to save layouts to templates and add items from template 2017-12-07 08:49:41 +10:00
Nyall Dawson
59b6bf62ab Add a method to clear an existing layout 2017-12-07 08:49:41 +10:00
Nyall Dawson
8feac30f07 Add method to clear page collections for layouts 2017-12-07 08:49:41 +10:00
Nyall Dawson
6a78d489c0 Restore paste in place functionality 2017-12-07 08:49:41 +10:00
Nyall Dawson
b7e338bd2d Add test for pasting items at set position 2017-12-07 08:49:41 +10:00
Nyall Dawson
ef9e013a5a Fix crashes when rapidly deleting/undeleting objects
Also fix some leaks
2017-12-07 08:49:41 +10:00