34 Commits

Author SHA1 Message Date
David Koňařík
320ee6b374 Split point cloud index into implementation & wrapper 2025-01-06 21:31:40 +01:00
Matthias Kuhn
e76a5870fc Fix sip_include 2024-12-30 10:52:45 +01: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
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
Nyall Dawson
7670fbe362
Move class, method out of QgsPalLabeling to central location 2024-12-02 12:46:23 +10:00
Jean Felder
efaff7e2f5 introduce qgsrenderedlayerstatistics
This will be used in the next commits to store the min-max values of a
raster layer and report them to the main canvas.
2024-11-28 14:37:06 +10:00
Denis Rouzaud
5f18ff84a2
make QgsVectorTilesUtils available to Python bindings (#58989) 2024-10-07 18:07:48 +02: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
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
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
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
Jean Felder
f43e5ad17c geometry: Add triangulatedsurface support 2024-09-09 06:16:25 +02:00
Jean Felder
371eca55e8 geometry: Add polyhedralsurface support 2024-09-09 06:16:25 +02:00
Nyall Dawson
05003ba2fa [feature] Add "Linear Referencing" symbol layer type
This new symbol layer type allows placing text labels at regular
intervals along a line (or at positions corresponding to
existing vertices). Positions can be calculated using
Cartesian distances, or interpolated from z/m values.

Functionality includes:

- Labels can be placed using fixed cartesian 2d distances,
at regular linearly interpolated spacing calculated using
the Z or M values in geometries, or at existing vertices
- Labels can show either the running total distance, or
the linearly interpolated Z/M value
- Uses text rendered to draw labels, so the full range
of functionality is available for the labels (including
buffers, shadows, etc)
- Uses the QGIS numeric format classes to format numbers
as strings, so users have full range of customisation
options for eg decimal places
- An optional "skip multiples of" setting. If set, then
labels which are a multiple of this value will be skipped
over. This allows construction of complex referencing labels,
eg where a symbol has two linear referencing symbol layers,
one set to label every 100m in a small font, skipping multiples
of 1000, and a second set to label every 1000m in a big
bold font
- Labels are rendered using an angle calculated by averaging
the linestring, so sharp tiny jaggies don't result in
unslightly label rotation
- Optionally, markers can be placed at referenced points
in the line string, using a full QGIS marker symbol (this allows
eg showing a cross-hatch at the labeled point, for a "ruler"
style line)
- Data defined control over the placement intervals, skip
multiples setting, marker visibility and average angle
calculation length

Notes:

- When using the distance-based placement or labels, the
distances are calculated using 2D only, Cartesian calculations
based on the original layer CRS. This could potentially be
extended in future to expose options for 3D Cartesian distances,
or ellipsoidal distance calculations.

Sponsored by the Swiss QGIS User Group
2024-09-04 19:06:26 +10:00
Nyall Dawson
16e05a207b [feature] Add 'Custom Expression' numeric format
This numeric format allows users to craft a custom QGIS expression
to format numbers. The expression can use the @value variable
to retrieve the value to be formatted, and then use any standard
QGIS expression function to format this as desired.

It can be used anywhere QgsNumericFormat is accepted, eg layout
scalebars, elevation plots, layout tables, and color ramp
legends

Sponsored by the Swiss QGIS User Group
2024-08-29 13:27:23 +10:00
Nyall Dawson
6127088395 Make common base class for annotation items which render in rect
And avoid a bunch of duplicate code
2024-08-25 12:34:51 +10:00
Nyall Dawson
bae23c28a3 [FEATURE] Text inside rectangle annotation item
This adds a new annotation item type for rendering paragraphs
of text inside a rectangle

Options are present for:

- Text format
- Horizontal and vertical alignment
- Margins
- Background and frame symbol
2024-07-31 07:58:53 +10:00
Nyall Dawson
75cca8a20c [FEATURE] Add picture annotation item type
Can render SVG or raster images as items in an annotation layer.
Options are present for:

- Locking the picture's aspect ratio
- Drawing with a background symbol
- Drawing with a border symbol
- Linked or embedded pictures
2024-07-26 20:38:47 +10:00
Nyall Dawson
e931b9ade6 Add mask render settings to QgsMapSettings/QgsRenderContext
And API mechanism to propagate these from layout exports down
to the render context

Gives us a place to specify fine-tuned control over masking
settings for map renders
2024-06-20 05:41:37 +10:00
Mathieu Pellerin
96a711a2ae Address review: add vector layer tools context class, implement addFeatureV2 2024-06-03 11:05:58 +07:00
Nyall Dawson
b89abdb64b Create optimised paint device to QgsGeometry converter 2024-05-31 15:02:35 +10:00
Nyall Dawson
0a493a0443 Move core painting related files to src/core/painting 2024-05-31 15:02:35 +10:00
Nyall Dawson
e81fcd0b09 Start on QgsLabelPointSettings class 2024-05-23 17:20:30 +10:00
Germán Carrillo
c20fec2aca Update SIP file for PyQt6 2024-05-22 13:44:52 +10:00
Nyall Dawson
75455dffad Move class to own file 2024-04-21 06:46:35 +10:00
Mathieu Pellerin
4bd2e66b3f Rename classes 2024-04-08 11:18:35 +07:00
Mathieu Pellerin
d7325cba40 [raster] New single color renderer 2024-04-08 11:18:35 +07:00
Nyall Dawson
94bef546b2 Ensure temporal and elevation filters work correctly in conjunction
Fixes #56938
2024-03-26 08:54:31 +10:00
Nyall Dawson
e9730b1bb3 Add capabilities for raster renderers
And selectively expose some of QgsRasterRendererRegistry to python
2024-03-18 21:26:20 +01:00
Nyall Dawson
298a2940cb Fix sip 2024-02-15 12:39:11 +10:00
Nyall Dawson
ff56801b8f Create QgsWebEnginePage wrapper class around QWebEnginePage
Like QgsWebPage this provides additional functional over the
base Qt class to simplify tasks required in QGIS.
2024-02-12 12:48:27 +10:00
Nyall Dawson
0e00b5fcb0 Shell for QgsPdfRenderer class 2024-02-12 12:48:27 +10:00
uclaros
103e6dd0e6 ok sip 2024-01-08 05:20:26 -08:00
Julien Cabieces
bb3c36a69b Initialize sip bindings for PyQt6
use exactly the ones from PyQt5 so we can study the difference when
generating for PyQt6
2023-12-08 03:38:42 +10:00