Nyall Dawson
6ff744a3b3
Use proj strings to serialize datum transforms IDs
...
Since datum transforms IDs are local only, and can even change
when underlying library versions are updated, we can't use them
to safely store and retrieve datum transforms.
Instead we use the proj strings and recover the local session
transform ID from that.
2017-12-15 17:07:20 +10:00
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
Nyall Dawson
13d1786265
Sipify
2017-12-15 14:20:57 +10:00
Nyall Dawson
b2872194df
Fix warning
2017-12-15 14:16:59 +10:00
Denis Rouzaud
2fb3c57600
fix transform context test
2017-12-15 14:16:59 +10:00
Denis Rouzaud
6188b167fc
missing const ref, remove extra argument
2017-12-15 14:16:59 +10:00
Denis Rouzaud
d404a3291b
use const_iterator
2017-12-15 14:16:59 +10:00
Denis Rouzaud
68aef9a426
ask for datum transform update on layer or project crs change
...
in the case of project crs change, if several transforms are available, pop up a message rather than showing multiple dialogs
2017-12-15 14:16:59 +10:00
Denis Rouzaud
adf07228c5
address remaining memory leaks
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
Denis Rouzaud
ed0c93f675
missing const ref
2017-12-15 14:16:13 +10:00
Denis Rouzaud
5c5830402c
use alternate row colors and a slightly reduced font size in datum table
2017-12-15 14:16:13 +10:00
Denis Rouzaud
8ab658c5e9
address missing const and memory leaks
...
kudos @nyalldawson
2017-12-15 14:16:13 +10:00
Denis Rouzaud
fd3e85e744
fix indentation
2017-12-15 14:16:12 +10:00
Denis Rouzaud
aa65da42f9
apply default transform to newly created project
2017-12-15 14:16:12 +10:00
Denis Rouzaud
92a46f02cf
create a QgsDatumTransformTableWidget to avoid code duplication
...
this contains the table view and the 3 buttons (add/remove/edit)
2017-12-15 14:16:12 +10:00
Denis Rouzaud
44ed7bd9fb
define default transforms in global options
...
adds QgsCoordinateTransformContext::readSettings()/writeSettings to read/write from settings
2017-12-15 14:15:02 +10:00
Denis Rouzaud
8798cf0680
allow editing transform in project properties
2017-12-15 14:15:02 +10:00
Denis Rouzaud
eb71750f00
use QgsProjectionSelectionWidget rather than buttons
2017-12-15 14:14:48 +10:00
Denis Rouzaud
fec7c705ff
fix context was not correctly set on project opening
2017-12-15 14:14:48 +10:00
Denis Rouzaud
4eab13df8a
datum transforms have reversible source/dest
2017-12-15 14:14:48 +10:00
Denis Rouzaud
d18dac0cb0
fix destination transform not showing
2017-12-15 14:14:48 +10:00
Denis Rouzaud
e0b3197bee
add missing refresh
2017-12-15 14:14:48 +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
Nyall Dawson
95a2ac083c
Update layout map to use transform context
2017-12-15 14:14:47 +10:00
Nyall Dawson
4838e55477
Fix ui build warnings
2017-12-15 14:14:47 +10:00
Denis Rouzaud
86964f6546
todos for layout after rebase (some more)
2017-12-15 14:14:47 +10:00
Denis Rouzaud
a42193954b
replace datum in qgsoptionsbase after rebase
2017-12-15 14:14:47 +10:00
Denis Rouzaud
5cc3a1f079
added method in QgisApp to ask for datum
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
Denis Rouzaud
080bea1989
saving datums transform in projet, removing in dialog ok
2017-12-15 14:14:47 +10:00
Denis Rouzaud
3777aade5b
added some options
2017-12-15 14:14:47 +10:00
Denis Rouzaud
2b1f82ff35
adding datum transform works
2017-12-15 14:14:47 +10:00
Denis Rouzaud
e178ffc8ff
modification to QgsDatumTransformationDialog to allow interaction with CRSs
2017-12-15 14:14:47 +10:00
Denis Rouzaud
f4eae2888a
started datum UI refactoring
2017-12-15 14:14:26 +10:00
Nyall Dawson
3916628212
Fix handling of transform-not-required in QgsCoordinateTransformContext
2017-12-15 14:14:26 +10:00
Nyall Dawson
40e551da17
Fix failing test
2017-12-15 14:14:26 +10:00
Nyall Dawson
1422d5382c
Improve caching of transforms
2017-12-15 14:14:26 +10:00
Nyall Dawson
0a9c107fcc
Fix build
2017-12-15 14:14:08 +10:00
Nyall Dawson
cb693a72f9
Move caching to QgsCoordinateTransform
...
and remove no longer required QgsCoordinateTransformCache singleton
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
018bfb49f9
Remove QgsDatumTransformStore
...
and port usage over to QgsCoordinateTransformContext instead
2017-12-15 14:13:52 +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
fed8a6786e
Add transform context to QgsMapSettings and QgsRenderContext
...
And also throw warnings when the context isn't set for these objects
2017-12-15 14:13:22 +10:00
Nyall Dawson
cc424c9509
Move warning to better location
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