75 Commits

Author SHA1 Message Date
Nyall Dawson
f21722a0f1 [sipify] Minor cleanup to auto additions
Condense injections into a single block instead of multiple
separate blocks
2024-09-09 16:56:29 +10:00
Jean Felder
3d070316eb qgis: Add support for TIN type 2024-09-09 06:16:25 +02:00
Jean Felder
3295d7e803 qgis: Add support for polyhedralsurface type 2024-09-09 06:16:25 +02:00
Nyall Dawson
561961a11d Fix malformed enum documentation
Fixes #50176
2024-09-04 20:34:44 +10:00
Nyall Dawson
05003ba2fa [feature] Add "Linear Referencing" symbol layer type
This new symbol layer type allows placing text labels at regular
intervals along a line (or at positions corresponding to
existing vertices). Positions can be calculated using
Cartesian distances, or interpolated from z/m values.

Functionality includes:

- Labels can be placed using fixed cartesian 2d distances,
at regular linearly interpolated spacing calculated using
the Z or M values in geometries, or at existing vertices
- Labels can show either the running total distance, or
the linearly interpolated Z/M value
- Uses text rendered to draw labels, so the full range
of functionality is available for the labels (including
buffers, shadows, etc)
- Uses the QGIS numeric format classes to format numbers
as strings, so users have full range of customisation
options for eg decimal places
- An optional "skip multiples of" setting. If set, then
labels which are a multiple of this value will be skipped
over. This allows construction of complex referencing labels,
eg where a symbol has two linear referencing symbol layers,
one set to label every 100m in a small font, skipping multiples
of 1000, and a second set to label every 1000m in a big
bold font
- Labels are rendered using an angle calculated by averaging
the linestring, so sharp tiny jaggies don't result in
unslightly label rotation
- Optionally, markers can be placed at referenced points
in the line string, using a full QGIS marker symbol (this allows
eg showing a cross-hatch at the labeled point, for a "ruler"
style line)
- Data defined control over the placement intervals, skip
multiples setting, marker visibility and average angle
calculation length

Notes:

- When using the distance-based placement or labels, the
distances are calculated using 2D only, Cartesian calculations
based on the original layer CRS. This could potentially be
extended in future to expose options for 3D Cartesian distances,
or ellipsoidal distance calculations.

Sponsored by the Swiss QGIS User Group
2024-09-04 19:06:26 +10:00
Nyall Dawson
50408edac6
Fix PyQGIS docstrings for monkey patched enum values
We should be using the new name for the enum value instead
of the old one in the enum class docstring.

Move the old compatible name to an extra note
"Available as ``xx.yy`` in older QGIS releases."

Fixes #49171
2024-09-02 11:43:23 +10:00
Nyall Dawson
343709f48a Always use correct \since annotation for enum values 2024-09-01 02:29:17 +10:00
Nyall Dawson
2af54ad057 Fix malformed python docstrings when enum value has \since annotation 2024-09-01 02:29:17 +10:00
Nyall Dawson
370f74803f Only upgrade annotations on desktop 2024-08-25 12:34:51 +10:00
Nyall Dawson
c37f3d1960 Make naming more flexible 2024-08-15 14:27:35 +10:00
Nyall Dawson
76adc371ac Ensure marker halos are drawn in legends, symbol preview icons 2024-08-15 06:25:41 +10:00
Nyall Dawson
1f27fc627a [pyqgis] Wrap unambiguously static methods in staticmethod
sip doesn't use the standard Python staticmethod type for defining
static methods, which means that standard means of testing
for a static method (like `isinstance(..., staticmethod)`) fail
with any PyQGIS static methods.

This causes issues with lint tools, which incorrectly flag
calls to QGIS static methods as missing self arguments. It also
breaks detection of static methods in the sphinx PyQGIS docs,
so all static methods are shown as non-static.

Work around this in sipify, by wrapping unambiguously static
methods in staticmethod wrappers.
2024-08-14 22:08:41 +10:00
Nyall Dawson
dc68f03f88 Be tolerant against optional sip modules 2024-08-14 13:05:46 +10:00
Nyall Dawson
ed19d996b2 Collect attribute docstrings for PyQGIS documentation 2024-08-14 13:05:46 +10:00
Nyall Dawson
547387037f [annotations] Add support for callouts to point text item
Allows creating of callout lines (or bubble callouts) which
link the text to a map location. To create a callout, users
select the text item and then drag out the central x node
to the desired callout end point.

Callout styles can be modified through the layer styling panel.
2024-08-06 13:30:16 +10:00
Nyall Dawson
13c1a1b997 Force vector rendering of symbols when symbol has buffer enabled 2024-08-02 05:09:03 +10:00
Nyall Dawson
0c230a83e7 Add fixed size mode for picture annotations
When selected, the picture annotation will always be rendered
at the same size, regardless of the map scale
2024-07-26 20:38:47 +10:00
Nyall Dawson
75cca8a20c [FEATURE] Add picture annotation item type
Can render SVG or raster images as items in an annotation layer.
Options are present for:

- Locking the picture's aspect ratio
- Drawing with a background symbol
- Drawing with a border symbol
- Linked or embedded pictures
2024-07-26 20:38:47 +10:00
Nyall Dawson
4f9bdde88c
Add missing monkey patch 2024-07-18 15:04:32 +10:00
Nyall Dawson
73b25dca3e
Move QgsVectorDataProvider::Capability to Qgis::VectorProviderCapability
And promote to enum class
2024-07-18 10:42:22 +10:00
Nyall Dawson
145de5fb5e
Move QgsDataProvider::ReadFlag to Qgis::DataProviderReadFlag
and promote to enum class
2024-07-18 10:01:59 +10:00
Nyall Dawson
3b80fc0f4b
Move layout picture item format enum to Qgis, promote to enum class 2024-07-16 11:25:49 +10:00
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
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
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
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
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