20309 Commits

Author SHA1 Message Date
Nyall Dawson
730cd7e23a [feature] Add "stretch" setting for labels and text formats
Allows text to be horizontally stretched or condensed by a %
factor. Handy for tweaking the widths of fonts to fit a bit
of extra text into labels (when used sparingly, that is...
you can certainly abuse font stretching with some horrendous
results!)

Requires Qt 6.3+ or KDE's 5.15 fork

Thanks for KDAB for fixing the upstream issues blocking this!
2021-11-09 14:58:14 +11:00
Nyall Dawson
dae69acc76 [feature] Support Small Caps style in labels/text renderer
Adds two new capitalization styles for labels and text symbols:

- Small Caps: Renders lowercase characters as small caps
- All Small Caps: Renders all characters as small caps (regardless
of their original case)

Requires Qt 6.3+, or Qt 5.15 using KDE's fork and the cmake
HAS_KDE_QT5_SMALL_CAPS_FIX switch defined during build.
2021-11-08 14:36:44 +11:00
nicogodet
ea981d89f9 Homogenize toMapLayer function definition 2021-11-08 10:13:28 +11:00
Nyall Dawson
294282c970 Add new map settings/render context flag for high quality image transforms
which is opt in, and consistently respect this for better quality
raster image markers, svg/raster fills when set

We don't set this by default (keep things light for server), but
do use it in the map canvas and layout exports whenever antialiasing
is enabled.
2021-11-07 17:16:59 +11:00
Harrissou Sant-anna
ab42fbbda6 Relabel the geometric predicate option
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-11-05 09:51:27 +11:00
Harrissou Sant-anna
7a2ae423ed Relabel "join by location..." algorithms inputs 2021-11-05 09:51:27 +11:00
Alessandro Pasotti
d4876f3842 Add operator for flgs and update docs 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
2fbb830c16 Address PR comments 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
c5f956dbef Introduce VectorLayerType flags 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
a04112d740 Add isQuery() to vector layer and data provider
The method returns TRUE if the layer is a query/sql layer.

This allows to selectively show the "Update SQL Layer..." menu
entry in the legend.

Partial fix for #45796
2021-11-05 07:29:18 +11:00
Nyall Dawson
cf467c4e17 Improve PDF export
We no longer require paint engine hack for Qt 6.3 or KDE's fork, which
now means that pattern brushes and gradients are correctly exported
to PDF without forced rasterization.

Results in higher quality PDF outputs with smaller file sizes

