634 Commits

Author SHA1 Message Date
Nyall Dawson
afd10759b0 [processing] Show notes for algs which regenerate primary keys
Add a new Qgis::ProcessingAlgorithmDocumentationFlag flag, with
a virtual method in QgsProcessingAlgorithm to return documentation
flags. These flags are used to indicate algorithm behavior which
should be noted in the documentation.

Add initial flags for algorithms which drop and regenerate
primary keys/FIDs, and automatically add a note to the algorithm's
help panel to explain that this will occur

In future this flag could be extended with other helpful warnings,
eg

- Algorithm requires valid geometries
- Algorithm will segmentize curved geometries
- Algorithm will drop Z or M values
2024-07-15 14:33:21 +10:00
Nyall Dawson
711c75d873 Promote scalebar enums to enum class, move to Qgis 2024-07-12 05:36:22 +10:00
Julien Cabieces
43062c8833 fix(CMYK): treat review comments 2024-07-11 21:13:42 +10:00
Julien Cabieces
7e527d182b feat(CMYK): add API color model and profile methods to project
API allows to define a color model without a color space. If both are
set, consistency between defined color model and color space one is
checked (only in Qt version 6.8.0 or greater because it's not possible
to retrieve color model from color space before that)
2024-07-11 21:13:42 +10:00
Nyall Dawson
5e34d07bad Fix incorrect icon used for OGR items with vsi cloud driver prefixes
... and make API more useful for other use cases.

The zip icon should not be used for cloud based vsi prefixes
2024-06-27 06:15:40 +10:00
Nyall Dawson
1f1c5c952e Add ReadOnly flag for browser data items
Allows suppression of the standard user actions for managing
file based data items. Could be used in future to restrict
other browser actions for sources which the user does not
have permission to modify.
2024-06-26 21:51:13 +10:00
uclaros
15ebae07df add userData property to 2024-06-22 10:23:34 +10:00
Nyall Dawson
5e752537dc Use SymbolRenderHint for flagging subsymbols
Instead of the extra argument to startRender
2024-06-21 23:10:32 +10:00
Nyall Dawson
5268e0ee0c Add optional flag to force global ("entire map") clipping paths
This is a new opt-in flag for map settings/render context/layouts.
If set, then when applying clipping paths for selective masking,
we always use global ("entire map") paths, instead of calculating
local clipping paths per rendered feature. This results in
considerably more complex vector exports in all current Qt versions,
but gives us a way to force this IF/when a future Qt version adds
optimisations which make global masks desirable.
2024-06-21 23:10:32 +10:00
Nyall Dawson
0ca28af9a0 Greatly optimise selective masking vector exports
Optimise the logic used when the new geometry backend for
selective masking is in effect:

Whenever its SAFE, instead of calculating an "entire map" clipping
path and then applying this for every feature being rendered,
we now defer the calculation of the clipping path until we
are rendering individual features. Then, we create a clipping path
which contains ONLY the mask paths which are within the area
being drawn over.

This avoids having the entire map clipping path being used for
EVERY feature being rendered, which results in huge PDF/SVG
exports when masks are in effect, and instead results in
clipping paths which are confined just to a sensible area
around each rendered feature.

