4109 Commits

Author SHA1 Message Date
Nyall Dawson
935a49aa52 Add framework for data defined elevation properties 2022-04-14 14:16:26 +10:00
Nyall Dawson
cca19d74ff Add an expression context to QgsProfileRequest 2022-04-14 14:16:26 +10:00
Nyall Dawson
ad80958798 Make vector layer profile chart results default to respecting layer
symbology, and add checkbox to disable this in their elevation
properties page

This means that vector results in elevation profile charts will default
to showing features using their corresponding 2d renderer, allowing
eg categorized classes to be visible on the profile chart. (In the
case that a profile symbol type doesn't match the layer's renderer
symbol types, we just take the symbol color from the renderer)
2022-04-12 02:17:02 -07:00
Nyall Dawson
904a312f40 Add method to sort a list of layers by layer type 2022-04-12 02:08:39 -07:00
Juergen E. Fischer
30e6901931 fix msvc build 2022-04-11 09:54:00 +10:00
Nyall Dawson
4eede35d55 Allow any symbol to be an animated symbol
Users can now indicate that a symbol should be treated as a animated
symbol, through the new "Animation Settings" option in the symbol
widget's Advanced menu.

This settings panel allows users to enable animation for the symbol
and set a specific frame rate at which the symbol should be redrawn.
When enabled, the @symbol_frame variable can be used in any
symbol data defined property in order to animate that property.

For instance, setting the symbol's rotation to the data defined
expression

    @symbol_frame % 360

