5123 Commits

Author SHA1 Message Date
Mathieu Pellerin
be91ea1909 [api][profiler] Add a function to export the current runtime profiler model content as text 2023-09-13 12:41:00 +07:00
Nyall Dawson
b70fe25051 Add method to manually insert an entry into the runtime profiler
Useful when we will be manually calculating runtime duration and
want to push this value to the runtime profiler
2023-09-12 19:30:24 +10:00
Nyall Dawson
0a752b7d13 Add opt in setting for map renders to enable render time profiling,
and enable for main canvas renders only

And explicitly disable for main canvas preview jobs too
2023-09-12 19:30:24 +10:00
Nyall Dawson
dce7bbdeb1 [api] Add opt-in setting to make QgsVectorFileWriter transfer
field constraints to the output file

This is opt in to avoid potentially breaking existing scripts/plugins.
2023-09-12 13:23:06 +10:00
Marco Hugentobler
8f8cfa949c Added since QGIS 3.34 in comment 2023-09-12 11:35:23 +10:00
Marco Hugentobler
3fbfba3715 Possibility to apply default values for the processing gui from the settings 2023-09-12 11:35:23 +10:00
Yoann Quenach de Quivillic
a1e9692755 Handle grid frame in rect frame computation 2023-09-08 05:21:07 +10:00
Nyall Dawson
5fe84b0a55 [cesium] Add support for deprecated gltfUpAxis asset setting
Adds support for Z up gltf content
2023-09-07 09:09:24 +02:00
Yoann Quenach de Quivillic
05b79d7825 Fix groups with rotated item (still glitchy when resizing with mixed rotation though) 2023-09-06 13:07:11 +10:00
Jean Felder
d7bdfe000c geometry: Remove duplicated 2d boundingbox logic 2023-09-02 12:38:44 +10:00
Jean Felder
cdc2abea90 qgsgeometry: Add support for 3D boundingbox 2023-09-02 12:38:44 +10:00
bdm-oslandia
40089e6230 qgsabstractgeometry: Add support for box3d intersection 2023-09-02 12:38:44 +10:00
bdm-oslandia
5774acf8d0 qgsabstractgeometry: Add boundingBox3D logic
With this change `QgsAbstractGeometry::calculateBoundingBox()` is now
computed from `QgsAbstractGeometry::calculateBoundingBox3D()`.
2023-09-02 12:38:44 +10:00
Harrissou Sant-anna
9f009a947e Fix "Metadata Search" tab toolTip in Data source Manager 2023-09-01 10:07:50 +10:00
Mathieu Pellerin
34e247cbbd Address review 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
53b0763346 Add documentation, adjust tests 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
51ca525256 [renderer] Use a UUID string to identify graduated renderer legend symbols 2023-09-01 07:51:39 +10:00
Mathieu Pellerin
ae8b980800 [renderer] Use a UUID string to identify categorized renderer legend symbols 2023-09-01 07:51:39 +10:00
Nyall Dawson
156e5db76f Add choice of two different modes for "Refresh Layer at Interval"
The old behaviour was always to just redraw the layer, without
refreshing data. This was by design, as the feature was originally
developed to allow animated layers which needed to be regular,
quickly redrawn.

But there's also a use case for automatically refetching layer
data on a regular interval too. So now we expose a choice
of mode for the automatic refresh for users to decided which
is appropriate for their requirements.

The options are:

- "Reload Data": The layer will be completely refreshed. Any cached
data will be discarded and refetched from the provider. This mode
may result in slower map refreshes.

- "Redraw Layer Only": This mode is useful for animation or when
the layer's style will be updated at regular intervals. Canvas
updates are deferred in order to avoid refreshing multiple times
if more than one layer has an auto update interval set.

The changes are all wrapped up in a new reusable widget, so that
we can easily expose this setting for non vector/raster layers
if we want to in future.

Fixes https://github.com/qgis/QGIS/issues/39830
2023-08-30 09:42:59 +10:00
Nyall Dawson
2863e4842f Expand documentation for QgsMapLayer.setDataSource
Fixes #54381
2023-08-29 09:18:58 +10:00
Nyall Dawson
2346f75366 Correctly calculate model child dependencies when a model step
uses expressions for parameter values and contains variables
generated by another step in the model

We were showing links for these in the model designer so it
appeared as though the dependencies were there, but at actual
execution time there was nothing forcing the child which generated
the variable to be run before the child using the variable.
2023-08-26 05:06:40 +10:00
Nyall Dawson
440cac298f Promote QgsProcessingModelChildParameterSource source to enum class and move to Qgis
This wasn't marked as stable API, so we don't need any of the usual monkey patching code
2023-08-25 15:44:05 +10:00
Nyall Dawson
3707702af4 Add a processing output type for variant values
Should be used when the output is a flexible type and may represent
any QVariant value.
2023-08-25 15:44:05 +10:00
Nyall Dawson
8df81beff0 Add a new processing log level for debugging models
At model debug log level we'll show all the generic
logs for step preparation, inputs and outputs for every
child algorithm, including those which we normally skip
(eg raise warnings/outputs, string concatenation, etc).
This gives model designers more useful information to
debug their models.

Use this new log level when running models through the
model designer window.
2023-08-25 15:02:52 +10:00
Nyall Dawson
13fe41dc0e Add a fallback fill symbol to the 2d tiled scene texture renderer
to use when scenes have no textures available for some primitives

