667 Commits

Author SHA1 Message Date
Nyall Dawson
426382c919 [FEATURE] Average line angles for marker and hashed line symbology
Previously, when marker or hash lines were rendered using interval
or center point place placement, the symbol angles were determined
by taking the exact line orientation at the position of the symbol.

This often leads to undesirable rendering effects, where little
jaggies or corners in lines which occur at the position of the
symbol cause the marker or hash line to be oriented at a very
different angle to what the eye expects to see.

With this new option, the angle is instead calculated by averaging
the line over a specified distance either side of the symbol. E.g.
averaging the line angle over 4mm means we take the points along
the line 2mm from either side of the symbol placement, and use these
instead to calculate the line angle for that symbol. This has the
effect of smoothing (or removing) any tiny local deviations from
the overall line direction, resulting in much nicer visual
orientation of marker or hash lines.

Like all symbol settings, the average angle smoothing distance
can be set using mm/pixels/map units/etc, and supports data-defined
values.

Closed rings also correctly consider wrapping around these average
angles from the start/end vertex.

(Sponsored by an anonymous corporate backer)
2019-04-05 12:00:47 +10:00
rldhont
7de6eeb6d8
Merge pull request #9654 from rldhont/fix-regression-server-print-selection-pdf-master
[Unit-test]To avoid regression in Server printing to PDF output format
2019-04-04 12:28:38 +02:00
Nyall Dawson
50dd2d6ec7 Unit tests for hashed line symbols 2019-04-03 02:31:27 +10:00
rldhont
56733ee0f7 Add unit-tests to avoid regression in Server printing to PDF output format
In QGIS 3.4, Selection can be printed in Image output and not in PDF or SVG output.

A fix has been done 2752f83 to fix inconsistent use of layout render context flags, and draw selection is activated with a flag.
2019-04-02 12:44:11 +02:00
Nyall Dawson
4472820ead More reference images and masks for layout attribute table tests 2019-04-01 16:11:31 +10:00
Nyall Dawson
824ba076da More reference images and masks for 3d tests 2019-04-01 16:11:31 +10:00
Nyall Dawson
4f9d0029ad Add test mask images 2019-03-26 18:17:12 +10:00
Nyall Dawson
e5b87474d4 Test improvements
- Use standard test font, larger font size to minimize cross platform
rendering differences
- Create a local test report for debugging
2019-03-26 18:17:12 +10:00
henrik
4b90afdb9e Spelling 2019-03-26 18:17:12 +10:00
henrik
cf63e00500 Added tests for PointDisplacementRenderer labels. 2019-03-26 18:17:12 +10:00
Blottiere Paul
e9067834eb
Merge pull request #9362 from pblottiere/legend_json
Add json format for legend
2019-03-21 09:17:42 +01:00
Blottiere Paul
2ccc3f158b Add test with big marker 2019-03-19 14:38:04 +00:00
Blottiere Paul
3f4999bd5f Add test for opacity 2019-03-19 14:38:04 +00:00
Blottiere Paul
8f76c23f1e Add unit tests 2019-03-19 14:38:04 +00:00
rldhont
547fd683d9 [Bugfix][Regression][Server] JPEG output for WMS GetPrint request has gone
In QGIS Server 2.* the WMS GetPrint request could genrate JPEG image. QGIS Server 3.4 has lost this capabilities.
```
<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" version="1.3.0" capture-installed="true">
    <ServiceException code="InvalidFormat">
        Output format jpg is not supported by the GetPrint request
    </ServiceException>
</ServiceExceptionReport>
```
To fix this regression, it is necessary to accept JPEG output format.

