85 Commits

Author SHA1 Message Date
Peter Petrik
d211de2204
Other average methods 3d mesh (#33426)
[FEATURE] [MESH] add new 3d stacked mesh averaging methods (top, bottom, sigma, depth, height, elevation)

see https://fvwiki.tuflow.com/index.php?title=Depth_Averaging_Results for description of the methods. method can be selected for 3d stacked mesh dataset in the new widget added for QGIS 3.12 in the mesh layer styling dialog
2019-12-20 07:48:39 +01:00
Peter Petrik
e1068e61cb
Merge pull request #33388 from PeterPetrik/mesh3d_averaging_methods 2019-12-18 09:57:22 +01:00
Peter Petrik
a6bc4e3cdf fix doc 2019-12-18 07:51:07 +01:00
Vincent Cloarec
c252a3ad4c [mesh] Fixes time reference for mesh layer #32186 #33399 #31933 (#33410)
[FEATURE] [mesh] Load reference time from MDAL when available

Also adds combo box to let the user set the provider time unit. This is particularly useful when MDAL incorrectly recognised the time units in the raw dat format (for example format does nof follow spec and it is not possible to determine if time interval is in hours or days)

fix #32186 
fix #33399
fix #31933
2019-12-17 14:56:49 +01:00
Peter Petrik
2564b021d8 introduce way for plugins to retreive 3d stacked data values [API] 2019-12-13 16:30:14 +01:00
Peter Petrik
6febf38e10 [mesh] support active flag capability of MDAL. mesh layers for datasets that does not support active flags should not take less memory and load faster 2019-12-12 08:37:55 +01:00
Peter Petrik
b93dfdd0b3
[feature] Support datasets with data defined on faces in mesh calculator (#33248)
* [feature] support datasets with data defined on faces in mesh calculator, fix #30219, fix #30170

added "driver" and "group name" to the calculator interface.
MDAL now supports 3 drivers for storing results, so user must be able to choose appropriate driver and dataset group name (some drivers store multiple groups to 1 file)
2019-12-06 18:27:28 +01:00
Nyall Dawson
61903a766a Fix some build warnings, clazy warnings 2019-12-06 08:48:40 +10:00
Peter Petrik
7df4ec7f4a fix issues from 2nd review 2019-12-05 07:08:50 +01:00
Peter Petrik
d1dd68ae11 remove averaging settings class and expore averaging methods outside qgis core 2019-12-05 07:08:50 +01:00
Peter Petrik
a30bda6c3d [FEATURE] Initial implementation of QEP 158: Support of 3d stacked meshes in QGIS.
Stacked 3D meshes store values on the volumes that are regularly stacked over base 2d mesh. User can select various 3d to 2d averaging/interpolation method to convert values on volumes (3d) to values on faces (2d) that can be shown in mesh layer. This is achieved by new tab in the mesh layer properties dialog.
2019-12-05 07:08:50 +01:00
Vincent Cloarec
7f415ca7a7 [FEATURE] Static particle traces for rendering mesh vector dataset (#33165)
* [FEATURE] Static particle traces for rendering mesh vector dataset

This PR permits to display directly in QGIS static particle traces for vector datasets in mesh layer without any plugin.
The user can choose in the mesh layer properties window :
- the color
- the size of the traces (line width)
- the count of particles
- the maximum length of the particle's tail
2019-12-03 08:13:36 +01:00
Vincent Cloarec
6d4c995a28 [FEATURE] API for rendering frames for mesh vector dataset animation (particles) (#33110)
* [FEATURE] API for rendering frames for mesh vector dataset animation (particles) 

Adds a renderer to generate frames that represent particle traces in a vector field of a mesh layer. The renderer cannot be chosen in the current GUI, however crayfish plugin can use API to generate avi/gif files with nice animations representing the movement of (random) particles in the mesh layer vector field.
2019-11-29 09:06:47 +01:00
Peter Petrik
23ae038da4
fix docs for streamlines (#33054) 2019-11-25 10:14:25 +01:00
Vincent Cloarec
938aa58df8 [FEATURE] Streamlines Renderer for vector dataset on mesh layer. (#32996)
* [FEATURE] Mesh streamlines

fix #29534

The vector field data set in a mesh layer can currently be only rendered with arrows. This PR adds a new feature to render vector field in mesh layers with streamlines. 
The streamlines are seeded from start points. The seeding points can start from the vertices of the mesh, from a used grid or randomly. Streamlines could be coloured or width can be selected.
2019-11-25 08:54:11 +01:00
MUrban
3f33701da1 [feature] [mesh] fix #29326 Adding SIP_SKIP for datasetPlaybackInterval 2019-10-31 09:09:47 +01:00
MUrban
32cfedd074 [feature] [mesh] fix #29326 Adding playback function for mesh datasets 2019-10-31 09:09:47 +01:00
Peter Petrik
dd98331ace [feature] [mesh] fix #31550 Expose new methods in analysis library for exporting contours for mesh layers
The mesh styling dialog now has new combo box for selection of resampling method for datesets defined on faces.
Also the analysis library has new class QgsMeshContours with export function for contour lines and contour polygons.
2019-10-29 23:16:04 +01:00
Juergen E. Fischer
b81d306047 spelling fixes (closes #32408) 2019-10-26 10:50:30 +10:00
Nyall Dawson
3112332227 Rename variable for clarity 2019-10-09 15:01:51 +10:00
Nyall Dawson
cb06519d16 [api] Add API to indicate that individual layers may be loaded without any
CRS validation, regardless of the user's settings

This avoids hacks put in place in other parts of QGIS code or in plugins
to temporarily deactivate the CRS validation prompt, providing a supported,
stable method to indicate that when loading a particular layer no CRS
validation is required.
2019-10-09 15:01:51 +10:00
vcloarec
109049ea86 Implementation of QgsMeshLayer::reload() and QgsMdalProvider::reloadData()
Implementation of this override method permit to reload mesh end dataset groups when the data changed outside of the QGIS application.
2019-05-03 15:26:22 +02:00
Alessandro Pasotti
87998f7f7d Pass transformContext to raster writer 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
394a189682 Fix class documentation 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
b3a448a2b2 Do not store context in layer (but in provider) ...
... also use transform context in raster projector
and deprecate setCrs without context
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
7b6f9c0dbc Restore default ctor for options and layer 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
82f2cb18b2 Deprecate default ctor for mesh layer options 2019-04-17 10:06:41 +10:00
Alessandro Pasotti
470759833e coordinateTransformContext -> transformContext for consistency
I like "coordinateTransformContext" more btw.
2019-04-17 10:06:41 +10:00
Alessandro Pasotti
df2bdf9c1a Handle the coordinate tranform context in the layer ctor
Also use the context when read/write XML by passing it
in the R/W context
2019-04-17 10:06:41 +10:00
Peter Petrik
37faa0d883
Add option to format time in mesh layer (#9452)
[feature] [mesh] #20731 add option to format time in mesh layer

There is new settings dialog that can be opened by button next to time slider. User can set reference time and time format (e.g. 2019-03-21 22:01:11).
2019-03-15 08:42:28 +01:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
uclaros
403a2e302e Ran scripts/astyle-all.sh and scripts/sipify_all.sh 2019-02-25 09:26:11 +10:00
Bas Couwenberg
371176357b Fix spelling errors.
* cancelation -> cancellation
 * overal      -> overall
2019-02-24 22:39:40 +01:00
Peter Petrik
27c670e78d expose mesh spatial index similarly to vector spatial index to API. fix travis issues and documentation 2019-01-24 16:24:46 +01:00
Pierre-Eric Pelloux-Prayer
96a9a7238a Remove unnecessary includes 2019-01-22 21:45:38 +01:00
Peter Petrik
1b11ba43a2 fix docs 2019-01-21 11:01:12 +01:00
Peter Petrik
7423a74915 add option to export mesh dataset to raster block (for processing algs) 2019-01-21 11:01:12 +01:00
Peter Petrik
cd9a84e11c [feature] [mesh] Mesh Calculator
Similarly to raster calculator, mesh calculator can take dataset groups from current mesh layer and
combine them with various aritmentic/logical operators to new dataset group.
2019-01-14 12:32:36 +01:00
Peter Petrik
11f10c10c2 add documentation 2018-12-07 15:54:16 +01:00
Peter Petrik
fa1ddb1f7a fix spellcheck 2018-12-07 15:54:16 +01:00
Peter Petrik
28071728f1 [mesh] use MDAL 0.1.0 API in QGIS. Allows lazy loading of formats and effective transfer of data
introduce MeshDataBlock

use mesh block in rendering

calculate magnitude

use new mesh API

fix bug for memory layer

fix SIP, sip is unable to work with qvector<qgsmeshvertex>

fix tests

implement new MDAL min/max api

improve mesh documentation

fix travis build
2018-12-07 15:54:16 +01:00
Denis Rouzaud
f27a5043bb remove useless includes 2018-10-09 11:48:33 -08:00
Peter Petrik
11645ac744 implement simple cache for rendering of mesh layer 2018-09-24 11:04:50 +02:00
Denis Rouzaud
cb9774022f create dialog for saving different styles 2018-09-14 16:35:30 +10:00
Denis Rouzaud
15e0d873d9 select categories in copy style in legend menu entry
not working yet, just set the menu entries
QgsMapLayerStyle::StyleCategory has moved to QgsMapLayer to avoid making QgsMapLayerStyle a QObject and they are mostly used in QgsMapLayer
2018-09-14 16:35:30 +10:00
Denis Rouzaud
51e9be0575 add API to select section of layer style when reading/writing 2018-09-14 16:35:30 +10:00
Peter Petrik
c89b7722a3 fix review items from Nyall 2018-09-05 09:00:30 +02:00
Peter Petrik
6ee9a47463 [mesh] [feature] allow render vectors/arrows on the user-defined grid 2018-09-03 16:31:35 +02:00
Peter Petrik
f0ede773c2 [mesh] [feature] allow to choose different vector and scalar dataset 2018-09-03 19:41:07 +10:00