85 Commits

Author SHA1 Message Date
Nyall Dawson
38ef62e1cc Fix incorrect annotation scaling when exporting layouts
Previously, annotation size and position always used pixel units. This
did not work well when exporting layouts, resulting in tiny annotations
(it also caused issues when moving projects between hidpi/non hidpi
displays).

Instead, use millimeters for annotation size and position so that the
appearance is consistent across displays and works correctly in layout
exports.

Add lots of unit tests covering this.

Fixes #18373
2019-04-30 15:21:39 +10:00
Alessandro Pasotti
956ed06f52 [server] Respect custom layer order for groups in GetMap
Fixes #21917
2019-04-26 12:04:39 +02:00
rldhont
f8880c6e9c [Tests][Server] WMTS - use resolution for bbox calculation 2019-04-24 10:46:21 +02:00
nirvn
ca305bb5b0 Turn antialising render flag on when appropriate in QgsRenderContext::fromQPainter() 2019-04-24 10:06:33 +07:00
Alessandro Pasotti
c0c19f0cc9 Fix wrong cotrol image for ITEMFONTCOLOR test 2019-04-18 08:32:33 +02:00
Alessandro Pasotti
1f862cadc6 Waste my time with Travis 2019-04-17 14:12:30 +02:00
Alessandro Pasotti
7032db27fa [server] Implement LAYERFONTCOLOR and ITEMFONTCOLOR
Fixes #21871
Fixes #21870

Funded by: Gis3w
2019-04-17 12:01:06 +02:00
David Signer
fab5254595 using correct pictures and additional comments 2019-04-11 19:12:26 +02:00
David Signer
fa8e5fa348 add test files and correct image 2019-04-11 17:01:23 +02:00
David Signer
1d6a7dd53c replace image with the expected one from test 2019-04-11 14:51:01 +02:00
David Signer
96f054e1c1 tests for default mapunits per mm on EPSG:4326 2019-04-11 12:36:35 +02:00
David Signer
679b100f0c tests for default scale on EPSG:2056 2019-04-11 11:42:45 +02:00
rldhont
98235eb46b [Bugfix][Server] QGIS Server removes empty string in style parameter even if it describes default style
In OGC WMS standard, the empty string represents the default style.

QGIS Server when it parses the parameters, QGIS Server when it parses parameters it removes empty parts.
When all requested styles are default ones it's equal to an empty parameter STYLE, as defined in the standard.
When only one layer is requested, there is no issue with custom or default style.
When multiple layers are requested and some with custom styles, because QGIS Server does not retain empty strings, it loses the layer / style match.

To fix it, keeps empty parts for not empty styles parameters.
2019-04-05 09:29:21 +02: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
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
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
Julien Cabieces
b01239449f Update mask 2019-02-22 10:53:23 +01:00
Julien Cabieces
21bfcfcca8 [FEATURE][needs-docs] Add possbility to define one filter for several layers 2019-02-19 11:07:49 +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
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
8d7e21fc6d Test mask updates 2018-12-15 11:28:56 +10:00
Tudor Bărăscu
2cf8f74c71 test server rendering debian buster bug #18988 2018-11-16 08:49:55 +02:00
rldhont
b64e72a89d [Bugfix][Server] Use Project selection color in GetPrint 3.4 2018-10-31 09:38:28 +01:00
rldhont
c47c0ef7d5 [Server][Tests] Update WMS GetPrint Selection 2018-10-26 11:36:28 +02:00
rldhont
eae047e9dd [Server][Tests] Update WMS GetMap Selection
The selection color is read from the project and apply to the map.
2018-10-25 16:40:53 +02:00
Blottiere Paul
5496442ca1 Add mask image 2018-09-28 08:42:18 +01:00
Tudor Bărăscu
1955ebb7c9 server disabled test for failing getmap req with Line sld 2018-09-21 10:14:38 +03:00
Tudor Bărăscu
f125d3f792 add image mask and make travis happy 2018-09-20 20:42:13 +03:00
Tudor Bărăscu
7a9d08eddf add test for Point SLD highlight on server 2018-09-20 14:06:38 +03:00
Blottiere Paul
d30f93ffe9 Add unit tests 2018-09-13 15:32:13 +01:00
Blottiere Paul
a6b44b15b3 Add unit test for OGC filters with multiple layers 2018-09-07 05:32:58 +01:00
Blottiere Paul
34c1d7acce Add unit test for empty OGC filter 2018-09-07 05:32:58 +01:00
rldhont
2075141af9 [Server] Fixing tests 2018-08-21 15:11:51 +02:00
rldhont
385de9db00 [Server][Feature][needs-docs] Create WMTS service Tests 2018-08-20 11:23:50 +02:00
Blottiere Paul
96a0b4777c Add unit test 2018-05-17 13:17:28 +01:00
Tudor Bărăscu
cdca7084c4 add GetMap DPI mask image, fixes local test 2018-05-08 16:07:53 +10:00
Blottiere Paul
2d340a0de2 Update unit test with symbology depending on @map variables 2018-04-13 09:50:18 +01:00
Blottiere Paul
e8ce121bc5 Add unit test to check symbol's rotation coming from a project variable 2018-04-12 14:21:53 +01:00
Blottiere Paul
5014d95d6e
Merge pull request #6450 from tudorbarascu/filter_test
add GetMap FILTER test with multiple filters
2018-04-06 11:07:17 +01:00