765 Commits

Author SHA1 Message Date
Nyall Dawson
cbee8326ca
Can't use SIP_DEPRECATED with non-methods 2025-02-05 09:11:18 +10:00
Nyall Dawson
db7b9afb6b
Use translated string for password helper
And fix capitalisation of strings
2025-02-05 08:26:32 +10:00
Even Rouault
b63d11ea0d Apply suggestions from code review 2025-02-04 08:24:35 +10:00
Even Rouault
597a945995 Apply suggestions from code review
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2025-02-04 08:24:35 +10:00
Nyall Dawson
d4c592e6d0 Move provider-specific credential redaction logic to QgsProviderMetadata
Followup 1907ab3
2025-02-04 08:24:35 +10:00
Even Rouault
530eb4bc2f Test and code adjustments related to MIME type serialization for PointCloudLayer going from 'pointcloud' to 'point-cloud' 2025-02-03 07:51:53 +10:00
Even Rouault
47a72b4056 Limit number of hardcoded strings for layer type by leveraging QgsMapLayerFactory::typeToString() 2025-02-03 07:51:53 +10:00
Even Rouault
660db0f810 core/server: remove traces of OGC best practice georeferencing 2025-01-25 07:52:23 +10:00
Martin Dobias
d8f8d13691 address review 2025-01-23 21:04:55 +01:00
Martin Dobias
b94229e024 Only update changed 3D entities when editing point cloud attributes
QgsChunkedEntity gets a capability to update an existing sub-entity for a node
by loading the node again, creating a new 3D entity, and then discarding the old
entity in favor of the new one.

QgsPointCloudLayer gets a new signal - emitted whenever a particular node's
attribute values get changed.

These two are combined for point cloud layer's 3D chunked entity: whenever there
are edits to the point cloud data, instead of doing big hard reload of the whole
point cloud, we only update entities of the few nodes that were modified.
This greatly improves the user experience of point cloud editing (no "flashing"
of the 3D view while loading everything from scratch), and it improves how quickly
the changes can be seen.
2025-01-23 21:04:55 +01:00
Alessandro Pasotti
f2f9d3a931 [OGR] Fix transactional editing for GPKG/SQLite
Tell the provider to reload the fields after a rollback
and add some checks to verify if after the rollback
the provider still needs to update the field.

Followup https://github.com/OSGeo/gdal/pull/11695
Followup https://github.com/qgis/QGIS/pull/59797
2025-01-21 12:40:53 +01:00
Withalion
2a8cd537fa Fix issues introduced by PointCloudIndex refactor 2025-01-08 12:40:34 +01:00
Withalion
ad1475e735 Add unit tests & fix some review issues 2025-01-08 12:40:34 +01:00
Withalion
057402a895 Fix review issues round 2 2025-01-08 12:40:34 +01:00
Withalion
2bed2b7c3c Fix review issues 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
David Koňařík
320ee6b374 Split point cloud index into implementation & wrapper 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
Nyall Dawson
14f625f59f [API] Add framework for raster labeling
Allows raster pixels to be labeled with the value taken from a raster
band.

Labels are registered with the labeling engine, so participate in
label conflict resolution and overlap avoidance

Options include

- Selection of band to take values from
- Using QgsNumericFormat to customise the number format for the labels
- Uses text renderer, so supports buffers, shadows, etc
- Label priority
- Scale dependant visibility
- Optional pixel size dependent visibilty, ie show only when pixels are
> 4mm in size
- Z index control, overlap avoidance mode

Fixes #14408
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
0fff1f16b4 Add QgsStringUtils.containsByWord method
Given a candidate string, returns true if the candidate contains
all the individual words from another string, regardless of their order.
2024-12-12 18:39:46 +10:00
JuhoErvasti
ccc7df5966 Add extent buffer property to QgsSymbol 2024-12-10 09:56:33 +10:00
Nyall Dawson
afac0312aa Expose QgsGeos class to PyQGIS
This class has lots of (very useful!) GEOS specific functionality which
is not exposed through the base QgsGeometryEngine class
2024-12-06 19:20:26 +10:00
qgis-bot
eb1ce83af1 auto sipify 🍺 2024-12-03 07:47:10 +00:00
Nyall Dawson
37478db0c1 Fix more function links 2024-12-03 12:57:44 +10:00
Nyall Dawson
7670fbe362
Move class, method out of QgsPalLabeling to central location 2024-12-02 12:46:23 +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
2abc9d92ca [sld] Don't try to write rules/categorizes without symbolizers
Only create rules/categorized categories/graduated ranges if the
associated symbol could be converted to SLD, and is not an "empty"
symbol.

Otherwise we do not generate a rule, as SLD spec requires a
Symbolizer element to be present.
2024-11-19 21:06:26 +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
Harrissou Sant-anna
ac3c06d3ad Rewording and formatting in PyQGIS docs 2024-11-16 07:28:29 +10:00
Denis Rouzaud
3e085e496b move read/write XML for QgsMapThemeCollection::MapThemeRecord inside class 2024-11-16 07:24:58 +10:00
Yoann Quenach de Quivillic
ea75091351 Switch to QWebEngineView if available 2024-11-14 09:54:48 +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
c03f550f0f Maintain API 2024-11-11 13:01:42 +10:00
Nyall Dawson
ac23e5d7da Address review 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
7badf62596 [api] Add tab positions list for QgsTextFormat
Allows setting a list of custom tab stop distances, instead
of just a single distance
2024-11-10 09:52:14 +11:00
Nyall Dawson
aaf4b90911
Fix malformed docstrings (#59244)
* Fix malformed docstrings

Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/188

* Fix malformed docstrings

* Fix more malformed docs
2024-10-28 14:29:21 +01:00
Yoann Quenach de Quivillic
e8e55cdbd0
Add export quality slider for jpeg/jpg 2024-10-26 09:37:58 +10:00
Nyall Dawson
712b3e72c6 QgsMultiRenderChecker: avoid misleading console output noise
When the checker passes comparison against ANY reference image,
don't output mismatch failure message for all the other variants
2024-10-24 09:51:21 +10:00
Alessandro Pasotti
9098fb9140
Merge pull request #58916 from elpaso/bugfix-gh58875-exp-compiler-with-plus-strings
Fix SQL expression compiler plus operator with strings
2024-10-15 08:45:39 +02:00
Nyall Dawson
56e58a2f74 Remove duplicate inherited members 2024-10-15 15:00:05 +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
Alessandro Pasotti
61935ad591 Introduce QgsVariantUtils::isNumericType 2024-10-11 16:14:24 +02: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
Nyall Dawson
d36982fd4d Reduce duplicate code 2024-10-11 11:22:54 +10:00
Nyall Dawson
65c654d2c8 Prep for calculating word wrapping in text document metrics 2024-10-10 11:09:18 +10:00