will cause the symbol to rotate over time. (with rotation speed
dictated by the symbol's refresh rate)
2022-04-09 18:14:44 +10:00
Nyall Dawson
f4f514dd86 Add choice of band to use for elevation profiles 2022-04-07 19:22:19 +10:00
Nyall Dawson
b779bfc44a Spelling 2022-04-07 19:22:19 +10:00
Nyall Dawson
d2e5186d56 Add action to export profile graph to PDF 2022-04-07 19:22:19 +10:00
Nyall Dawson
8ee20464a0 Ensure that elevation properties are copied whenever a layer is cloned 2022-04-07 19:22:19 +10:00
Nyall Dawson
3d0fd967af Add profile chart symbology settings for vector layers 2022-04-07 19:22:19 +10:00
Nyall Dawson
0d88a6f834 Documentation 2022-04-07 19:22:19 +10:00
Nyall Dawson
9970782045 Use actual ranges of plot when rendering, use correct raster/mesh profile symbols 2022-04-07 19:22:19 +10:00
Nyall Dawson
305f0790cc Add range of z to QgsAbstractProfileResults 2022-04-07 19:22:19 +10:00
Nyall Dawson
77b9066e92 Add QgsMeshLayerElevationProperties subclass of
QgsMapLayerElevationProperties
2022-04-07 19:22:19 +10:00
Nyall Dawson
9ff504f614 Add profile line symbol setting for raster layer elevation properties 2022-04-07 19:22:19 +10:00
Nyall Dawson
6d4c2803f6 Start on profile renderer class 2022-04-07 19:22:19 +10:00
Nyall Dawson
cea1215bee Add cancelation support for profile generators 2022-04-07 19:22:19 +10:00
Nyall Dawson
141f7bf9f2 Plot wip 2022-04-07 19:22:19 +10:00
Mathieu Pellerin
5d5b1492fb [map canvas] Right-click copy coordinates should respect CRS axis ordering 2022-04-06 13:25:41 +07:00
Nyall Dawson
bac45b308a Add coordinate order argument to QgsCoordinateFormatter functions 2022-04-06 16:05:08 +10:00
Nyall Dawson
0b8e6abb22 Add QgsCoordinateReferenceSystemUtils class, with function to determine
most appropriate x/y or y/x coordinate order for a crs
2022-04-06 16:05:08 +10:00
Alessandro Pasotti
f6b99b2b4a Address Nyall's comments 2022-04-06 11:47:21 +10:00
Alessandro Pasotti
66322f4c7f Curved offset first attempt 2022-04-06 11:47:21 +10:00
Nyall Dawson
28bb05b0d5 Add method to retrieve axis order for a QgsCoordinateReferenceSystem 2022-04-06 11:45:32 +10:00
uclaros
df740b4d0b address review 2022-04-04 02:57:00 -07:00
uclaros
b61bc22885 test renderer properties, not actual rendering 2022-04-04 02:57:00 -07:00
uclaros
c16e9a204c Sync pointcloud layer's 3d renderer style with 2d renderer 2022-04-04 02:57:00 -07:00
Nyall Dawson
0aad51c6d4 Base default image cache size on system memory
Instead of always defaulting to 100mb, then base the cache size
on the system memory:

- > 32gb, use 500mb
- 16-32gb, use 250mb
- else 100mb

The larger sizes can make a big difference to rendering speed for
complex projects, so let's let powerful systems utilise all that
memory!

(Only supported on linux for now)
2022-04-04 19:12:11 +10:00
Nyall Dawson
0acfff04fb Fix setting vector tile layer maximum tile zoom to levels > 14
Fixes #47933
2022-04-04 13:28:41 +10:00
Nyall Dawson
833685a21e Add utility function to calculate the ideal refresh rate of a
vector layer renderer, by hunting for any animated symbols
in the renderer
2022-04-04 11:43:47 +10:00
Nyall Dawson
78c8a670e3 [feature] New marker symbol type for "Animated Marker"
This new marker symbol type allows points to be rendered using
an animated marker, sourced from an animated gif, webp or mng
animation.

Options are present for marker file, size, angle and frame rate.

There are two ways in which animated symbols are handled:

1. If the map itself is considered an animation, then the frame
rendered for the animated marker is based on the map animation
frame and frame rate. This is the case when the temporal
controller is set to the Animation mode. In this case the
animated markers will follow the temporal controller animation,
e.g. pausing when the animation is paused, advancing frames
with the animation, etc. The map will also be redrawn using
the frame rate set for the temporal animation.

This mode also applies when exporting an animation from the
temporal controller.

It's also the mode used when a plugin specifically sets the
frame rate and current frame QgsMapSettings properties, so
e.g. @timlinux's QGIS Animation Workbench plugin will dictate
the marker animation frame to render.

2. If the map is NOT considered an animation (i.e. it's just
a plain old normal QGIS project), then the frame to render
will be based on the current timestamp alone.

Markers will be animated when their corresponding layer is set
to a temporal mode, and a temporal animation is playing.
2022-04-04 11:43:47 +10:00
uclaros
74fc47458b Report untwine errors to the user 2022-04-01 02:20:25 -07:00
Nyall Dawson
499c374dba Split out axis properties into separate class 2022-03-31 09:21:08 +10:00
Nyall Dawson
2029888c3d Add method to auto calculate plot intervals based on size 2022-03-31 09:21:08 +10:00
Nyall Dawson
67893ae1c6 Add @plot_axis, @plot_axis_value variables and test for data defined plot rendering 2022-03-31 09:21:08 +10:00
Nyall Dawson
fd4f42f9a6 Add methods to read/write plot state to xml 2022-03-31 09:21:08 +10:00
Nyall Dawson
0e851b3e92 Docs 2022-03-31 09:21:08 +10:00
Nyall Dawson
640d8134aa API improvements 2022-03-31 09:21:08 +10:00
Nyall Dawson
44ad8f51aa Simple framework for drawing 2d plots using native QGIS objects
Uses QGIS symbols, text formats and text numeric formats to render
chart components. Currently handles the background, grid, and axis
labels.
2022-03-31 09:21:08 +10:00
Nyall Dawson
dd89f3779a [processing] Always use the same method to launder names
Ultimately avoids forced removal of _ characters in model
parameter names
2022-03-30 15:41:23 +10:00
Mathieu Pellerin
5bbad02806 [nmea] Convert RMC mode indicator to its equivalent signal variant to provide accurate quality description 2022-03-28 13:57:22 +07:00
Nyall Dawson
0f1c0df330 Expose task flags control for QgsMapRendererTask
Allows plugins to create hidden/uncancelable render tasks
2022-03-28 11:40:14 +10:00
Nyall Dawson
3e2467d3f3 Add method to retrieve next frame delay for animated images to QgsImageCache 2022-03-28 06:16:02 +10:00
Nyall Dawson
5451f22017 Set animation properties for map settings when exporting animations 2022-03-27 15:40:05 +10:00
Nyall Dawson
2e960aaeed Add map frame rate and current frame numbers to QgsMapSettings/QgsRenderContext
Makes this information available for symbol rendering logic when
a map is being rendered as part of an animation.
2022-03-27 15:40:05 +10:00
Nyall Dawson
74db16608e Use map instead of hash 2022-03-25 10:08:11 +10:00
Nyall Dawson
83f88548f2 Add step distance parameter to profile request 2022-03-25 10:08:11 +10:00
Nyall Dawson
f5d9c14ef1 Fix cppcheck warning 2022-03-25 10:08:11 +10:00
Nyall Dawson
e0ae530dee Implement profile generator for mesh layers 2022-03-25 10:08:11 +10:00