In some complex test projects this reduces the PDF export
size by a factor of 0.01!! (and results in PDFs/SVGs which
open much quicker in viewers and editors, and don't grind
their operation to a halt).
2024-06-21 23:10:32 +10:00
Nyall Dawson
c7e3ff09a4 Partially address API limitations, and add a bunch of QGIS 4 TODOs
We can't fix the API without a significant break here.
2024-06-10 19:54:48 +10:00
Nyall Dawson
ffd504e0d4 BuildPyramids should be a provider capability, not an interface capabilitiy 2024-06-06 13:57:48 +10:00
Nyall Dawson
79150d1d5c Add some notes for 4.0 cleanups 2024-06-06 13:57:48 +10:00
Nyall Dawson
859a0ece06 Deprecate RasterInterfaceCapabilities which are unused 2024-06-06 13:57:48 +10:00
Nyall Dawson
3da2f533d5 Make raster data provider capabilities an enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
a7a19a7fc0 Don't use raw int for QgsRasterInterface capabilities 2024-06-06 13:57:48 +10:00
Nyall Dawson
2220473b4a Fix accidental paste 2024-06-06 13:57:48 +10:00
Nyall Dawson
43e7d18cd8 Move simplification enums to Qgis, promote to enum class 2024-06-06 13:57:48 +10:00
Nyall Dawson
e2157cfe1f Promote FieldOrigin to enum class, move to Qgis 2024-05-27 08:50:16 +02:00
Nyall Dawson
f5853a7212 Add tab stop distance to QgsTextFormat 2024-05-25 06:10:28 +10:00
Nyall Dawson
fe74b300be [feature] Add maximum distance setting for point labels
For the "Around point" and "Cartographic" placement modes, this
adds a new optional setting for the maximum distance of the labels from
the feature. It's used together with the existing distance setting
to define a range of distances at which labels may be placed
from their corresponding point features.

This adds more flexibility to the placement for these layers,
ultimately allowing for more labels to be placed in busy maps.

When the layer is set to the "around point" mode, then label
candidates which are closer to the point will always be prefered
over those which are further away.

When the layer is set to the "cartographic" mode, then the default
behavior is also to prioritize closer labels. A new combo box
allows users to control the priority, with an option for
prefering position ordering. If this option is set, then candidates
at the corresponding positions (eg top left) are preferred regardless
of how far they are from the point, with the labelling falling
back to alternate positions only when no labels can be placed
up to the maximum label distance.

Sponsored by Rubicon Concierge Real Estate Services
2024-05-23 17:20:30 +10:00
Nyall Dawson
cbd25c1fdd Promote QgsColorRampShader enums to enum class, move to Qgis 2024-05-22 12:37:44 +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
Nyall Dawson
d87644c7db Add GPS navigation status to QgsGpsInformation 2024-05-10 06:09:15 +10:00
Nyall Dawson
997648baa9 Add 'over point' placement option for cartographic label mode
This adds a new option for placement when labels are set to the
"cartographic" mode, for "O" = "over point". When a feature's
data defined placement priorities include this new 'O' option,
a label can be placed directly over the corresponding point.

Sponsored by Rubicon Concierge Real Estate Services
2024-05-10 06:08:50 +10:00
signedav
d0d2023978
Merge pull request #57217 from signedav/duplicatepolicy
Duplicate policy on QgsFields when duplicate features
2024-05-08 19:53:31 +02:00
signedav
cfe71973c2 rename FieldDomainDuplicatePolicy to FieldDuplicatePolicy because - not like the Merge or Split Policy it does not affect the FieldDomains but only the Fields instead 2024-05-07 14:28:15 +02:00
uclaros
3d4c19d3b3 Add support for Wind Barb rendering for mesh vector datasets 2024-05-07 10:22:36 +02:00
signedav
39e6dbd0c1 fix datastream and comments 2024-04-22 19:43:58 +02:00
signedav
ac830ff16f
Merge branch 'master' into duplicatepolicy 2024-04-22 13:17:49 +02:00
signedav
ea4d9ce64b DuplicatePolicy like default value / dupicate / remove value to define what has to be done on duplicating a feature. 2024-04-22 10:32:19 +02:00
Nyall Dawson
172a1c2b03 Make execution status available for child algorithms 2024-04-21 06:46:35 +10:00
Nyall Dawson
365d26ece4 Ensure raster elevation filtering works nicely with contour renderer
With the contour renderer we must treat out of range pixels as
no data values, so that the gdal contouring algorithm correctly
ignores them
2024-04-10 12:10:08 +10:00
Mathieu Pellerin
891a8efc84 [raster][temporal] Add a brand new temporal mode: pixel value as temporal datetime 2024-04-08 09:27:58 +10:00
Nyall Dawson
4d442441f8 [sensorthings] Add support for Multidatastreams
This adds support for the Multidatastream entity type, as
implemented in the SensorThings version 1.1 "MultiDatastream extension"

