24 Commits

Author SHA1 Message Date
Nyall Dawson
c8d66e1e8d Add method to retrieve significant elevation values from a layer 2024-05-20 11:52:10 +02:00
Nyall Dawson
4383a3a225 Add "dynamic elevation range per band" mode for rasters
In this mode, the user can specify a QGIS expression for the
lower and upper value corresponding to raster bands, using
variables like @band, @band_name and @band_description.

E.g

    @band * 100

Can be used when each band represents a 100 m vertical slice
of data.

The expression will be evaluated when required to determine
the actual elevation range corresponding to each band.

This differs from the existing "Fixed Elevation Range Per Band"
mode in that "Fixed Elevation Range Per Band" requires users
to manually enter an elevation for each band separately,
and these values are then treated as constants. That mode works
best for rasters with non-regular steps in the band
elevation values, while this new mode is better for regular
band elevation steps
2024-03-21 12:33:33 +01:00
Nyall Dawson
f1e3ba9e2d Use correct sip method
And use INDENT-OFF annotations to avoid astyle messing up
formatting of enum with inline macros
2024-01-31 13:48:49 +10:00
Nyall Dawson
23f3af4290 Use enum classes for QgsProperty property keys
Should fix usage on Qt 6 builds
2024-01-31 13:48:49 +10:00
Nyall Dawson
d05c898922 Implement elevation properties for tiled scene layers
Allows offsetting and scaling z value in the scene by specified
amounts
2023-08-23 13:59:20 +02:00
Denis Rouzaud
5bccd556e2
move QgsTolerance::UnitType to Qgis::MapUnitType (#53347)
* move QgsTolerance::UnitType to Qgis::MapUnitType

* missing forward declaration

* forward declaration

* use MapToolUnit

* forward declaration

* sipify

* fix tests

* Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* forward declaration

* forward declaration

* forward declaration

* sipify

* fix missing parenthesis

---------

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-06-06 18:33:50 +02:00
Nyall Dawson
e415cad690 Avoid unnecessary layer redraw 2022-05-01 09:13:08 +10:00
Nyall Dawson
6ca9c4bdc1 Clearer name for signal 2022-05-01 09:13:08 +10:00
Nyall Dawson
6f8d668acd Add signals for when layer elevation properties change 2022-04-27 10:24:12 +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
Nyall Dawson
71c1c24d56 A vector layer with z values present should default to "relative"
clamping mode, not "clamped to terrain"
2022-04-22 11:40:29 +10:00
Nyall Dawson
61d39a2e14 Fix doc warning 2022-04-14 14:16:26 +10:00
Nyall Dawson
935a49aa52 Add framework for data defined elevation properties 2022-04-14 14:16:26 +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
77b9066e92 Add QgsMeshLayerElevationProperties subclass of
QgsMapLayerElevationProperties
2022-04-07 19:22:19 +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
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
0c7df50126 Add framework for calculating the overall elevation/z range of a QgsProject 2020-11-28 16:45:54 +10:00
Nyall Dawson
2632627d39 Add point cloud implementation of QgsMapLayerElevationProperties 2020-11-28 16:45:54 +10:00
Nyall Dawson
89a7e3c7f7 Implement responsive map refresh when canvas z range changes 2020-11-28 16:45:54 +10:00
Nyall Dawson
7c964f1d41 Add base class for QgsMapLayerElevationProperties
Base class for storage of map layer elevation properties.
2020-11-28 16:45:54 +10:00