378 Commits

Author SHA1 Message Date
Juho Ervasti
2e2a77ac7c SkipAttribute merge policy -> SetToNull 2025-02-25 16:20:38 +02:00
Juho Ervasti
ced40a2d8d Add more policies 2025-02-20 20:12:49 +02:00
Juho Ervasti
a2fda5c1c6 Add largest geometry policy to enum 2025-02-18 15:58:12 +02:00
Juho Ervasti
b0a12f78aa Add new Field Domain merge policy 2025-02-12 17:06:13 +02:00
Nyall Dawson
d4c592e6d0 Move provider-specific credential redaction logic to QgsProviderMetadata
Followup 1907ab3
2025-02-04 08:24:35 +10:00
Withalion
2a8cd537fa Fix issues introduced by PointCloudIndex refactor 2025-01-08 12:40:34 +01:00
Withalion
2bed2b7c3c Fix review issues 2025-01-08 12:40:34 +01:00
Withalion
1d3f3bbb21 Remake overview vpc options 2025-01-08 12:40:34 +01:00
David Koňařík
252ab6ce12 Move QgsPointCloudAccessType to Qgis 2025-01-06 21:31:40 +01:00
Nyall Dawson
c2d933579d Move resampling method enum to Qgis, promote to enum class 2024-12-18 19:12:29 +10:00
Jan Caha
2adaec6825
Mesh Render Extent Settings
This brings to renderer for Mesh Contours option to set renderer Min Max based on extent (specific canvas, changing canvas) in the same way as renderers for Raster Layer.
2024-12-17 12:46:50 +10:00
Nyall Dawson
bb6919aeea Move QgsRasterMinMaxOrigin enums to Qgis, promote to enum class 2024-11-30 07:36:47 +10:00
Yoann Quenach de Quivillic
32c6a3d8e7 Add global enum 2024-11-27 07:10:29 +10:00
Nyall Dawson
7a17557e64 Refactor QgsTextRenderer internal methods, optimise buffer render
Rework internals of QgsTextRenderer horizontal text rendering,
so that:

1. It's easier to read, cleaning up years of accumulated cruft
2. Split out bits into smaller functions
3. Reduce the amount of duplicate code for text layout, so that
there's only one function responsible for horizontal text layout
instead of multiple
4. Add shortcut optimisations for rendering text + buffer/shadow
at the same time, instead of always drawing these completely
independantly of each other and incurring the cost of text path
calculation multiple times for the same bit of text. In a simple
benchtest this reduces the time required for rendering many
text fragments with buffers from 40 seconds to 27 seconds.

There's still more we could do here, but it's a start...
2024-11-19 11:15:34 +10:00
Yoann Quenach de Quivillic
b2f3876e38 Apply suggestions from review 2024-11-14 09:54:48 +10:00
Nyall Dawson
656eb4ccc6 Add AllNumeric value, QGIS 4.0 todo note 2024-11-11 13:01:42 +10:00
Nyall Dawson
2890df089d [feature] Add raster zonal min/max algorithm
This algorithm extracts point features corresponding to the minimum
and maximum pixel values contained within polygon zones.

The output will contain one point feature for the minimum and one
for the maximum raster value for every individual zonal feature
from a polygon layer.
2024-11-11 13:01:42 +10:00
Nyall Dawson
29b345e2c3 Add scale method option for layout scale bars
Instead of always calculating the scale along the bottom of the
map, expose a choice of methods to the user (along bottom,
middle, top, or average of the three measurements)

