954 Commits

Author SHA1 Message Date
merydian
82772b7865 Place shapely related things in separate try statement 2024-09-30 13:22:21 +10:00
merydian
bbf6bc5e11 Implement QgsGeometry.as_numpy and .as_shapely 2024-09-30 13:22:21 +10:00
qgis-bot
cc8c62fc99 auto sipify 🍺 2024-09-28 23:00:59 +00:00
Nyall Dawson
93012dd5af [feature] Support img tags in HTML label text
Allows use of img tags in HTML label content. The following logic
is applied:

- Image path is set via the src="xxx" attribute. Local, HTTP, and
base64 encoded paths are permitted
- Any image format readable by QGIS can be used
- Image sizes can be specified via the width="##" and height="##"
attributes. If width or height is not specified it will automatically
be calculated from the original image size
- If width or height are specified, they are considered to be
in POINTS
- The css width/height settings are NOT respected (this is a Qt
limitation)
- Images are not supported for curved text labels
- Images are placed inline only, floating images are not supported

Sponsored by City of Freiburg im Breisgau
2024-09-29 08:57:52 +10:00
Nyall Dawson
ffc6dd208d Allow QgsTextFragment to represent an inline image object
Modifies the QgsTextDocument API to extract images from HTML
content, and store in the associated
QgsTextFragment/QgsTextCharacterFormat objects
2024-09-29 08:57:52 +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
qgis-bot
1e24f487f1 auto sipify 🍺 2024-09-27 06:41:09 +00:00
qgis-bot
4550beadb5 auto sipify 🍺 2024-09-27 05:58:03 +00: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
27e1ec90e7 auto sipify 🍺 2024-09-26 21:40:29 +00:00
Even Rouault
8335dab269
Merge pull request #58864 from rouault/fix_58861
QgsJsonUtils: add a way to disable use of field formatters
2024-09-26 23:37:12 +02:00
Germán Carrillo
37de287f7c [core] Addres review: skip SIP for some static const diagram names 2024-09-26 09:48:19 -05:00
signedav
f022253095 expose model and delegate to the api 2024-09-26 15:28:18 +02:00
qgis-bot
6a488de21a auto sipify 🍺 2024-09-26 12:20:58 +00:00
Denis Rouzaud
590232d70a
add template method to return specific type of layers in map canvas (#58878)
* add template method to return specific type of layers in map canvas

* Apply suggestions from code review

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>

---------

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2024-09-26 14:17:36 +02:00
Germán Carrillo
463bf249bb [core] Address review: switch from define to static const 2024-09-25 19:46:58 -05:00
Germán Carrillo
eb201c56e6 [gui] Switch from string-based connections to functor-based ones 2024-09-25 19:41:35 -05: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
dc1583bd7c
QgsJsonUtils: add a way to disable use of field formatters
Fixes #58861
2024-09-24 22:49:08 +02:00
qgis-bot
0b11a7c36c auto sipify 🍺 2024-09-23 08:16:06 +00:00
Even Rouault
588e8d430b QgsRasterInterface::colorInterpretationName(): return a translated string 2024-09-23 10:11:03 +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
qgis-bot
484f1051ec auto sipify 🍺 2024-09-23 08:07:39 +00:00
Julien Cabieces
bcaea01703
Merge pull request #58790 from elpaso/bugfix-gh57422-server-cascading-legend-size
[server] WMS GetLegendGr.. cascading size
2024-09-23 10:04:26 +02:00
qgis-bot
5281b4b85c auto sipify 🍺 2024-09-21 22:26:18 +00:00
Nyall Dawson
cde770edc6 QgsDistanceArea methods should raise QgsCsException when errors occur
Instead of just silently return "0", which is misleading and
can result in data corruption/incorrect analysis results. Better
to be safe and force callers to handle transformation errors
appropriately.

In this case we:

- raise QgsProcessingExceptions when the failed measurement is coming
from a processing tool, so that the user is forced to deal with the
issue and we aren't providing meaningless/misleading measurements
- report evaluation errors if the measurement is coming from a
QGIS expression, so the user must appropriately handle the situation
- for all other cases we currently just write a console error and
maintain the current behavior of treating the measurement length
as 0. TODO notes have been added to handle this cases better.
2024-09-22 08:23:05 +10:00
Alessandro Pasotti
1f86ad11b7 Add a blocking variant 2024-09-20 16:03:14 +02:00
Denis Rouzaud
6bf3ee0f30 const correction 2024-09-20 11:06:45 +02:00
Nyall Dawson
f61e33da4e Doxygen comments should use "NULLPTR", not "NULL"
NULLPTR will get correctly formatted in both c++ and Python docs
2024-09-19 09:55:44 +10:00
qgis-bot
7e8fd29287 auto sipify 🍺 2024-09-18 20:21:08 +00:00
Alessandro Pasotti
5c76ebf092 Address PR comments 2024-09-19 06:17:55 +10:00
Alessandro Pasotti
2978f47951 [layout] Fix missing layer in fixed table editor
Fix #58774
2024-09-19 06:17:55 +10:00
Alessandro Pasotti
90622beb53 [server] WMS GetLegendGr.. cascading size
Fix #57422 by adjusting the legend size considering the
cascaded legend imag size.
2024-09-18 18:13:31 +02:00
qgis-bot
dfe6494584 auto sipify 🍺 2024-09-18 07:30:18 +00:00
Nyall Dawson
08eb9c1049 Populate subset string metadata for provider subclasses 2024-09-18 17:27:06 +10:00
Nyall Dawson
b8669d693d Add methods to QgsDataProvider for subset string dialect/help URL
To be used in dialogs for advising users of the subset string dialect
2024-09-18 17:27:06 +10:00
Germán Carrillo
f81df2876c [gui] Move Diagrams properties to a panel widget, showing tabs instead of a list when docked; harmonize stacked diagram configuration with rule-based labeling; allow QgsDiagramProperties to sync to renderers and diagram layer settings, in addition to syncing to layers; when editing a subdiagram of a stacked diagram, only show widgets for diagram layer settings if the subdiagram is the first one, for the rest, hide those widgets and show a note informing users; make sure stacked diagrams handle enabled and disabled subdiagrams (i.e., don't take into account disabled subdiagrams) and add a test for it; switching from single to stacked diagram: take the single diagram definition as the first stacked diagram; fix #58782 (calling twice the apply method for label rendering) 2024-09-17 23:57:00 -05: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
d12d661a4e [gui] Write/read stacked diagram state to/from XML (QGIS project) 2024-09-17 23:56:31 -05:00
Germán Carrillo
7e886a5b0c [gui] Implement syncToLayer for QgsStackedDiagramproperties, delegating to subdiagrams' syncToLayer when needed 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
Germán Carrillo
5b35dbaa63 [tests] Subdiagram position in vertically stacked diagrams (iterating subdiagrams backwards) 2024-09-17 23:55:38 -05:00
Germán Carrillo
2d7b81c3c9 Adjust documentation links 2024-09-17 23:55:37 -05:00
Germán Carrillo
4432797778 Const method; improve new QgsStackedDiagram's docs 2024-09-17 23:55:37 -05:00
Germán Carrillo
3a264b4e4b Replace outdated unused in docs; remove outdated unused in code 2024-09-17 23:55:37 -05:00
Germán Carrillo
75483703cf Introduce QgsStackedDiagram to create compound diagrams like population pyramids. Use Stacked as internal name for stacked diagrams and StackedBar for stacked bar diagrams. Add subDiagram parameter to QgsDiagramRenderer::diagramSize() and QgsDiagramRenderer::diagramSettings() (single and interpolated) to get subdiagrams info. 2024-09-17 23:55:33 -05:00
qgis-bot
aa855199ad auto sipify 🍺 2024-09-17 04:03:42 +00:00
Nyall Dawson
3e63b9a4fd Use plural for consistency 2024-09-17 14:00:35 +10:00