Thanks to KDAB for the fix!
2021-11-05 07:28:32 +11:00
Germán Carrillo
6d3cec6dcf [plugins] Minor improvement to find_dependencies: avoid two consecutive calls to updateAvailablePlugins(); add missing keys to Plugins dict in installer_data 2021-11-05 07:26:42 +11:00
Germán Carrillo
10633af446 [plugins] In dependencies dialog, make sure column Name's width is enough to show the whole plugin name 2021-11-05 07:26:42 +11:00
Germán Carrillo
f9c203cafa [plugins] Add support for experimental dependencies 2021-11-05 07:26:42 +11:00
Tom Kralidis
d3a2e45582 [MetaSearch] remove data.gov CSW from default connections list (#43386) 2021-11-05 07:22:12 +11:00
Antoine Facchini
97b288dcee
Add roundness method to curve polygon (#45154)
* add roundness function

* add roundness function tests

* add roundness function help

* add roundness expression

* add roundness expression tests

* add roundness expression help

* add roundness processing

* add roundness processing tests

* add roundness processing help

* fix import and typo

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Add tag

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Modify the description

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Replace equality condition by qgsDoubleNear

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Change types for literals

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add since version

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add a const

* add the \since adding in the sip file

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Remove SIP factory annotation

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

* Remove double calculation of permimeter

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

* Always add an attribute

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

* Use QGSCOMPARENEAR in tests

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

* Shorten the short description

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

* Make a more complete help string

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

* Correct the description

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

* reformat bad code styles

* sipify

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-11-04 08:44:03 +01:00
nirvn
d8ac5e6f2c [editor widgets] Provide a show first feature setting to avoid UI freeze of attribute form containing a large number of embedded relations 2021-11-03 18:20:49 -07:00
Sandro Mani
18d598ba4a Set release_gil = True when generating bindings 2021-11-04 08:51:00 +11:00
nicogodet
40df6ec76b Add geometryType() method to root Table class 2021-11-03 18:09:27 +01:00
Alessandro Pasotti
dc3e9ebad0
Merge pull request #45158 from dmarteau/fix-server-filter-streaming
[server] Allow better control of the response flow chain from server filters.
2021-11-03 13:43:54 +01:00
Antoine
9272035c4e copy model only when no error 2021-11-03 06:53:03 +11:00
Antoine
d2425f51b8 remove model validity condition 2021-11-03 06:41:45 +11:00
Julien Cabieces
d2f27f5e7e
Merge pull request #45727 from elpaso/expose-qgsserverfid-to-bindings
Expose QgsServerFeatureId to Python
2021-11-02 08:38:52 +01:00
Nyall Dawson
14bd167aba Ensure zip items behave correctly as files in browser
Also fixes drag and drop support for zip to project

Refs https://github.com/qgis/QGIS/issues/45769
2021-11-02 17:04:18 +11:00
Nyall Dawson
4b7dff669c Improve docs 2021-11-02 15:03:56 +11:00
Nyall Dawson
dabc17bbcb Ensure correct symbol geometry type is used for more preview icons 2021-11-02 06:29:25 +11:00
Nyall Dawson
11dc9cca18 Add force_polygon_cw and force_polygon_ccw expression functions
These are recommended for use instead of the existing force_rhr
function, due to the variability in definition of the "right hand
rule" between different software applications. Using an explicit
force_polygon_cw/ccw function removes user confusion when the
results vary between different applications.
2021-11-01 12:10:41 +11:00
Nyall Dawson
0795f726cf [api] Add function to apply a dash pattern vector to a geometry
This returns a new multilinestring geometry which represents the
input geometry with the dash pattern applied to the lines or rings
of the input geometry.

Options are available to set rules for the start/end of the pattern,
e.g. ending on a full dash or gap, or half dash or gap.

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +11:00
Alessandro Pasotti
5c3915b9ed
Merge pull request #45587 from elpaso/bugfix-gh45582-vector-renderer-localization-issues
Fix multiple localization issues with vector renderers
2021-10-29 15:49:14 +02:00
Alessandro Pasotti
c2b15d89e3 Bah :/ 2021-10-29 15:39:52 +02:00
Alessandro Pasotti
375bf6d3ad Expose QgsServerFeatureId to Python
the namespace contains some vital functions for web applications
that want to use the QgsServer API.
2021-10-29 15:35:40 +02:00
Nyall Dawson
b28a27636d Add some missing /Factory/ annotations 2021-10-29 13:24:47 +11:00
Nyall Dawson
c8156c059c Improve documentation 2021-10-29 13:24:47 +11:00
Nyall Dawson
4a4e0061e1 [feature][symbology] New "Lineburst" line symbol layer type
This adds a new "Lineburst" symbol layer type, which renders
a gradient along the WIDTH of a line (as opposed to the interpolated
line renderer, which renders a gradient along the LENGTH of
a line). It's like the shapeburst fill symbol type, but for lines!

Sponsored by North Road, thanks to SLYR
2021-10-29 05:34:08 +11:00
Nyall Dawson
0667363261 [feature][symbology] New "Raster Line" symbol layer type
This new symbol layer type renders a raster image following
a line feature's shape.

Options are present for:
- picture path (including data defined path)
- line width
- opacity
- line join/cap styles

Sponsored by North Road, thanks to SLYR
2021-10-28 12:13:54 +11:00
Matthias Kuhn
8d7110faf3
Merge pull request #45366 from suricactus/proper_quote_alg_aggr
Properly quote the delimiter in the processing aggregate algorithm
2021-10-27 13:41:08 +01:00
Nyall Dawson
b06e136a57 [feature][symbolgy] Expose choice of clipping behaviour for line
pattern fill

This allows users to control how lines in the fill should be
clipped to the polygon shape. Options are:

- Clip During Render Only: existing behaviour, lines are created
covering the whole bounding box of the feature and then clipped
while drawing. Line extremities (beginning and end) will not be
visible
- Clip Lines Before Render: lines are clipped to the exact
shape of the polygon prior to rendering. Line extremities (including
cap styles, start/end marker line objects, etc) will be visible,
and may sometimes extend outside of the polygon (depending
on the line symbol settings)
- No Clipping: no clipping at all is done - line will cover the
whole bounding box of the feature

Sponsored by North Road, thanks to SLYR
2021-10-26 14:30:13 +11:00
Nyall Dawson
088ffe6a46 [symbology] Add support for rendering line pattern fills line-by-line
When exporting to a vector format (e.g. PDF) or when a line subsymbol
has dynamic (data defined properties), automatically switch to
a line-by-line based approach for rendering the fill instead of the
previous raster tiled pattern based approach.

While it's slower to render (not noticable for desktop users, but
likely enough to affect server deployments), this has many benefits:

1. Smaller PDF/SVG output file sizes, since the fills aren't rasterized
2. PDF/SVG files which are easier to modify in external apps for
post production, as each individual line in the pattern can be
modified.
3. Better quality PDF/SVG outputs, since the fill isn't DPI
dependant and looks awesome regardless of how close in you zoom
4. No visible artefacts at certain angles/distances/line symbol
styles

And even more excitingly, it opens the door for a range of
new symbol styles, eg.

- line patterns where the individual lines change color/width/dash/...
- line patterns with marker line symbols on center point/etc
- geometry generator effects per line, e.g. wavy line patterns, hand
drawn line styles, etc

Sponsored by North Road, thanks to SLYR

Fixes #16100
2021-10-25 18:55:07 +11:00
Nyall Dawson
0785488631 Fix geometry generator used in subsymbol of point pattern fill results
in only a single marker being rendered
2021-10-25 13:53:11 +10:00
Clemens Raffler
baf50af3cd add more testcases with differing layer CRSs 2021-10-25 09:30:34 +10:00
Clemens Raffler
9eabef7623 add ellipsoid and crs settings in test 2021-10-25 09:30:34 +10:00
Clemens Raffler
9ef92b7d1f add testcase for centroid based distance 2021-10-25 09:30:34 +10:00
Clemens Raffler
4507337eac add test result datasets 2021-10-25 09:30:34 +10:00
Clemens Raffler
0ce9fc505c add point testdata 2021-10-25 09:30:34 +10:00
Clemens Raffler
257f45297c add python based test 2021-10-25 09:30:34 +10:00
Nyall Dawson
87094024af [feature][symbology] Add optional rotation angle for point pattern
fill

Allows the fill pattern to be rotated

Sponsored by North Road, thanks to SLYR
2021-10-24 18:00:25 +10:00
Jochen Topf
9329891f6b Make QgsTileMatrix::tileRangeFromExtent() const
Because there is no reason for it not to be.
2021-10-23 22:30:22 +02:00
Nyall Dawson
ec41cb59b4 Don't expose an outline subsymbol for SVG fill symbol layers
This is inconsistent with all other fill types, which don't
have a special outline subsymbol. Users should be creating
outline layers when they want an outline instead.

When reading an SVG fill symbol layer from XML, automatically
upgrade any outline subsymbol which is used by the fill to
be separate symbol layers for the parent fill symbol so
that existing symbols will appear as designed in older QGIS
versions.

Fixes qgis#14103
2021-10-23 23:50:52 +10:00
Nyall Dawson
40279cb996 Set new Qgis::RenderContextFlag::RenderingSubSymbol flag on render contexts
whenever a subsymbol component of a parent symbol is being rendered

This flag allows symbol layers to refine their behaviour based on whether
they are a subsymbol or not.
2021-10-23 20:06:32 +10:00
Nyall Dawson
757c69e1ef [feature][symbology] Add random point offset for point pattern fills
This optional setting allows each point to be randomly shifted up
to the specified maximum distance in the x/y directions. Maximum
offset can be set in mm, points, map units, etc OR "percentage"
(which is percentage of the pattern width/height)

An optional random number seed can be set to avoid patterns
jumping around between map refreshes.

Data defined overrides are also supported.

Sponsored by North Road, thanks to SLYR
2021-10-23 19:05:33 +10:00