- Deprecate global geographic crs strings, these should not be used
- Move some global constants to Qgis, and monkey patch for
API compatibility
- Deprecate global qgsVsiPrefix. Use QgsGdalUtils::vsiPrefixForPath()
instead
Always calculates the scale at the equator, regardless of the
actual visible map extent.
This method can be used to provide a consistent, static scale for
maps in geographic reference systems, regardless of the latitudes
actually visible in the map (permitting consistent appearance of
these maps when rendering relies on scale based visibility or
calculations). Otherwise a project in eg EPSG:4326 which uses
scale based visibility of layers and symbols will see layers
and features "randomly" disappear as the map is panned, even
though the user has not zoomed in or out of the map.
This method is only applicable when calculating scales with a
degree based reference system.
This is a new navigation mode for QgsCameraController which is meant to work
just like the terrain-based navigation mode, but for 3D scenes with globe.
Initially, the new navigation mode can handle:
- zooming in/out with mouse wheel
- orbit around globe when dragging with left mouse button pressed
- left/right/up/down keys to orbit around globe
- shift + left/right keys to change heading angle
- shift + up/down keys to change pitch angle
- page up/page down keys to increase/decrease elevation
For camera pose, we use QgsCameraPose as for "flat" scenes, but the QCamera
is positioned/rotated slightly differently - the main change is that in case
of globe, we use ECEF coordinates of the camera pose's center point, convert
them to lat/lon coordinates in order to set up initial rotation of the camera
so that it is perpendicular to the tangent plane at the given ECEF coordinate.
This commit contains some changes created during rebasing onto current master, however they are insifignant and should be ignored, as they will match the changes already in master.
This brings to renderer for Mesh Contours option to set renderer Min Max based on extent (specific canvas, changing canvas) in the same way as renderers for Raster Layer.
Rework internals of QgsTextRenderer horizontal text rendering,
so that:
1. It's easier to read, cleaning up years of accumulated cruft
2. Split out bits into smaller functions
3. Reduce the amount of duplicate code for text layout, so that
there's only one function responsible for horizontal text layout
instead of multiple
4. Add shortcut optimisations for rendering text + buffer/shadow
at the same time, instead of always drawing these completely
independantly of each other and incurring the cost of text path
calculation multiple times for the same bit of text. In a simple
benchtest this reduces the time required for rendering many
text fragments with buffers from 40 seconds to 27 seconds.
There's still more we could do here, but it's a start...
This algorithm extracts point features corresponding to the minimum
and maximum pixel values contained within polygon zones.
The output will contain one point feature for the minimum and one
for the maximum raster value for every individual zonal feature
from a polygon layer.
Instead of always calculating the scale along the bottom of the
map, expose a choice of methods to the user (along bottom,
middle, top, or average of the three measurements)
For new scalebars, default to the average method, which better
handles the scenario where the scale at the top or bottom of
the map cannot be calculated (eg when the top/bottom of the map
falls just outside valid areas for the map's crs)
This fixes one of the most common scenarios which cause scale
bar widths to blow out to massive sizes
Refs #55240
Reduces a lot of overhead when rendering non-buffered, non-shadowed
text. Cuts render time by ~50% in my testing.
Also introduces a "PreferText" render option, where we default
to using text painting methods in all scenarios where we know
there's no loss in rendering quality to do so. This mode should
become the new default in a future QGIS release, as it is
designed to be faster with no visible rendering differences.
Expand unit testing by covering all text render modes in all
text renderer rendering tests.