861 Commits

Author SHA1 Message Date
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
Nyall Dawson
71d5aadbc8 [api] scale calculation method can be set for QgsMapSettings 2025-03-30 18:03:30 +10:00
Nyall Dawson
170d962356 Add scale method handling to QgsScaleCalculator 2025-03-30 18:03:30 +10:00
Nyall Dawson
a2db8cf453 Add QgsProject setting for scale calculation method
Exposes the same methods as are available for layout scale bars,
and can be set for a particular project in the project properties
dialog
2025-03-30 18:03:30 +10:00
Mathieu Pellerin
e75a28f15a [editor widget] Fix relation reference widget filter expression's handling of current(_parent)_* variables and functions 2025-03-29 16:06:09 +07:00
Nyall Dawson
c2e294c3fa Use class with static public methods instead of namespace
Namespaces don't work well with sip, eg losing the class docstrings.
2025-03-29 07:55:27 +10:00
Nyall Dawson
39e37e1fc5 Unify QgsMeshUtils into a single utility class
This was previously a namespace split over multiple files
2025-03-29 07:55:27 +10:00
Nyall Dawson
f480c2a04e Add all missing class brief descriptions 2025-03-28 14:23:56 +10:00
Nyall Dawson
1f8a585c5c Make signal const 2025-03-28 10:02:25 +10:00
Nyall Dawson
aa65f01140 Make more symbol factory methods memory safe 2025-03-28 10:02:25 +10:00
Nyall Dawson
596ddb2f4e More memory safety for loading symbols 2025-03-28 10:02:25 +10:00
Jean Felder
f57c1d72dd qgslayoutelevationprofilewidget: Add support for subsections indicator
This adds some new customization associated with the introduction of
subsections indicator:
- it allows to display or hide them
- it allows to change the associated symbology
2025-03-25 09:47:50 +10:00
Jean Felder
c769795e36 qgslayoutitem: Remove empty lines at the end of file 2025-03-25 09:47:50 +10:00
Jean Felder
21dfcd261d qgslayoutitemelevationprofile: Add support for subsections indicator
This adds support to display vertices lines over the profile graph to
display indicator at the location of the curve's vertices.

This is achieved with mainly 2 changes:
- `setSubsectionsSymbol()` allows to set the line symbol of the
vertical lines
- Call `renderSubsectionsIndicator` on the `QgsProfilePlotRenderer`
2025-03-25 09:47:50 +10:00
Jean Felder
9eb3c37400 qgsprofilerenderer: Introduce a default symbol for subsections
This will be used in the next commit.
2025-03-25 09:47:50 +10:00
Jean Felder
030c04c9ea qgsprofilerenderer: Add support for subsections indicator
This adds support to display vertices lines over the profile graph to
display indicator at the location of the curve's vertices.

This is achieved with mainly 2 changes:
- `QgsProfilePlotRenderer::setSubsectionsSymbol()` allows to set the
line symbol of the vertical lines
- `renderSubsectionsIndicator` generates and renders the vertical
lines. It is called by `QgsProfilePlotRenderer::renderToImage()`.
2025-03-25 09:47:50 +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
Nyall Dawson
a315e07657 Expand docs 2025-03-24 10:25:39 +10:00
Nyall Dawson
6953aec591 Just require ints instead of QNetworkAccessManager::Operation enum
The sip conversion code fails with enums under qt 6
2025-03-24 10:25:39 +10:00
Nyall Dawson
9b96cfde8b Move DOM compare function to QgsTestUtils 2025-03-24 10:25:39 +10:00
Nyall Dawson
b9b519950d [api] Add advanced network request preprocessor capabilities
Allows mutating the request, network operation and request data.

