573 Commits

Author SHA1 Message Date
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
qgis-bot
64e79914dd auto sipify 🍺 2024-10-09 03:49:26 +00:00
Even Rouault
9f605a6426 Don't use the The Word Which Must Not Be Used
I limited the renaming to things that are not in the public API and
are not setting names. This is probably more than we strictly need to
do, but at least this will help doing potential future similar 'grep'
exercises.
2024-10-09 11:50:08 +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
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
Denis Rouzaud
5f18ff84a2
make QgsVectorTilesUtils available to Python bindings (#58989) 2024-10-07 18:07:48 +02:00
Andrea Giudiceandrea
fefba6c472 Fix typos in QgsUnitTypes 2024-10-07 09:15:30 +02: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
Nyall Dawson
74b921e84b Allow HTML data urls for QgsImageCache
Adds support for base64 encoded image decoding when the path
is a HTML data URL (in addition to the existing "base64:..."
format support)

Allows use of eg "data:image/jpeg;base64,XXXXXXXX" formats
for image paths, so that the image cache can correctly handle
embedded image paths from HTML/CSS content
2024-09-29 08:57:52 +10:00
Denis Rouzaud
ca3b40cb8c
Merge pull request #58568 from gacarrillor/stacked_diagrams
[feature] Introduce stacked diagrams
2024-09-27 07:54:49 +02:00
qgis-bot
da1f55b7d1 auto sipify 🍺 2024-09-25 05:09:28 +00:00
Denis Rouzaud
eafa4b48b2
fix Python API compatibility (#58860)
* fix Python API compatibility

* Update qgis.h
2024-09-25 07:06:11 +02:00
Denis Rouzaud
6d4e343792
[mvt] fix line dash arrays using literals (#58857)
* [mvt] fix line dash arrays using literals

* Update src/core/vectortile/qgsmapboxglstyleconverter.h

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

---------

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2024-09-25 07:05:36 +02: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
Germán Carrillo
e855941a34 [core] Introduce QgsStackedDiagramRenderer for rendering stacked diagrams. This allows subdiagrams to define their own sizes and legends; add tests for a stacked diagram composed of mixed renderers (single category and linearly interpolated categories), as well as nested stacked diagrams. 2024-09-17 23:56:31 -05:00
Germán Carrillo
614ce76156 [gui] Introduce StackedDiagramProperties and use it as dialog and as vector properties page. For the moment, it works with single diagrams, hiding controls for stacked diagrams 2024-09-17 23:56:22 -05: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
a492cb22fb [feature] Support horizontal alignment in HTML labels
For multi-line labels, this allows use of either:

- HTML <p align="xxx"> attributes
- CSS "text-align: xxx"
- HTML <center>some text</center> tags

Supported alignments are left, right, center and justify

Horizontal alignment can be used in all contexts where
HTML text is rendered, EXCEPT for curved labels (since they
are restricted to single-line text)

Sponsored by City of Freiburg im Breisgau
2024-09-16 17:26:24 +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
Ivan Barsukov
d0dedde547 Fixed typo in allowCommitChanged 2024-09-14 06:01:01 +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
qgis-bot
e25bc2089b auto sipify 🍺 2024-09-13 14:55:52 +00:00
Denis Rouzaud
304f9642b4
[locator] add priority per group (#58542)
* [locator] add priority per group

* fix test

---------

Co-authored-by: signedav <david@opengis.ch>
2024-09-13 16:52:45 +02:00
qgis-bot
774399c3ea auto sipify 🍺 2024-09-12 07:21:24 +00: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
Nyall Dawson
059a37f87d
Fix struct attributes descriptions missing from PyQGIS docs (#58672)
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/177
2024-09-12 07:12:52 +02:00
Mathieu Pellerin
83e53cb09a Address comment, fix crash seen on Qt6 CI 2024-09-12 08:34:13 +10: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
Nyall Dawson
15a7079a39 [api] Implementation of labeling engine rules
See https://github.com/qgis/QGIS-Enhancement-Proposals/issues/299

Implements the API framework for setting advanced labeling engine
rules for a project, and implements 4 initial rule types:

- QgsLabelingEngineRuleMinimumDistanceLabelToFeature: prevents labels
  being placed too *close* to features from a different layer
- QgsLabelingEngineRuleMaximumDistanceLabelToFeature: prevents labels
  being placed too *far* from features from a different layer
- QgsLabelingEngineRuleMinimumDistanceLabelToLabel: prevents labels
  being placed too close to labels from a different layer
- QgsLabelingEngineRuleAvoidLabelOverlapWithFeature: prevents labels
  being placed overlapping features from a different layer

(note that the first 3 rules require a build based on GEOS >= 3.10,
they are not available for older GEOS builds)

Also implements a registry for storing available rule classes,
and serialization of rules and configuration in QGIS projects
2024-09-11 02:06:41 +10:00
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
f43e5ad17c geometry: Add triangulatedsurface support 2024-09-09 06:16:25 +02:00
Jean Felder
3d070316eb qgis: Add support for TIN type 2024-09-09 06:16:25 +02:00
Jean Felder
371eca55e8 geometry: Add polyhedralsurface support 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
38af55cb85 Add missing docs 2024-09-08 16:06:22 +10:00
Nyall Dawson
cfd251e7f7 Capture signal arguments 2024-09-08 16:06:22 +10: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
Mathieu Pellerin
ef39464f8a
Merge pull request #58550 from nirvn/processing_openstreetmap_policy
[processing] Insure that processing algorithms are not used to breach the OSMF tile usage policy on bulk download
2024-09-05 13:50:20 +07:00
Nyall Dawson
561961a11d Fix malformed enum documentation
Fixes #50176
2024-09-04 20:34:44 +10:00