73987 Commits

Author SHA1 Message Date
Nyall Dawson
c36a042828 [feature][expression] Add a "per_part" option to "rotate" expression
function

If set to true and no explicit rotation center point is specified (ie
rotation happens around the geometry's center), then the rotation
is applied around the center of each part individually instead of the
geometry as a whole.

This is designed mostly to aid cases when rotate is used as a cartographic
tool as part of a geometry generator symbol layer.

Sponsored by North Road, thanks to SLYR
2021-10-31 18:19:01 +11:00
Alessandro Pasotti
80ed176035
Merge pull request #45521 from elpaso/bugfix-gh30817-reborn
Server atlas print fix pk-less layers
2021-10-30 18:36:52 +02:00
Alessandro Pasotti
0bab0122f8
Merge pull request #45669 from jakimowb/master
QgsAttributeTableModel clears mFieldFormatters on loadAttributes
2021-10-30 14:43:08 +02:00
Alessandro Pasotti
96187b20c5
Update src/server/services/wms/qgswmsrenderer.cpp
Co-authored-by: David Marteau <dmarteau@3liz.com>
2021-10-30 12:55:51 +02:00
Nyall Dawson
c94c74127c Document that function accepts polygons, add test 2021-10-30 18:18:03 +11:00
Nyall Dawson
8ce33e1e08 [feature][expressions] Add new apply_dash_pattern function.
Applies a dash pattern to a geometry, returning a MultiLineStringi
geometry which is the input geometry stroked along each line/ring
with the specified pattern.

Rules can be set to control how the dash pattern is adjusted
at line endings. If a start rule or end rule is set, the adjustment
option defines whether both dash and gaps, or only dash or gap
sizes are adjusted to apply the rules.

An optional pattern offset can specify how far along the pattern
the result should start at.
(The offset is applied AFTER any start/end rules are applied.)

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +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
6f8bed820b Address PR comments 2021-10-29 16:50:43 +02: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
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
jakimowb
cd6efa170b
Fix QgsRendererRasterPropertiesWidget().syncToLayer
QgsRendererRasterPropertiesWidget's syncToLayer takes care of not 
overwriting existing QgsRasterRenderers with a default renderer

modified test_qgsrendererrasterpropertieswidget.py to check if an
existing band-number > 1 is used to update the render widget

fixes qgis#34602
2021-10-29 12:05:57 +10:00
Nyall Dawson
1bbc7c5d84 When make_polygon is called on a geometry which is already a polygon,
just return that geometry instead of NULL
2021-10-29 12:58:15 +11:00
Nyall Dawson
d3d3b5e83c Add missing offset widgets for lineburst symbol layer 2021-10-29 12:58:04 +11:00
Nyall Dawson
ccf5ff0a29 Fix widget for data defined line color in lineburst symbol layer 2021-10-29 12:58:04 +11:00
Benjamin Jakimow
957f89862c ensures that QgsVectorLayer::commitChanges() in data QgsOgrProvider
sources maintains QgsEditorWidgetSetup

added test to test_provider_ogr.py

fixes #43261
2021-10-29 11:03:22 +11:00
vcloarec
811c3d12d4 fix snapping with mesh editing map tool 2021-10-29 10:09:57 +11:00
Alessandro Pasotti
d3c2564594
Merge pull request #45675 from jakimowb/issue_45228
Fixes #45228: QgsVectorLayer::featuresDeleted is only called once
2021-10-28 20:55:34 +02: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
92aefdc817 When a geometry generator expression result is an incorrect geometry
type for the generator symbol, try to coerce the result geometry
to the correct type

E.g. if the generator is set to a line symbol type but the expression
gives a polygon result, then take the rings of the polygon as the
geometry and render using the line symbol

At worst this is better then rendering absolutely nothing (which can
be very confusing!!), and at best is desirable behaviour anyway.
2021-10-29 05:33:46 +11:00
Nyall Dawson
5195032482 When switching symbol layer types from geometry generator or back, keep as much of the old symbol layer as we can 2021-10-28 15:34:49 +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
Maxim Rylov
3a7d8555e7 Implement createSqlVectorLayer, sqlDictionary, sqlOptions functions in QgsHanaProviderConnection (ps 3) 2021-10-28 10:23:43 +11:00
Maxim Rylov
a5c51b86fb Implement createSqlVectorLayer, sqlDictionary, sqlOptions functions in QgsHanaProviderConnection (part 2) 2021-10-28 10:23:43 +11:00
Maxim Rylov
c58278c98c Implement createSqlVectorLayer, sqlDictionary, sqlOptions functions in QgsHanaProviderConnection 2021-10-28 10:23:43 +11:00
Maxim Rylov
b07e37390e HANA: improve error message by unknown types 2021-10-28 10:23:43 +11:00
Maxim Rylov
3d55a14553 Implement missing API function in QgsHanaProviderConnection 2021-10-28 10:23:43 +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
a0b87530d4 Expose percentage as unit option for point/line pattern fill offset
and displacement widgets
2021-10-27 14:15:45 +11:00
Juergen E. Fischer
6c95845d86 debian packaging: fix install of sip files on impish and unstable 2021-10-27 03:33:50 +02:00
Benjamin Jakimow
579c683b36 fixed ./tests/src/python/test_qgsvectorlayer.py:3681:36: F541 f-string
is missing placeholders
2021-10-26 17:56:46 +02:00
Benjamin Jakimow
5a36681de9 ensures QgsVectorLayer::featuresDeleted is only called once and with all
deleted FIDs when changes are commited by QgsVectorLayer::commitChanges

implemented related test
(testCommitChangesReportsDeletedFeatureIDs(self)) in
test_qgsvectorlayer.py

Fixes #45228
2021-10-26 17:40:52 +02:00
Benjamin Jakimow
d3fa496052 QgsAttributeTableModel clears mFieldFormatters on loadAttributes
(addresses #45478)

Signed-off-by: Benjamin Jakimow <benjamin.jakimow@geo.hu-berlin.de>
2021-10-26 12:11:02 +02:00
Loïc Bartoletti
570d754f02
Merge pull request #45662 from Koyaani/split_ellipse_tests
[TEST] Split ellipse tests
2021-10-26 06:55:22 +02:00
Loïc Bartoletti
62432ead4b
Merge pull request #45661 from Koyaani/split_multicurve_tests
[TEST] Split multi curve tests
2021-10-26 06:54:31 +02: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
Antoine Facchini
8315db4d4e split test mehtod 2021-10-25 17:07:53 +02:00
Antoine
15e214352a add curveN tests 2021-10-25 16:56:20 +02:00
Antoine
84f04f0393 code formatting 2021-10-25 14:16:09 +02:00
Nyall Dawson
ef3983ce5c Add test mask 2021-10-25 18:55:07 +11:00
Nyall Dawson
78d026e014 Add test masks 2021-10-25 18:55:07 +11:00
Nyall Dawson
d0c1cb78b9 Update src/core/symbology/qgsfillsymbollayer.cpp
Co-authored-by: Mathieu Pellerin <nirvn.asia@gmail.com>
2021-10-25 18:55:07 +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
03e304fbb8 Retain subsymbol if possible when changing symbol layer types
E.g. don't reset the marker symbol when changing between centroid/
point pattern/random marker fills. Cos that's just annoying.
2021-10-25 13:53:11 +10:00
Nyall Dawson
d98819d14f Fix spacer location in widget 2021-10-25 13:53:11 +10: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
Nyall Dawson
3429203242 Optimise logic about when a random marker fill / point pattern fill
needs to set expression context variables for each individual rendered
point

We shouldn't consider data defined properties for the fill itself,
only for the subsymbol
2021-10-25 13:53:11 +10:00
Juergen E. Fischer
2bbd6dad76 debian packaging: include authmethod_apiheader 2021-10-25 03:00:18 +02:00
Clemens Raffler
baf50af3cd add more testcases with differing layer CRSs 2021-10-25 09:30:34 +10:00
Clemens Raffler
5c4933d71f fix crs handling, remove ellipsoidal measuring, clarify helpstring 2021-10-25 09:30:34 +10:00