For new scalebars, default to the average method, which better
handles the scenario where the scale at the top or bottom of
the map cannot be calculated (eg when the top/bottom of the map
falls just outside valid areas for the map's crs)

This fixes one of the most common scenarios which cause scale
bar widths to blow out to massive sizes

Refs #55240
2024-10-15 12:38:07 +10:00
Nyall Dawson
4c9072e265 Only render main annotation layer in main map canvas or docked maps
Don't show it in other map canvas instances, eg the coordinate
bounds preview map

Fixes #58766
2024-10-11 16:23:37 +10:00
Nyall Dawson
b2d2fc9e28 Optimise text rendering for a common scenario
Reduces a lot of overhead when rendering non-buffered, non-shadowed
text. Cuts render time by ~50% in my testing.

Also introduces a "PreferText" render option, where we default
to using text painting methods in all scenarios where we know
there's no loss in rendering quality to do so. This mode should
become the new default in a future QGIS release, as it is
designed to be faster with no visible rendering differences.

Expand unit testing by covering all text render modes in all
text renderer rendering tests.
2024-10-11 13:32:53 +10:00
Germán Carrillo
0c7ea8f4b8 Address review: move qgsLessThanMaximumScale and qgsEqualToOrGreaterThanMinimumScale functions to QgsScaleUtils 2024-10-08 09:13:34 +10:00
Germán Carrillo
dd907d6bdf [core] Introduce functions qgsLessThanMaximumScale and qgsEqualToOrGreaterThanMinimumScale to make robust checks between map scale and maximum/minimum rendering scales in a scale dependent visibility context, taking non-round scales (denominators) 2024-10-08 09:13:34 +10:00
Germán Carrillo
490b47daf0 [core] Mark Qgis::SCALE_PRECISION as deprecated, since scale dependent visibility became more robust on range limits (namely, on non-round numbers). 2024-10-08 09:13:34 +10:00
Nyall Dawson
a7a5f972ae Add render context flag to always disable symbol clipping 2024-10-03 12:49:18 +10:00
Nyall Dawson
2fdb2cad80 Add processing algorithm flag for SecurityRisk
And add to "Advanced Python field calculator" algorithm, as that
algorithm uses the Python exec() function and is a security
risk if run with untrusted/unchecked inputs
2024-10-02 10:36:00 +10:00
qgis-bot
da1f55b7d1 auto sipify 🍺 2024-09-25 05:09:28 +00:00
Even Rouault
eb981cd979 Update RasterColorInterpretation enumeration with constants added in GDAL 3.10
per https://github.com/OSGeo/gdal/pull/10721
2024-09-23 10:11:03 +02:00
Nyall Dawson
3e63b9a4fd Use plural for consistency 2024-09-17 14:00:35 +10:00
Nyall Dawson
0777e7683f Complete EPSG distance unit mapping by adding historic distance units
Ensures we don't perform a lossy conversion of units from the EPSG
CRS database to QGIS units
2024-09-17 14:00:35 +10:00
Nyall Dawson
566b2f7286 Ensure label cache is invalidated when a vector layer renderer
affects the labeling and is re-drawn
2024-09-14 13:25:59 +10:00
Nyall Dawson
c50c923261 Add API to determine if feature renderer affects labeling results 2024-09-14 13:25:59 +10:00
Denis Rouzaud
281726250f
Merge pull request #58354 from gacarrillor/save_functions_in_project
[feature] Allow users to save expression functions in QGIS project file
2024-09-13 17:39:40 +02:00
Alessandro Pasotti
987c38eda6
[auth][api] QgsAuthConfigurationStorage classes and tests (#57992)
Implementation of QEP 
Authentication System: allow Database storage for authentication DB
https://github.com/qgis/QGIS-Enhancement-Proposals/issues/248
2024-09-12 09:18:15 +02:00
Mathieu Pellerin
5bcc310768 Address review 2024-09-12 08:34:13 +10:00
Mathieu Pellerin
48b98def64 [geos] Add mechanism for empty interior rings to be skipped 2024-09-12 08:34:13 +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
Germán Carrillo
c5286e4dcc [core] Address review: Move loadFunctionsFromProject and cleanFunctionsFromProject to QgsProject::read and ::clear, respectively. Introduce function pythonEmbeddedInProjectAllowed to ask for permissions to load both macros and expression functions, with a parameter enum and rename existing enum for macros. Sort includes. Drop not needed file. Add python/expressions/ to gitignore, to get rid of files produced by the introduced Python test. 2024-09-05 23:07:37 -05: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
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
3a578d6712 Header update 2024-08-13 20:28:55 +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
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