251 Commits

Author SHA1 Message Date
Alexander Bruy
0f93479e1c support for raster calculator expressions in expression parameter 2023-09-25 14:14:41 +03:00
Alexander Bruy
81dbdd8bae
Merge pull request #53874 from alexbruy/processing-port-align-raster-tool
Port Align rasters tool to Processing
2023-09-14 16:29:49 +03:00
Alexander Bruy
623e459867 fix patching 2023-09-14 10:46:54 +03:00
Alexander Bruy
79ea6d9936 address review 2023-09-13 13:01:59 +03: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
5fe84b0a55 [cesium] Add support for deprecated gltfUpAxis asset setting
Adds support for Z up gltf content
2023-09-07 09:09:24 +02: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
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
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
Alexander Bruy
6dffd72d57 sipify 2023-08-23 08:40:09 +03: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
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
9f57fb2ef0 Rename "tiled mesh" to "tiled scene"
Better reflects that these types can contain lines and point
data, not just meshes
2023-08-05 21:31:49 +10:00
Nyall Dawson
5597a2a640 Add flags to QgsTiledMeshRequest 2023-08-05 05:05:46 +10:00
Nyall Dawson
12bf02cc89 Avoid ambiguity in 'refinement' naming, remove ambiguity about
whether a tile has children available, no children, or not-yet-
fetched children
2023-08-05 05:05:46 +10:00
Nyall Dawson
f3c987f5e5 Introduce QgsTiledMeshTile
Represents an individual tile from a tiled mesh scene
2023-08-05 05:05:46 +10:00
Nyall Dawson
37ec173868 Add Qgis::SymbolLayerUserFlags for user-controlled flags which
alter the handling of symbol layers

These differ from Qgis::SymbolLayerFlag in that
Qgis::SymbolLayerFlag flags are used to reflect the inbuilt properties
of a symbol layer type, whereas Qgis::SymbolLayerUserFlag are optional,
user controlled flags which can be toggled for a symbol layer.

Add a flag `DisableSelectionRecoloring` which can be set for
symbol layers which prevents the layer from being recolored to
the render context selection color even when the feature
being rendered is selected

This provides a mechanism for an individual symbol layer to
avoid the forced recolor of selected features.
2023-08-02 12:49:01 +10:00
Nyall Dawson
e5bddbab1a Don't discard custom color/symbol when changing layer selection
mode
2023-07-29 18:36:11 +10:00
Nyall Dawson
f658e5de7b Create class for representing tiled mesh node bounding volumes
And implement for sphere, region and oriented box bounding volume
types
2023-07-18 12:35:45 +02:00
Nyall Dawson
95dc22f6b5 Fix handling of ' in enum docstrings in sipify 2023-07-09 22:48:59 +10:00
Nyall Dawson
71d6188e3d Add method to return CRS type, based on proj_get_type() values
And show in CRS details for layer properties
2023-07-09 22:48:59 +10:00
Nyall Dawson
4557632c46 Move enum 2023-06-28 17:47:17 +10:00
Nyall Dawson
8adb33cbcf Add TiledMesh to Qgis::MapLayerType enum and partially handle 2023-06-28 17:47:17 +10:00
Nyall Dawson
61a3f44e98 Provider registry tiled mesh file handling support 2023-06-28 17:39:09 +10:00
Nyall Dawson
391ab37539 Another 3.32 -> 3.34 update 2023-06-27 14:49:20 +10:00
Nyall Dawson
eca6b7a409 Add framework for handling non-keyboard/mouse map controllers
This is the base API interface classes for creation of custom
2d or 3d map controllers, and registering them in a common
QgsInputControllerManager singleton class.
2023-06-27 14:49:20 +10:00
Nyall Dawson
26493802dc Move some QgsRasterFileWriter enums to qgis 2023-06-15 08:28:44 +10:00
Nyall Dawson
7a784cdfd6 Flag OneDrive remote folders as remote, slow to open paths on Windows
Refs #51710
2023-06-08 14:06:01 +10: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
a764e2da76 Expose setting for point text annotations to control how
the text annotation should handle map rotation

Previously, text annotations just ignore map rotation, which
matches how regular map labels are handled. But this is not
desirable for some point text annotations, where it can
be considered a bug that the item ignores the map rotation (eg
when a text annotation has been placed to align with a feature
on the map, such as a road)