While the specification mandates that MultiDatastreams have an
optional polygon geometry, I've encountered numerous servers
which expose different geometry types for this entity or which
return errors when attempting to read the geometries from
MultiDatastreams. Accordingly we always expose an option to
load MultiDatastreams as geometryless layers alongside the
default option to load them as polygon layers, to handle a
wider range of connections.
2024-03-25 19:16:56 +10:00
Nyall Dawson
3f44760a82 Add "Fixed Time Range Per Band" mode for raster temporal control
This mode can be used when each band in the raster layer is associated
with a fixed time range, eg. NetCDF files.

The user can either manually populate a table with begin/end dates for
each band in the raster, or build the table using QGIS expressions
which return datetime values.
2024-03-22 12:40:54 +10: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
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
Nyall Dawson
e9730b1bb3 Add capabilities for raster renderers
And selectively expose some of QgsRasterRendererRegistry to python
2024-03-18 21:26:20 +01:00
Nyall Dawson
1796318afe Add a "fixed range per band" elevation mode for rasters
In this mode, each band in the raster can have a fixed elevation
range associated with it. This is designed for data sources which
expose elevation related data in bands, eg netcdf files, such
as a raster with temperate data at different ocean depths.
2024-03-18 21:26:20 +01:00
Nyall Dawson
253623feb0 Introduce fixed elevation range for raster layers
This introduces a new option for specifying how raster layers
have associated elevation. It permits a fixed elevation range
to be set for the layer. It can be used when the layer has
a single fixed elevation, or a range (slice) of elevation values.

Users can set the lower and upper elevation range for the layer,
and whether the lower or upper limits are inclusive or
exclusive.

When enabled, the layer will only be visible in elevation
filtered 2d maps when the layer's range is included in the map's
z range.
2024-03-16 13:11:54 +10:00
Nyall Dawson
e22a1d605b [feature][layouts] Add z range filter option for layout maps
Similar to the existing setting for temporal filtering of 2d layout
maps, this setting allows users to set a specific elevation/z range
for a layout map item. When set, map layers with support for 2d
z range filtering (currently point clouds and raster DEMs) will
be filtered to show only content within this range.

The z range can be data-defined, allowing differing z range
for different atlas or report features.
2024-03-04 17:00:24 +10:00
Nyall Dawson
ebea330398 Add data provider flags for FastExtent2D/FastExtent3D
These flags reflect that retrieval of the provider's 2D or 3D extent
retrieval via QgsDataProvider::extent()/extent3D() are ALWAYS guaranteed
to be trivial/fast to calculate and involve absolutely no extra work.
2024-02-28 06:04:50 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Nyall Dawson
90f180c07f Start on utils class 2024-02-15 12:39:11 +10:00
Nyall Dawson
62cd14189f Use proper enum flags type instead of int as return value
And promote enum to enum class. Notably fixes a bunch of startup
errors when loading the Processing plugin under Qt6
2024-02-13 08:13:43 +10:00
Nyall Dawson
87f117f47b [sipify] Avoid leading and trailing newlines in enum value docstrings 2024-02-11 13:37:29 +10:00
Nyall Dawson
2b710b2617 [sipify] Don't write invalid escaped \d character to docstring
Instead correctly translate to ..deprecated python docstrings
2024-02-11 13:37:29 +10:00
Nyall Dawson
ee53b9ae48 Port processing enums to enum class
A step towards a Qt6 compatible Processing framework
2024-02-10 17:25:22 +10:00
Nyall Dawson
ac2f1179c8 More item data role enum to enum class conversions 2024-02-06 21:04:43 +10:00