277 Commits

Author SHA1 Message Date
Alessandro Pasotti
f040c260bd Raster maptips 2022-11-09 09:48:02 +01:00
Alessandro Pasotti
25e94fa52d More raster maptips work
It should actually be moved to a generic maplayer implementation.
2022-11-09 09:48:02 +01:00
Alessandro Pasotti
92feff04ac Doxy 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
8e0a5e1cbe Address PR comments 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
31a5d632c4 Layout 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
0bcb75ff1b Missing sip includes 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
bbb045e2bb Getting closer... almost relase-ready 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
70c93d4aea Gui enhancements 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
3479a66e4e Handle other rat types 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
62dff87ccf RAT GUI 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
fc8cb922a7 Create RAT from raster and fix sip enum 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
41983fa99d Skip value and color fields on RAT identify 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
be9b8647ff Identify 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
5a88611b38 Paletted RAT auto-loading 2022-11-09 09:46:13 +10:00
Alessandro Pasotti
df4f7fe84e RAT model 2022-11-09 09:46:13 +10:00
Nyall Dawson
bd895d526b Add missing sip cast for raster contour renderer 2022-11-08 15:34:57 +10:00
Mathieu Pellerin
69ee3bc0d3 [symbology] Fix group layer not rendering properly when magnifier != 100% or when effect is on 2022-10-25 14:16:17 +07:00
Alessandro Pasotti
9642121cb3 Layout 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
f45cd59539 Layout and core export on structs 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
e4b09ba468 RAT editing API and tests 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
99f39f66c3 Remove loading flags (to be readded later) 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
d51d1365eb Move enums 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
cd6c8e9a5c Address PR comments 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
1954b76293 Code layout 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
7592f38620 More tests for import/export 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
b3bc13450c Remove GUI leftover 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
06566c7a8c DBF RAT 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
91f4e97365 Rename methods 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
52135d65c5 GDAL native RAT implementation 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
5e63b0422a RAT implementation progress 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
465f627fae RAT implementation progress 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
0473d363a6 RAT save 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
d5559be0ba Sipify 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
7debc91480 sipify 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
fe2c86d7ed RAT implementation 2022-10-22 08:52:37 +10:00
Alessandro Pasotti
5a72e35c6d Initial RAT implementation 2022-10-22 08:52:37 +10:00
Nyall Dawson
3d168eddee Fix raster contour renderer ignores opacity setting
Fixes #41663
2022-09-29 19:10:59 +10:00
Nyall Dawson
dbdacac777 [feature] Add temporal manager support for WMTS layers with TIME dimension
This enhancement exposes any WMTS "time" dimensions for use in the
temporal framework, including allowing these layers to be animated
and controlled via the temporal controller.

There's some complexity involved here, because the WMTS specification
does NOT dictate how a time dimension should be exposed by services.
So different WMTS services are all handling this in different ways,
and we need to try to be as tolerant as possible.

Specifically, WMTS dimension values are just free-form strings, so
I've encountered a range of datetime formats -- e.g. "2021", "20210203",
"2021-02-03", "2021-02-03T12:13:14Z", and even WMS(T) style time
period designations ("2021-01-03T12:13:14/2021-01-05T12:15:11/P10M")!
These different formats all need special handling in order to correctly
interpret them as a date time value, and to be able to re-encode
an arbitrary datetime value back to the format string required
by the service. It's highly likely that we'll encounter additional
format strings when this feature is rolled out, and we'll need to
handle each individually.

When we do detect a time dimension on a WMTS layer, we no longer
expose this in the same way as other non-time dimensions. The browser
panel does not show the dimension values, and adding the layer
via Data Source Manager no longer prompts the user to pick from
the available time values. Instead, these layers are indicated with
a new "time capable raster layer" icon, and are added to a project
WITHOUT the user picking a specific time value.

Just like a WMS(T) layer, when a time-dimension enabled WMTS layer
is added to the project, it will default to the "automatic" temporal
mode, meaning that the layer will follow the temporal controller's
current time range by default. A user can then opt to show a specific
static time value for the layer through the layer's Temporal properties
page, by unchecking "Dynamic Temporal Control" and picking a specific
available time range from the "Predefined date" option. (Basically,
the user interaction and experience with a WMTS time enabled layer
is identical to with a WMS(T) layer).

Fixes #48364
2022-06-18 10:22:48 +10:00
Julien Cabieces
012b6a46db constify methods 2022-04-29 08:21:47 +10:00
Nyall Dawson
940175fc66 [feature] Add option to render raster and mesh elevation surface levels
using a fill symbol below the elevation surface

This can be easier to interpret in some cases, and helps match expected
symbology conventions in certain disciplines.
2022-04-27 17:30:14 +10:00
Nyall Dawson
9a99ed8800 Don't show vector layers with no interesting elevation properties
set by default in newly created elevation profiles

Fixes #48286
2022-04-22 13:07:16 +10:00
Nyall Dawson
1fc20cb026 Show elevation specific tooltips 2022-04-22 13:07:16 +10:00
Juergen E. Fischer
30e6901931 fix msvc build 2022-04-11 09:54:00 +10:00
Nyall Dawson
f4f514dd86 Add choice of band to use for elevation profiles 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
9ff504f614 Add profile line symbol setting for raster layer elevation properties 2022-04-07 19:22:19 +10:00
Nyall Dawson
12a65da674 Implement a profile generator for QgsRasterLayers
This class implements an optimised method for generating a profile
from a raster layer in a thread-safe way:

On the main thread:

- The data provider is cloned during preparation, and all other
required properties from the raster layer are copied and stored
for later thread-safe use on a background thread

On the background thread:

- The profile line is transformed to the raster's native CRS
- We then iterate over the portion of the raster which intersects
the profile line's bounding box in small tiles. We use small tiles
here as we will shortcut by skipping straight over any tiles which
don't intersect the profile line at all, without requesting their
raster data at all. Since the profile line will only cover a very
small portion of an overall raster extent, by using small tiles
we end up shortcutting and avoiding the costly tile pixel iteration
for most of the raster's coverage.
- For any tiles which DO intersect the profile curve, we fetch the
tile data and then iterate over the pixels, keeping only those
which actually intersect the profile curve. These pixel centroids
are then transformed back to the original CRS of the profile line.
- After collecting the filtered pixels centroids and their raster
(height) values, we then convert the pixel x/y locations to a
distance/chainage along the profile line, giving us an array of
distance vs height values for all pixels which intersect the profile
line.
2022-03-25 10:08:11 +10:00
Nyall Dawson
7536cc72c7 Add method to calculate pixel-perfect sub region of a raster 2022-03-25 10:08:11 +10:00
Nyall Dawson
cc24106d01 Add QgsMapLayerElevationProperties subclass for vector layers
Allows elevation properties to be set for vector layers, including:

- altitude binding
- altitude clamping
- extrusion
- scale
- offset

These properties can be set through the new "Elevation" tab in
the vector layer properties dialog
2022-03-03 06:15:10 +10:00
Nyall Dawson
2379de4a95 Add QgsMapLayerElevationProperties subclass for raster layers
Allows elevation properties to be set for raster layers, including:

- whether raster values represent heights
- scale
- offset

These properties can be set through the new "Elevation" tab in
the raster layer properties dialog
2022-03-03 06:15:10 +10:00