Since there's no way to determine in advance whether or not a scene
will actually have textures, this prevents the non-ideal situation
arising where no content is shown on the map because we default
to the texture renderer and don't have any textures to draw.
2023-08-24 18:27:23 +10:00
Nyall Dawson
e4770a18eb Don't try to render line primitives if the renderer won't do anything with them 2023-08-23 14:08:21 +02:00
Nyall Dawson
64a4ad086c Render line primitives when rendering tiled scenes in 2d with
the wireframe renderer
2023-08-23 14:08:21 +02: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
Yoann Quenach de Quivillic
9a9e8afdef Apply suggestions from code review 2023-08-23 11:14:42 +10:00
Yoann Quenach de Quivillic
91e26c8997 Fix #54139 - Add option to auto-open exported PDF 2023-08-23 11:14:42 +10:00
Nyall Dawson
c25596269f Add method to translate QgsMatrix4x4 by QgsVector3D 2023-08-22 12:29:59 +10:00
Nyall Dawson
816c274bb4 Handle RTC_CENTER offsets specified in the feature table
of legacy B3DM files

See https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel#feature-table
2023-08-22 12:29:59 +10:00
Nyall Dawson
82e8212971 Apply suggestions from code review 2023-08-18 14:10:02 +10:00
glebpinigin
77f8fecae8 Version added to sip 2023-08-18 14:10:02 +10:00
glebpinigin
c8ff4df805 Updated sip wrappers 2023-08-18 14:10:02 +10:00
Sandro Mani
6a35c9a626
Merge pull request #54267 from kadas-albireo/synclegend
Synchronously fetch legend graphics when exporting layouts to PDF
2023-08-18 02:13:47 +02:00
Sandro Mani
4670159162 Synchronously fetch legend graphics when exporting layouts to PDF 2023-08-17 10:02:58 +02:00
Nyall Dawson
c7563cec70 Add generic API to allow map layer renderers to show temporary in
progress preview render results while drawing the layer, which
differ from the final layer render

The immediate use case here is for rendering tiled scene layers.
In order to generate the actual final render for these layers,
we need to first fetch ALL content for the render and then sort
the primitives by z value. But this means that the layer renders
can be extremely slow, with no visible changes on the map until
all the content fetching is complete. Not great user experience!

Instead, here we add the infrastructure so that a layer renderer
can get a temporary image to paint to for any partial renders.
This image gets used during map composition up until the layer
finally finishes rendering, at which time the layer's actual
destination image will be used for the composition.

This means that tiled scene renderers can now draw all tiles
(with unsorted primitives, and the artifacts which come with
that) as soon as we fetch each tile. This gives the user an
immediate visual reflection that the tiles are being fetched
and that how quickly (or slowly) that is happening. As soon
as we've got all tiles, the layer render will be immediately
switched to the version in which all content is rendered
in the correct z order.

As a bonus, we draw these temporary in progress renders
over any previously transformed cache version of the layer
available. So eg when you zoom in, you'll get a zoomed in pixelated
version of the last render which gets progressively drawn
over with each tile as it is fetched.

This same API could be used in future eg with point cloud
rendering when points are being sorted by z value to give
timely visual feedback.
2023-08-16 11:00:37 +10:00
Nyall Dawson
c8cf3d3509 When exporting layouts with a tiled scene layer set to texture renderer,
force the layer to be rasterised

There's no benefit in exporting these layers as a bunch of triangular
images which are pieced together, that adds a lot of extra content to
the exports and results in files which can be extremely slow to open
and render in other viewers.
2023-08-15 18:14:53 +10:00
Martin Dobias
fe941e3c21 Tiled scene: improve handling of URLs
- added QgsTiledSceneTile::baseUrl() to get URL that generated the tile and thus
  base URL for resolving relative paths of linked content
- resolution of relative URLs should work also when sub-tree JSON files are in
  a different path than the root tileset JSON
- all content URLs are now using scheme - URLs of local files start with file://
- removed duplicated code to resolve relative URLs in GLTF parsing and chunk loading
2023-08-11 22:23:20 +02:00
Nyall Dawson
78b99d5578 Remove texture color renderer, and replace with checkbox option
in wireframe renderer
2023-08-11 18:28:21 +10:00
Nyall Dawson
29b421e2d0 Correctly set default fill symbol for wireframe renderer 2023-08-11 18:28:21 +10:00
Nyall Dawson
939877f51e Rename mesh renderer to wireframe renderer 2023-08-11 18:28:21 +10:00
Nyall Dawson
80ec3d9c94 Use float for texture coordinates 2023-08-11 18:28:21 +10:00
Nyall Dawson
07db119e44 Const 2023-08-11 18:28:21 +10:00
Nyall Dawson
59c6ca95db Add option to show boundaries 2023-08-11 18:28:21 +10:00
Nyall Dawson
3c7f0730e5 Implement 2d renderer for tiled scenes
We currently offer three renderer choices:
- Textured (default). Loads the texture image and paints the mesh using
  these textures
- Texture color. Uses the center point color for rendering each mesh
  triangle. Gives a clear visual overview of the mesh structure while
  also providing some context via the texture color
- Mesh. Renders the scene's mesh using a fill symbol
2023-08-11 18:28:21 +10:00
Nyall Dawson
3ac33d1477 Fix doxygen test 2023-08-10 10:41:23 +02:00
Nyall Dawson
0e363e66c2 Remove abstract class for bounding volumes, and always treat
bounding volumes as OBB

Greatly simplifies the code. There's a small loss of efficiency
since we will always be expanding out spheres to their bounding
boxes, but given we always require boxes for QGIS 3d nodes
anyway this will only impact 2d rendering.
2023-08-10 10:41:23 +02:00
Nyall Dawson
3e25c977a0 Use numeric IDs for tiled scene tiles instead of uuids 2023-08-10 10:32:55 +10:00