And to avoid this regression to come back, the QGIS Server tests has been updated to accept jpg image test.
2019-03-19 10:18:49 +01:00
Blottiere Paul
cbc4270afb Add unit test for getprint and external layers 2019-03-18 08:44:25 +00:00
Blottiere Paul
216826bbf6 Add test for getmap and external layers 2019-03-18 08:44:25 +00:00
Matthias Kuhn
f4d5788313
Add test for geometry generator labeling 2019-03-10 15:03:36 +01:00
Nyall Dawson
12ba41750f Fix paletted raster renderer does not respect correct band when rendering
Fixes #21505
2019-03-07 18:50:06 +10:00
Blottiere Paul
0e8757b408
Merge pull request #9236 from signedav/scale_getlegendgraphic
On GetLegendGraphics take the scale context from map parameters
2019-02-26 10:19:56 +01:00
David Signer
61ceeb7968 expected images from travis 2019-02-25 17:07:44 +01:00
David Signer
8d1ceda878 correct images from qgis travis build 2019-02-25 15:10:14 +01:00
David Signer
de96fc75fa tests for scaled symbol sizes 2019-02-25 09:48:52 +01:00
Blottiere Paul
9f576b678e
Merge pull request #9204 from troopa81/wms_filters
Add possbility to define one filter for several layers
2019-02-25 09:05:08 +01:00
Mathieu Pellerin
3433c9cc88 [FEATURE][3d] Add camera lens field of view settings 2019-02-23 05:20:38 +10:00
Julien Cabieces
b01239449f Update mask 2019-02-22 10:53:23 +01:00
Mathieu Pellerin
78e8c34200
[legend] Fix alignment and chopped off text of collapsed data-defined size legend symbol (#9228) 2019-02-22 15:18:06 +07:00
Julien Cabieces
21bfcfcca8 [FEATURE][needs-docs] Add possbility to define one filter for several layers 2019-02-19 11:07:49 +01:00
Hugo Mercier
809196693c Fix $length in labels (fixes #19355)
Use the project expression scope to access project
parameters (ellipsoid and distance/area units)
2019-02-14 13:40:12 +01:00
Marco Hugentobler
14e517665f Add unittest for composer polyline with arrow 2019-02-08 16:23:29 +01:00
Marco Hugentobler
a321d40840 Adapt unit test control images 2019-02-08 10:56:07 +01:00
Nyall Dawson
9cf2ff31d8 Fix evaluation of data defined properties for subsymbols of subsymbols
Fixes #18384
2019-01-23 03:36:41 +11:00
Martin Dobias
8709ab61eb
Merge pull request #8893 from wonder-sk/rule-based-3d-renderer
Rule-based 3D renderer
2019-01-18 12:58:11 +01:00
Nyall Dawson
349946c669 Layer and layer node items have access to map layer expression context scope 2019-01-18 20:36:30 +11:00
Nyall Dawson
7ba5998db2 Calculate correct legend size when using expression based labels 2019-01-18 20:36:30 +11:00
Nyall Dawson
d70b60d48f [FEATURE][layouts] Allow expressions to be embedded inside legend item text
This feature allows for expressions to be embedded directly inside
legend item text (e.g. group, subgroup and item text). The expressions
are evaluated at render time, with full knowledge of the legend's
expression context (so can utilise variables from the layout/layout item/
etc)

There's no UI for this yet (that will come in 3.8), but expressions are
entered using the standard [% 1 + 2 %] format.

E.g. a legend item text of

    My layer (rendered at 1:[% @map_scale %])

will show in the output as

    My layer (renderer at 1:1000)
2019-01-18 20:36:30 +11:00
Martin Dobias
f069342b35 Rendering test for rule-based 3D renderer 2019-01-17 21:02:31 +01:00
rldhont
81aa143923 [Server][Feature][needs-docs] WMTS tile matrices configuration
In QGIS Server 3.4, the WMTS API has been added in which the tile matrices are calculated except fro EPSG:3857 and EPSG:4326.

This commit adds the capability to select the tile matrices to use with the project and to configure the top-left corner and the last level of the tile matrix. In the case of EPSG:3857 and EPSG:4326, the user can only choose the last level of the tile matrices.

Funded by Ifremer.
2019-01-17 15:29:30 +01:00
Martin Dobias
d2834bbb44 fix 3d mesh test 2019-01-16 11:02:20 +01:00
Peter Petrik
d695c4b34b [feature] [3d] [mesh] Display mesh faces in 3D view as terrain 2019-01-16 11:02:20 +01:00
Nyall Dawson
0de94dd1fe [layouts] Fix incorrectly rendered item background and frame when item is
non-opaque

Fixes #20909
2019-01-08 16:24:37 +10:00
Alessandro Pasotti
1ba6b97f74
[server] Fix layer order rendering when layers are in groups (#8796)
* [server] Fix layer order rendering when layers are in groups

Fixes #20810

* Update test images

* [server] Fix order of layers in subgroups

basically: layers in WMS is specified in a comma separated
list where leftmost layer is drawn first (it's at the bottom)
and QGIS layer order is exactly the opposite: first layer
in the TOP (topmost) is drawn last (it is at the top).

For this reason the server reverses the list before passing
it to the renderer.

* Fix order of layers in test

* Update src/server/services/wms/qgswmsrenderer.cpp
2019-01-07 13:13:30 +01:00
mhugent
54a5fae0b7
Merge pull request #8781 from mhugent/get_atlas_print
[server][needs-docs] Get atlas print
2019-01-07 10:42:23 +01:00
Alessandro Pasotti
7d592a01ba Add control image masks
Add more mask images (when image size does not match, generate_test_mask_image.py fails to update the mask)
2019-01-05 20:48:49 +01:00
Marco Hugentobler
583674bbb5 Remove diagrams from atlas print test as it shows different behaviour in different environments 2019-01-05 15:16:38 +01:00
Marco Hugentobler
df8940c6bf Add control image for atlas GetPrint test and fix some python stuff 2019-01-05 15:16:38 +01:00
Alessandro Pasotti
3c2392808d Update control images 2019-01-04 19:30:28 +01:00
Alessandro Pasotti
d49994005c [server] Respect layer title space when rendering legends
Fixes #20693 - LAYERTITLESPACE in GetLegendGraphic is not taken into account
2019-01-04 14:32:43 +01:00
Nyall Dawson
201523fb85 Test masks 2019-01-03 04:53:28 +10:00
Nyall Dawson
a441e2b14b [layouts] Add API allowing drawing map overviews under map layers
or under map labels
2019-01-03 04:53:28 +10:00