64 Commits

Author SHA1 Message Date
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
Peter Petrik
d7afb710d7 [mesh] [feature] add opacity slider to mesh contours settings 2018-08-28 09:17:31 +02:00
Martin Dobias
26631b3d44 Rename faceIsActive() to isFaceActive() 2018-08-20 11:56:27 +02:00
Peter Petrik
419ec1f736 [mesh] fix bug in rendering datasets with inactive faces 2018-08-20 11:56:27 +02:00
Martin Dobias
6d1e420c71 min/max to minimum/maximum renaming 2018-08-17 09:34:41 +02:00
Martin Dobias
d91e12d417 Fix missing min/max values for classification when changing datasets
The min/max values were stored in the color ramp shader, but to my surprise
these values were never persisted or copied: pseudo-color raster renderer
has a separate storage for the min/max values, so we need that for mesh renderer
as well.

The QgsRasterShaderFunction is not really useful, and QgsColorRamp should not
be derived from it, making things just more confusing.
2018-08-17 09:34:41 +02:00
Martin Dobias
ca657179f9 Address Peter's points from review 2018-08-15 14:42:45 +02:00
Martin Dobias
767a7b0f5c Travis fixes 2018-08-14 19:53:27 +02:00
Martin Dobias
358d12946b Read/write mesh styling from/to project files 2018-08-14 16:42:13 +02:00
Martin Dobias
9fc2e3e148 Make scalar/vector rendering settings per dataset group
Until now there was just one scalar and vector configuration
for a mesh layer. It is however most useful to have different
rendering settings for each dataset group (quantity).
2018-08-14 16:42:13 +02:00
Martin Dobias
feddb3d3e6 Encapsulate all mesh renderer stuff in one class + fix legend updates 2018-08-14 16:36:09 +02:00
Martin Dobias
d093455725 Save extra datasets of mesh layers in project files
Some formats like .2dm only contain definition of mesh structure,
in order to show some data users need to add extra files with data
on that mesh. Until now the extra datasets were not persisted.
2018-08-14 16:30:09 +02:00
Martin Dobias
9273090d16 Fix issues around enabled/disabled state of scalar/vector rendering 2018-08-14 16:30:09 +02:00
Peter Petrik
271bab1756 introduce DataType for mesh dataset data definition and small fixes 2018-08-10 14:40:46 +02:00
Peter Petrik
9ea0bc2a1e format code and add documentation 2018-08-10 09:24:31 +02:00
Peter Petrik
c79e1d0601 [mesh] [feature] add function to identify value on the point 2018-08-09 16:45:20 +02:00
Peter Petrik
21613cd132 use MDAL Groups instead of guessing them from dataset names 2018-07-19 11:30:52 +02:00
Peter Petrik
aeea184890 [mesh] [feature] App widgets for styling mesh layers
- Adding datasets to mesh layer from properties panel
- Information and source panel in properties panel
- Selection of active dataset (properties or styling panel)
- Styling of contours/scalars (properties or styling panel)
- Styling of mesh frame (properties or styling panel)
- Styling of vector arrows (properties or styling panel)
2018-06-26 08:50:19 +02:00
Nyall Dawson
2ed144ac59 Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are
top level const.

const values in declarations do not affect the signature of a
function, so they should not be put there.
2018-06-05 10:19:13 +10:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Juergen E. Fischer
499459be4b fix build with SIP <4.19 2018-05-27 19:17:12 +02:00
Nyall Dawson
9f650fead9 Fix incorrect param docstring when doxygen \param has extra
trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00