This reworks (on proj 6 builds only!) QgsCoordinateTransformContext
to use proj strings of proj coordinate operations to handle the
users' preferred list of operations when transforming coordinates
between two CRSes.
Previously, the context heavily utilised internal transform ID
numbers, which were QGIS specific and relied on matching entries
from the QGIS srs.db file. This approach was undesirable because
it meant QGIS had to maintain and carry it's own table of
possible transform pathways between CRS pairs (which was difficult
to update, impossible to track, and most likely severely out of
date).
Now we can utilse Proj 6's (wonderful!) logic for determining the
best coordinate operation to utilise between two CRSes. All the
old API has been deprecated and no longer works under proj 6, but
that's unavoidable (and unlikely to be in use by plugins anyway,
it's VERY low level stuff).
A further bonus of this work is that QgsCoordinateTransform no
longer relies on proj strings of the source/dest CRS to build
the transform -- the issue with that approach was that proj
strings are lossy (and not always possible to generate), so
now by default we are generating better pathways between CRS
pairs.
This resolves issues with transforms which rely on pivot datums,
such as GDA94 - GDA2020 conversions.
Sponsored by ICSM
This apparently caused deadlock issues.
Credit to @nyalldawson for spotting the offending commit.
Partial revert of 0addae5b783e541953522eabe178426e820bf852
Redering of WCS layers has been quite inefficient since introduction
of multi-threaded rendering in QGIS 2.4: whenever map rendering was
starting, copying of WCS provider involved running full initialization
of WCS provider which typically does three(!) network requests
in the constructor (get capabilities + 2x check to work around some
incompatibilities of WCS servers). This was both slow and potentially
dangerous because of embedded QEventLoop for the network requests.
This is now gone and when WCS provider gets cloned (e.g. when starting
map rendering), it just gets copy of data without any extra work.
Avoiding embedded QEventLoop fixes a crash in 3D view when loading tiles.
Fixes#28800Fixes#26706
There was a lack of a JSon array around rings of a polygon.
This issue is not present in 3.4
Also fixes an issue with gcc 5.5 of Ubuntu 16.04 that doesn't behave
properly with C++11 brace syntax with code from nlohmann/json.hpp.
The code compiles but the result is invalid: `json foo{ json::array{} }`
is serialized as [[]] instead of []. So use old-style constructor
instead: `json foo( json::array() )`
This PR is on top of https://github.com/qgis/QGIS/pull/30010
The previous approach was severely broken, because the default
CRS for new projects setting was ignored as soon as a layer
was added to the project.
Instead, refine the setting to add options
- "Use CRS from first layer added": same as previous behavior,
the project CRS is set to match the first layer added to a new
project
- "Use a default CRS": CRS for a new project is set to a preset
default CRS, and is left unchanged when adding layers to the
project
Also update qgis_global_settings.ini to reflect these changes.
Fixes#27516