51 Commits

Author SHA1 Message Date
qgis-bot
2cbadecd13 auto sipify 🍺 2025-04-02 01:14:06 +00:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
2854ab55b6 Fix list 2025-04-02 11:11:10 +10:00
Jan Caha
e9cd21031f
Change how "Get Z value from project terrain" tool is presented in Mesh Editing (#60709)
* move updateZValuesFromTerrain() to QgsMeshTransformVerticesByExpression

* update widget to work with new checkbox

* move test to TestQgsMeshEditor

* fix doc

* add project to calculate()

* change version

* remove QgsExpressionContext and use QgsProject if needed

* update tests

* fix clang issue

* Apply suggestions from code review - make more readable

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* simplify

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* fix text

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* add note

* add the in string

* fix bracket and indentation

* fix docstring

* use new position if necessary

* default elevation

* do not skip values, use default Z value if not properly transformed

* simplify code

---------

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
2025-04-01 09:54:42 +03:00
Nyall Dawson
4a10066b69 Fix grammar errors in class docstrings 2025-04-01 09:44:00 +10:00
Nyall Dawson
afd2e4f42d Fix doxygen class briefs which aren't full sentences 2025-04-01 09:44:00 +10:00
Nyall Dawson
9e60e9bc5b Fix typo 2025-04-01 09:44:00 +10:00
Nyall Dawson
6d122f0038 Sipify 2025-03-30 20:48:07 +10:00
Nyall Dawson
ac71664a83 Fix multiparagraphs in initial class docstrings 2025-03-30 20:48:07 +10:00
Nyall Dawson
29050007d7 Fix class documentation which starts with "this is..."/"a class..." etc 2025-03-30 20:48:07 +10:00
Nyall Dawson
b81e0d83f6 Fix non-compliant class brief documentation 2025-03-30 20:48:07 +10:00
Nyall Dawson
39e37e1fc5 Unify QgsMeshUtils into a single utility class
This was previously a namespace split over multiple files
2025-03-29 07:55:27 +10:00
Nyall Dawson
c8198d865e Remove redundant providerType methods from raster, mesh layers
This exact same method is implemented in QgsMapLayer already
2025-02-11 09:24:35 +10:00
Jan Caha
5fc5503f42
Mesh Layer Rendering with Updated Canvas Fix (#59987)
* cannot return min max if triangular mesh does not exist

* only create QgsRenderedLayerStatistics if values changed to prevent loop in rendering

* this was set from two places, remove it from here

* Revert "this was set from two places, remove it from here"

This reverts commit 5d8fbcc321330f1054e5e07cad2ee70c0f9aa661.

* add test case for not existing triangular mesh

* only emit signals here, everything else is handled in renderer creation (avoids double rendering of the mesh layer)

* while updating the widget the component signals need to be blocked

* do not update render here

* add const

* 3D map should not update layer statistics

* update renderer settings from here,  signals are emitted from mesh layer

* update test to simulate main canvas extent update

* do rendering in single pass

* emit renderer changed and remove emit of legendChanged
2025-01-17 11:45:33 +02:00
Jan Caha
67bc6af0d5
Mesh editing delaunay refinement (#59560)
* add function delaunayConditionForEdge()

* undo command with delaunay refinement

* add delaunay refinement action

* add menu to button

* sipify

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix merge issues

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* access widget in test to directly change selected  value

* add tests

* fix docstring

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* remove pass by reference

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* pass by reference

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* fix label, add tooltip

* avoid brute forcing through faces, use review suggestion instead

* add pass by reference

* sipify

* remove leftover

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
2025-01-08 15:08:11 +02:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Jan Caha
2adaec6825
Mesh Render Extent Settings
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.
2024-12-17 12:46:50 +10:00
Jan Caha
254614b393
Mesh layer remove datasetgroup (#59382)
* add removeDatasetGroup() function for mesh data provider and mesh layer

* make dataset group names unique

* fix typo

* add mesh removing to the widget

* fix icon

* add check that added dataset group path is unique to avoid duplicate data and emit message if it is not

* sipify

* fix mistake

* check if uri is correct - just for case

* add tests

* add tests

* fix docstring

* add docstring

* add missing override

* explicitly convert number to string

* update tests to reflect that you cannot add same file as dataset group twice

* fix docstring

* pass by value

* fix docstrings

* const variables

* rename signal

* drop include

* simplify regex

* make test better

* sipify

* add docstring

* fix styling and typo

* fix tests

* fix precommit issues

* fix issue

* Update src/core/mesh/qgsmeshlayer.h

fix docstring

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* const stuff

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* sipify

---------

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-11 16:06:17 +02:00
Nyall Dawson
2084479191 Fix flipped docstrings 2024-10-15 15:00:05 +10:00
Nyall Dawson
cbb741fb35 Use correct subheader underline 2024-09-04 13:54:39 +10:00
Nyall Dawson
534ca73c59 Fix missing see also trailing notes in PyQGIS documentation 2024-09-04 06:32:03 +10:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
765cbb32db Standardise some deprecated annotations 2024-09-02 11:42:12 +10:00
Nyall Dawson
519959154a Fix some overly verbose class "brief" descriptions 2024-08-28 11:58:21 +10:00
Nyall Dawson
f90a7c04b1 Raw code block should use 'text', not 'raw'
'raw' gives an error when building the PyQGIS docs
2024-08-23 09:26:18 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Nyall Dawson
886074c913 Rename 'None' enum members in public API
These clash with the Python bindings, where the enum value
becomes unusable
2024-08-06 19:49:10 +10:00
Nyall Dawson
c2c75f3b19
More no-value dox removal 2024-07-25 09:04:22 +10:00
Nyall Dawson
6d829ff7b4 Drop some more no value documentation 2024-07-25 04:02:55 +10:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
28943f9c1b Remove a bunch of useless default constructor doxygen 2024-07-23 02:08:28 +10:00
Nyall Dawson
145de5fb5e
Move QgsDataProvider::ReadFlag to Qgis::DataProviderReadFlag
and promote to enum class
2024-07-18 10:01:59 +10:00
Nyall Dawson
c8d66e1e8d Add method to retrieve significant elevation values from a layer 2024-05-20 11:52:10 +02:00
Nyall Dawson
f62e945578 Improve documentation 2024-05-14 12:00:10 +10:00
Nyall Dawson
701af9462b Rename to parentQuantityName 2024-05-14 12:00:10 +10:00
Nyall Dawson
0ff90a5698 When matching render elevation range to layer ranges, only consider
datasets from the same parent group
2024-05-14 12:00:10 +10:00
Nyall Dawson
4eb7661d85 Add fixed elevation range per dataset group mode for mesh layers
This mimics the "fixed range per band" mode we have for raster layers,
but allows a per-dataset group elevation range to be set for
mesh layers
2024-05-14 12:00:10 +10:00
uclaros
eee787f825 return magnitude multiplier based on units set 2024-05-07 10:22:36 +02:00
uclaros
3d4c19d3b3 Add support for Wind Barb rendering for mesh vector datasets 2024-05-07 10:22:36 +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
40847d0596 Avoid some unnecessary redraws 2024-03-19 13:29:40 +10:00
Nyall Dawson
0bb3a26b20 Implement fixed elevation range for mesh layers
Just like the equivalent mode for raster layers, this mode indicates
that a fixed constant z range should be applied to the entire mesh
layer.
2024-03-19 13:29:40 +10:00
Even Rouault
a68422b982 Various typo fixes
Including 3 public methods, which are deprecated by this commit and replaced by a typo-fixed version
2024-02-29 06:03:03 +10:00
Nyall Dawson
0096246afe Sipify 2024-02-13 20:51:03 +10:00
Nyall Dawson
814e6db3b4 Don't map non-list of QVariantMaps to QMap<QString,QVariant>
The original workaround was only supposed to apply to QList/
QVector of QVariantMaps. By replacing them all in sip we
break mapping of signals defined in c++ which are emitted
by Python code.

Fixes exceptions after running processing algorithms in Qt6
builds.
2024-02-12 12:16:14 +10:00
Alexander Bruy
d8e21a8906 rename QgsMeshRendererScalarSettings enum value from None to NoResampling to avoid issues with Python bindings (fix #51033) 2024-01-24 14:52:19 +02:00
Nyall Dawson
4654ad3db5 Sipify 2024-01-23 08:32:38 +01:00
uclaros
c8468d45e0 cmon sip... 2024-01-08 05:20:26 -08:00
uclaros
02ab91329b address review 2024-01-08 05:20:26 -08:00