59694 Commits

Author SHA1 Message Date
Nyall Dawson
96645261e5 Fix changing source or dest CRS when editing a coordinate operation
fails to correctly save the new operation
2019-12-21 05:07:39 +10:00
Nyall Dawson
f0f63d3802 Use QgsCoordinateOperationWidget in QgsDatumTransformDialog 2019-12-21 05:07:39 +10:00
Nyall Dawson
0cd49ca744 Avoid duplicate signals, add unit test 2019-12-21 05:07:39 +10:00
Nyall Dawson
cb8b4a8831 Move guts of datum transformation dialog to a new standalone widget
QgsCoordinateOperationWidget

This widget shows a list of the available operations between a source
and destination CRS along with their properties
2019-12-21 05:07:39 +10:00
Matthias Kuhn
ffd42d9dd7 [server][windows] Fix crash on startup 2019-12-20 18:15:53 +01:00
Matthias Kuhn
2a01772e46
Merge pull request #33436 from signedav/relating_values
List referenced layer values in Expression Builder
2019-12-20 17:29:10 +01:00
Samweli
e8fd26cc62 update on wcs docstring 2019-12-20 13:43:48 +03:00
Samweli
d614efabb0 remove abbreviated variables names in metadata link parse function 2019-12-20 11:45:02 +03:00
David Signer
ea912a170c since information 2019-12-20 09:39:50 +01:00
Samweli
22278954da refactor wcs provider to project code standards 2019-12-20 11:12:23 +03:00
Peter Petrik
d211de2204
Other average methods 3d mesh (#33426)
[FEATURE] [MESH] add new 3d stacked mesh averaging methods (top, bottom, sigma, depth, height, elevation)

see https://fvwiki.tuflow.com/index.php?title=Depth_Averaging_Results for description of the methods. method can be selected for 3d stacked mesh dataset in the new widget added for QGIS 3.12 in the mesh layer styling dialog
2019-12-20 07:48:39 +01:00
Nyall Dawson
cdc9a841c9 Add some proj6 test branches 2019-12-20 12:13:06 +10:00
Nyall Dawson
4fd9619ebc Fix build, fix test on proj < 6 2019-12-20 12:13:06 +10:00
Nyall Dawson
dc3846544e Round trip test CRSes via WKT 2019-12-20 12:13:06 +10:00
Nyall Dawson
948fccd052 Update test results to use WKT2 2019-12-20 12:13:06 +10:00
Nyall Dawson
a9773666c1 Don't cache WKT strings inside QgsCoordinateReferenceSystem
There's many different formats of WKT strings, so instead play it safe
and always export in the exact specified format instead of using a cached
value which may be a different format.
2019-12-20 12:13:06 +10:00
Nyall Dawson
f77af382a0 Prefer WKT2 when exporting CRS for use by GDAL 2019-12-20 12:13:06 +10:00
Nyall Dawson
ac47631656 Fix typo in CRS code 2019-12-20 12:13:06 +10:00
Nyall Dawson
80be192d8f Fix doxygen warning 2019-12-20 12:13:06 +10:00
Nyall Dawson
b7a440938c Layout fixes 2019-12-20 12:13:06 +10:00
Nyall Dawson
6490a170b1 Fix build on proj <6 2019-12-20 12:13:06 +10:00
Nyall Dawson
fe941e68f6 New projection dialog proj 6 tweaks and revisions 2019-12-20 12:13:06 +10:00
Nyall Dawson
2e3730179e Partial revert BoundCRS identification change
Sync behavior with the new GDAL behavior, where a CRS defined using
a proj string alone will be considered equivalent to the underlying
source crs.
2019-12-20 12:13:06 +10:00
Nyall Dawson
ac1ff9b291 Update test results 2019-12-20 12:13:06 +10:00
Nyall Dawson
4b5056c6f5 Revert "Don't automatically create boundcrs proj string representations of CRSes"
Following discussion with GDAL maintainers, it's been agreed that the consistent logic
to use across projects should be:

1. Proj strings: export as bound CRS, and treat a boundcrs match to a known CRS as equivalent
to the underlying source CRS

2. WKT strings: export without change, not as bound CRS, and DON'T treat boundcrs matches
as equivalent to the underlying source CRS
2019-12-20 12:13:06 +10:00
Nyall Dawson
93fdb05e1a Update test results to reflect newer GDAL behavior 2019-12-20 12:13:06 +10:00
Nyall Dawson
b9a44b6918 Fix build, tests on proj < 6 2019-12-20 12:13:06 +10:00
Nyall Dawson
c09c435478 Replace deprecated members 2019-12-20 12:13:06 +10:00
Nyall Dawson
35781eff6f Spelling 2019-12-20 12:13:06 +10:00
Nyall Dawson
0a9cb0e278 Fix matching of CRS by WKT to user CRSes defined by WKT, including
parameter-order independant matches
2019-12-20 12:13:06 +10:00
Nyall Dawson
3f0af6e72a Ensure that proj strings in different parameter order are matched
to user CRS on proj 6 builds
2019-12-20 12:13:06 +10:00
Nyall Dawson
a2c6bb9780 Remove more proj4 related hacks from proj6 builds 2019-12-20 12:13:06 +10:00
Nyall Dawson
efc1a1b542 Don't automatically create boundcrs proj string representations of CRSes
Just let proj decide when and if these are needed
2019-12-20 12:13:06 +10:00
Nyall Dawson
7136406047 Fix projection mismatch when reading very old projects on proj 6 builds
We should always prioritise an exact auth:id means of constructing
CRSes whenever it's available, instead of just starting with a proj string.
2019-12-20 12:13:06 +10:00
Nyall Dawson
4edab2b61d Remove a downstream hack 2019-12-20 12:13:06 +10:00
Nyall Dawson
1c34ae9c3b Fix incorrectly ellipsoid acronym returned when creating a CRS from a custom non-standard proj string on proj 6+ builds 2019-12-20 12:13:06 +10:00
Nyall Dawson
5cfa6627b4 Don't incorrectly flag unknown CRS created from proj strings as invalid
on proj 6+ builds
2019-12-20 12:13:06 +10:00
Nyall Dawson
c8d5c43402 Don't equate a BoundCRS with an identified SourceCRS as the SourceCRS when identifying
CRSes

May result in some CRSes which were previously identified as known standard CRSes
now being shown as User CRSes, but they aren't the same to we can't equate them.

If previously identified CRSes are showing as User CRSes now, then we should
investigate these upstream in the proj or gdal libraries, and get all fixes
in place upstream rather then trying to do this in QGIS code (which is
inevitably going to end up with an unmaintainable mess)
2019-12-20 12:13:06 +10:00
Nyall Dawson
550dede70e Don't use a boundCRS definition as the WKT definition of EPSG:4326
on proj 6 builds

See https://github.com/OSGeo/PROJ/issues/1804
2019-12-20 12:13:06 +10:00
Nyall Dawson
77804eb751 Update tests 2019-12-20 12:13:06 +10:00
Nyall Dawson
403e79e421 More user of userFriendlyIdentifier 2019-12-20 12:13:06 +10:00
Nyall Dawson
fdf211a8a3 Add a method for retrieving a user friendly descriptive string for
a CRS

And use this wherever we show CRS values to users
2019-12-20 12:13:06 +10:00
Nyall Dawson
e152685d97 Cleanup handling of recent CRS list, add tests 2019-12-20 12:13:06 +10:00
Nyall Dawson
908684c00b Never auto-save unknown CRSes encountered in the wild
Previously whenever an unknown CRS (i.e. something which couldn't
be matched a standard or user crs) was encountered then it would
automatically be saved to the user's custom CRS database.

This meant that over time, the custom CRS database would fill
with dozens of random entries. Even a clean QGIS install would
pollute the custom projection list with a bunch of automatically
created random CRS definitions!

Instead, never auto save CRSes to the custom projection database.
Only projections which users have manually created via the custom
projection dialog should ever be available as User CRSes.
2019-12-20 12:13:06 +10:00
Nyall Dawson
cbc1ee56cc Deprecate most methods which construct CRSes from internal CRS ids
These should NOT be used, and auth:code or WKT definitions used instead.

Unfortunately some use of these methods are very heavily entangled around
other code, so we can't deprecate all of them until 4.0
2019-12-20 12:13:06 +10:00
Nyall Dawson
c76813c434 Deprecate methods for constructing CRS from Postgis srids
Constructing CRS using Postgis srids is highly discouraged,
and instead CRSes should always be constructed using auth:id
codes or WKT strings.

QGIS 4.0: The logic should be isolated into the postgres
provider alone, and not exposed to stable API
2019-12-20 12:13:06 +10:00
Nyall Dawson
b37dd0984e Rip off a band aid, and deprecate all "proj4" calls from the API
Alias these across to new "proj" methods, which don't include the
version number.
2019-12-20 12:13:06 +10:00
David Signer
1f1a3fe6b7 pass field formatter context as a reference instead of a pointer to implify his not optionality 2019-12-19 21:08:02 +01:00
signedav
7f9aa3d2bb
Merge branch 'master' into relating_values 2019-12-19 14:12:38 +00:00
David Signer
e8b82c15b8 use of context to pass project and avoid QgsProject::instance() 2019-12-19 15:07:52 +01:00