There's no one "correct" behaviour here, so add a new
combo box widget in the annotation point text settings with
options for
"Ignore Map Rotation"
"Rotate With Map"
so that users can pick the desired behavior for their annotations
2023-06-02 17:26:07 +10:00
Nyall Dawson
bb5cfb87ff Add no labels option 2023-05-29 14:18:35 +10:00
Nyall Dawson
ddc0012f9c Add api to set a label suffix and placement for labels in plot axis 2023-05-29 14:18:35 +10:00
Nyall Dawson
33ffe9f6b9 [api] Add framework for exporting elevation profile results
as vector layers
2023-05-27 06:34:04 +10:00
Nyall Dawson
6c4f96a5aa Add "Fill Above" mode for elevation profile drawing
Fixes #51074
2023-05-22 14:48:57 +10:00
Nyall Dawson
7ee5e32211 Add flag to indicate that vector tile provider matrix set should
always be used for the layer (as opposed to any previously
stored matrix sets)

For some vector tile data providers this is more appropriate --
specifically for those with tilemap information where we MUST
ensure that the tilemap matches the data source or missing
tiles may be present. (If we store the matrix set information
in projects then loading older projects may mean that a stored
tilemap is out-of-sync with the actual data source's current
tilemap).
2023-05-16 19:57:02 +10:00
Nyall Dawson
12c261b75b Move vector tile provider capabilities enum to Qgis 2023-05-16 19:57:02 +10:00
Nyall Dawson
bc2cc98790 Read ESRI tilemaps in vtpk and arcgis tile services
This allows us to correctly handle "indexed" vector tile sets,
where higher zoom level tiles may be missing where a lower
zoom level tile is deemed to have sufficient detail for higher
zoom levels.
2023-05-16 19:57:02 +10:00
Nyall Dawson
b0d67ecddf Move QgsVectorFileWriter::SymbologyExport to Qgis, promote to enum class 2023-05-15 16:38:52 +10:00
Alessandro Pasotti
f63dd2c360 Move CadConstraintType to Qgis, translate degree symbol 2023-05-12 06:32:11 +10:00
Julien Cabieces
09eac909fa register flags with Q_FLAG not Q_ENUM 2023-05-11 05:50:14 +10:00
Alexander Bruy
10b02e02ed move expression type enum to qgis.h 2023-05-02 14:00:43 +02:00
Nyall Dawson
ab19e8ed32 Add new attribute form container type "Row"
This container always lays out child widgets in a horizontal
row, where the number of columns is automatically determined
by the number of child widgets.

It's useful for creation of compact forms, where no space will
be wasted by assigning extraneous horizontal width to widgets
where the expected values will always be short.

Eg: creating 3 rows with 3, 2, 1 child widgets respectively
results in the layout:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [...............................]

Without the option of row containers then the all horizontal
rows will have the same number of columns, eg:

    Attr 1: [...] Attr 2: [...] Attr 3: [...]
    Attr 4: [...] Attr 5: [...] Attr 6: [...]

(leaving insufficient horizontal length for attributes 4-6), or

    Attr 1: [..........] Attr 2: [..........]
    Attr 2: [..........] Attr 3: [..........]
    Attr 4: [..........] Attr 5: [..........]
    Attr 6: [..........]

(resulting in wasted horizontal space next to attribute 6, and
an extra row taking up vertical space)

Sponsored by NIWA
2023-05-01 18:39:23 +10:00
Nyall Dawson
a434d0e7c0 Use enums for attribute form container types instead of bools
Gives flexibility for adding additional container types in future
2023-04-27 12:54:20 +10:00
Nyall Dawson
b290179951 Fix monkey patching when comment contains " 2023-04-27 03:58:30 +10:00
Nyall Dawson
9e552967f2 Promote attribute editor enums to enum class, move to Qgis 2023-04-27 03:58:30 +10:00
Yoann Quenach de Quivillic
79973312e6 Add missing auto_additions 2023-04-25 05:35:37 +10:00
Nyall Dawson
8282b6631e Add QgsCodeEditorShell code editor subclass for Bash or Batch scripts 2023-04-24 15:26:50 +10:00
Nyall Dawson
308eb1d86f Expose api to determine capabilities of QgsVectorFileWriter
Currently allows determining whether field comments and aliases
are supported by the writer
2023-04-22 09:18:06 +10:00
Nyall Dawson
9aac2b8d8a [api] Add framework for setting field comments/aliases via
QgsAbstractDatabaseProviderConnection

When implemented by providers, will provide a method for
permanently setting field aliases/comments within a
database

Here we have no choice but to create a new Capability2
enum, as the original Capability has now consumed the
entire range of values for data types permitted by QFlag
2023-04-18 08:22:57 +10:00