408 Commits

Author SHA1 Message Date
Nyall Dawson
31ac029d0a Move processing dialog mode enum to Qgis and rename 2025-04-30 13:56:09 +10:00
Nyall Dawson
71420a5628 Cleanup global constants
- Deprecate global geographic crs strings, these should not be used
- Move some global constants to Qgis, and monkey patch for
  API compatibility
- Deprecate global qgsVsiPrefix. Use QgsGdalUtils::vsiPrefixForPath()
  instead
2025-04-03 11:44:59 +10:00
Nyall Dawson
9435a84ff7 sipify 2025-04-03 01:05:31 +10:00
Alexander Bruy
34aedd067d
Merge pull request #60710 from GispoCoding/59494_merge_policies
Add merge policies
2025-04-02 09:22:52 +01:00
Nyall Dawson
9ea131ded2 [api] Add scale calculation method for "scale at equator"
Always calculates the scale at the equator, regardless of the
actual visible map extent.

This method can be used to provide a consistent, static scale for
maps in geographic reference systems, regardless of the latitudes
actually visible in the map (permitting consistent appearance of
these maps when rendering relies on scale based visibility or
calculations). Otherwise a project in eg EPSG:4326 which uses
scale based visibility of layers and symbols will see layers
and features "randomly" disappear as the map is panned, even
though the user has not zoomed in or out of the map.

This method is only applicable when calculating scales with a
degree based reference system.
2025-03-30 18:03:30 +10:00
Martin Dobias
c40d25ade9 Add 3D scene mode enum 2025-03-24 10:29:33 +01:00
Martin Dobias
e98bf79f1a Initial implementation of globe camera controller
This is a new navigation mode for QgsCameraController which is meant to work
just like the terrain-based navigation mode, but for 3D scenes with globe.

Initially, the new navigation mode can handle:
- zooming in/out with mouse wheel
- orbit around globe when dragging with left mouse button pressed
- left/right/up/down keys to orbit around globe
- shift + left/right keys to change heading angle
- shift + up/down keys to change pitch angle
- page up/page down keys to increase/decrease elevation

For camera pose, we use QgsCameraPose as for "flat" scenes, but the QCamera
is positioned/rotated slightly differently - the main change is that in case
of globe, we use ECEF coordinates of the camera pose's center point, convert
them to lat/lon coordinates in order to set up initial rotation of the camera
so that it is perpendicular to the tangent plane at the given ECEF coordinate.
2025-03-24 10:29:33 +01:00
Julien Cabieces
716af56b62 doc(RasterTemporal): fix documentation 2025-03-14 10:19:50 +10:00
Julien Cabieces
545e14350b feat(RasterTemporal): Add fixed date/time to raster temporal mode 2025-03-14 10:19:50 +10:00
Nyall Dawson
a2f9868f6f
Remove duplicate http method enums 2025-03-12 11:10:57 +10:00
Nyall Dawson
56bc177e4e Add provider connection method to set table comment
Currently supported for Postgres provider only
2025-03-10 14:40:27 +10:00
Nyall Dawson
d5a812e3d4 Add metadata methods for primary key capabilities 2025-03-10 14:40:27 +10:00
Nyall Dawson
b1727f8b73 [api] Add connection metadata methods for default geometry column name, import capabilities 2025-03-10 14:40:27 +10:00
Nyall Dawson
13aae162f0 Promote marker symbol alignment enums to enum class, move to Qgis 2025-03-05 19:02:47 +10:00
Nyall Dawson
bb4827e9f9
Create a class for managing stored database queries
This class is designed to be compatible with DB Manager's storage
of queries in projects, but extended to allow storage within
the local profile too.
2025-02-26 10:54:25 +10:00
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
Nyall Dawson
8911a5b726 Move QgsLegendStyle::Style enum to Qgis, rename to LegendComponent 2025-02-20 13:08:54 +10:00
Alexander Bruy
3d44213606 do not enable default Duplicate Feature and Digitize action for geometryless layers (refs #57916) 2025-02-20 08:44:48 +10:00
Juho Ervasti
a2fda5c1c6 Add largest geometry policy to enum 2025-02-18 15:58:12 +02:00
Loïc Bartoletti
e637eb3df2 move SegmentCalculationMethod to qgis.h 2025-02-14 08:56:11 +10:00
Juho Ervasti
b0a12f78aa Add new Field Domain merge policy 2025-02-12 17:06:13 +02: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
Withalion
84fde58adb Fix tests failing 2025-01-17 22:51:46 +01:00
Withalion
4958dffb22 Encapsulate merged changes between Master and 2D overview
This commit contains some changes created during rebasing onto current master, however they are insifignant and should be ignored, as they will match the changes already in master.
2025-01-17 22:51:46 +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
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
qgis-bot
eb1ce83af1 auto sipify 🍺 2024-12-03 07:47:10 +00: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
Harrissou Sant-anna
ac3c06d3ad Rewording and formatting in PyQGIS docs 2024-11-16 07:28:29 +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
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
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
Andrea Giudiceandrea
fefba6c472 Fix typos in QgsUnitTypes 2024-10-07 09:15:30 +02:00