Intended for mocking eg post requests in unit tests
2025-03-24 10:25:39 +10:00
Julien Cabieces
d528d9ab31 refactor(LegendUrl): Make legend url part of server properties 2025-03-14 14:58:15 +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
3cc451f7d5 Const correctness 2025-03-12 18:31:51 +10:00
Nyall Dawson
a2f9868f6f
Remove duplicate http method enums 2025-03-12 11:10:57 +10:00
Nyall Dawson
5f82c62212 Add missing sip downcasts for triangulated surface, polyhedral surface 2025-03-12 11:05:35 +10:00
Nyall Dawson
403bdbd405 Don't allow qgsgeometry_cast to cast away const 2025-03-12 11:05:35 +10:00
Nyall Dawson
8fdd39fca9 Add support for setting output fields for QgsVectorLayerExporter
Allows remapping fields from the source fields, including specifying
the exact output field type, and source expression
2025-03-12 10:25:48 +10:00
Nyall Dawson
3a4357dcde
Fix typo 2025-03-11 08:28:41 +10:00
Nyall Dawson
eaafdc07ba
Fix build, docs 2025-03-10 18:11:55 +10:00
Nyall Dawson
f22baa38f1
Add expression based filter for QgsVectorLayerExporter 2025-03-10 14:41:21 +10:00
Nyall Dawson
32373e1999
Add extent filter for QgsVectorLayerExporter 2025-03-10 14:41:21 +10:00
Nyall Dawson
e17d9f722b
Add more flexible API variant for QgsVectorLayerExport.exportLayer 2025-03-10 14:41:20 +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
9fa19f8098 Create QgsAbstractDatabaseProviderConnection::createVectorLayerExporterDestinationUri
Creates a URI for use with QgsVectorLayerExporter corresponding to given destination
table options for the backend. The URI format and extra options which
need to be passed to QgsVectorLayerExporter differ from provider to
provider, so this new method gives us a consistent, generic method we
can call to safely generate the right URI and options in a
cross-provider way.

Implemented for all database connection providers.
2025-03-10 14:40:27 +10:00
Nyall Dawson
2b7c21fc78 Move some logic to dialog, create connection method 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
signedav
222f2c61b1 Introducing new VectorAnchorPoint Baseline to align font markers to their baseline. In GUI only exposed to font marker settings. Beautiful VerticalAnchorMode removed because it's an overhead. 2025-03-03 17:12:32 +10:00
signedav
6b5396bd53 introduce VerticalAnchorMode in FontSymbols to have a proper 'hidden' setting for this mode making a differene between legacy and baseline (and future bounds) on the positioning of the characters 2025-03-03 17:12:32 +10:00
signedav
f80df88534 with the parameter fixverticalanchor, the position of the point is calculated with the same offset like the offset of the font. this differed before what leaded to issues. still the old way is available as legacy 2025-03-03 17:12:32 +10:00
Nyall Dawson
896e867e98 Add method to valid SQL options before creating query layer to QgsAbstractDatabaseProviderConnection
And implement for MS SQL provider.

Generates a user-friendly descriptive message when the SQL is
not valid for creating a layer in QGIS.
2025-03-03 13:16:40 +10:00
Alexander Bruy
ce1b0c70ca address review comments and add test 2025-03-03 11:48:15 +10:00
Alexander Bruy
bb60704ed0 fetch feature with geometry when executing map layer action on feature
(fix #48964)
2025-03-03 11:48:15 +10:00
Nyall Dawson
632d196e62 Don't show useless "available in python as" notes in PyQGIS docs
Since the method name used in the docs is ALREADY the python version!
2025-02-28 18:32:09 +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
Nyall Dawson
a363ed1862 Fix leak when directly iterating feature in PyQGIS
Fixes #32944
2025-02-22 05:23:15 +10:00
Nyall Dawson
149c106ea0 Optimise conversion of QgsAttributes to Python objects
Applies the same optimisations as are present in the QgsFeature
methods to avoid the overhead of sip's QVariant conversion logic
when attributes are of a basic type
2025-02-22 05:22:41 +10:00