7181 Commits

Author SHA1 Message Date
Alessandro Pasotti
ba816459e1 Update tests 2019-05-02 10:16:00 +02:00
Alessandro Pasotti
8378eae0e5 Layout 2019-04-24 10:08:08 +02:00
Alessandro Pasotti
63711510b6 Dear Qt, I love you but ...
... you are too slow and QJson API is so ugly.

Now using this wonderful json lib:
https://github.com/nlohmann/json

Results in release mode (QJson tests are not shown but
QJson was even slower than string concat).

PASS   : TestQgsJsonUtils::testExportAttributesJson(Use json)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use json":
     0.0022 msecs per iteration (total: 75, iterations: 32768)
PASS   : TestQgsJsonUtils::testExportAttributesJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportAttributesJson():"Use old string concat":
     0.0032 msecs per iteration (total: 54, iterations: 16384)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use json)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use json":
     0.011 msecs per iteration (total: 96, iterations: 8192)
PASS   : TestQgsJsonUtils::testExportFeatureJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportFeatureJson():"Use old string concat":
     0.015 msecs per iteration (total: 64, iterations: 4096)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use json)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use json":
     0.76 msecs per iteration (total: 98, iterations: 128)
PASS   : TestQgsJsonUtils::testExportGeomToJson(Use old string concat)
RESULT : TestQgsJsonUtils::testExportGeomToJson():"Use old string concat":
     0.85 msecs per iteration (total: 55, iterations: 64)
PASS   : TestQgsJsonUtils::cleanupTestCase()
2019-04-18 17:04:30 +02:00
Alessandro Pasotti
103981deb5 Fix QCOMPARE in the test 2019-04-18 11:29:36 +02:00
Alessandro Pasotti
64fdbe3d76 Added tests and doxy 2019-04-16 15:17:25 +02:00
Alessandro Pasotti
be8822ed8b Precision and 3d 2019-04-16 14:00:59 +02:00
Alessandro Pasotti
6967a21882 toJsonV2 2019-04-16 14:00:59 +02:00
Alessandro Pasotti
722282828e Use QJson for JSON encoding of features 2019-04-16 14:00:59 +02:00
Nyall Dawson
e2f7b911ee Spelling 2019-04-15 13:59:24 +10:00
Nyall Dawson
75993afcee Another test 2019-04-15 13:59:24 +10:00
Nyall Dawson
b42b295669 Port CRS map unit handling to proj 6 2019-04-15 13:59:24 +10:00
Nyall Dawson
d831f4e15f Use proj6 api for geographicCrsAuthId(), add tests 2019-04-15 13:59:24 +10:00
rldhont
aa297b5185
Merge pull request #9763 from rldhont/sld-point-symbolizer-on-polygon-centroid-not-all-parts
Apply SLD PointSymbolizer on single centroid for polygon
2019-04-12 13:57:57 +02:00
rldhont
052b222196 Test apply SLD PointSymbolizer on single centroid for polygon 2019-04-12 12:32:56 +02:00
Alessandro Pasotti
6092d56991
Merge pull request #9776 from pblottiere/server_params
[server] Fallback to unmanaged parameters
2019-04-12 09:31:35 +02:00
Blottiere Paul
a8a729b24d Add test for an unkown parameter 2019-04-11 13:23:39 +02:00
Blottiere Paul
518e208088 Add unit test 2019-04-11 13:14:23 +02:00
Blottiere Paul
1333be1e1c Update unit tests 2019-04-11 11:36:42 +02:00
Blottiere Paul
3ec23ca2ec Add unit tests 2019-04-11 09:25:00 +02:00
rldhont
09b8a57706
Merge pull request #9769 from dmarteau/Fix-OperationNotSupported-http-code
Return 501 on 'OperationNotSupported' error
2019-04-11 09:22:45 +02:00
David Marteau
69728d4c1d Return 501 on 'OperationNotSupported' error 2019-04-11 08:42:04 +02:00
Matthias Kuhn
1450985547
Merge pull request #9737 from jef-n/postgres-unittest-2826ba34f
unit test for 2826ba34f
2019-04-10 19:13:23 +02:00
nirvn
9ce1093bce [FEATURE][ogr] Add string list field type support 2019-04-10 08:06:12 +07:00
Blottiere Paul
ebccfb6438 Update exception messages 2019-04-09 15:43:11 +02:00
Martin Dobias
b2aa97843d Added rendering tests for 3D lines 2019-04-09 09:42:08 +02:00
nirvn
2582399ab5 [FEATURE][expression] New array_all() function to check whether
an array contains _all_ values of another given array.
2019-04-09 11:44:00 +07:00
Matthias Kuhn
67dabd705d
Merge pull request #9379 from lbartoletti/intersection_linestringZ
Fixes intersection on (multi)linestring/polygon/curve Z, M and ZM
2019-04-08 07:47:20 +02:00
Nyall Dawson
5a85e206f6 [processing] Expose additional expression variables for parameters in GUI 2019-04-08 07:07:12 +10:00
Nyall Dawson
d3016d73d4 [processing] Add method to specify additional expression context variables
which will be available to a parameter when it is evaluated.

Specifying variables via this method is for metadata purposes only.
It is the algorithm's responsibility to correctly set the value of
these additional variables in all expression context used when evaluating
the parameter, in whichever way is appropriate for that particular variable.
2019-04-08 07:07:12 +10:00
Nyall Dawson
ee51551baa Add method to retrieve highlighted variable list from QgsExpressionContext 2019-04-08 07:07:12 +10:00
Matthias Kuhn
4852bac939
Merge branch 'master' into code_modernization 2019-04-07 15:36:48 +02:00
Juergen E. Fischer
f8e32f7b9e unit test for 2826ba34f 2019-04-07 15:35:43 +02:00
Marco Bernasocchi
8b3f97fa19
Merge pull request #9691 from mbernasocchi/check_width_height
Allow setting wmsMaxWidth and wmsMaxHeight in the server env
2019-04-05 20:04:40 +02:00
Matthias Kuhn
31981123d4
Remove Q_FOREACH from modeltest 2019-04-05 15:30:03 +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
Marco Bernasocchi
fad4732e87 Separate the tests in two files since server uses static initialization
and thus we cannot change it's settings once it is created

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>
2019-04-05 08:01:42 +02:00
Marco Bernasocchi
29a15ad890 Move invalid size test to its own class so it can reread os.env
Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

add init_server method

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Use own qgs application so we can change the env settings

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>
2019-04-05 08:01:42 +02:00
Marco Bernasocchi
64e92c1f89 use QStringLiteral in Settings
Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

remove unused mServerSettings

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Fix typo and code style

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Fix test

Fix test
2019-04-05 08:01:41 +02:00
Marco Bernasocchi
2cda2afe3e Add test and sip
add missing methods

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.cpp

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.cpp

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update tests/src/python/test_qgsserver_wms_getmap.py

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Update src/server/qgsserversettings.h

Co-Authored-By: mbernasocchi <marco@opengis.ch>

Adress most review comments in PR

Signed-off-by: Marco Bernasocchi <marco@opengis.ch>
2019-04-05 08:01:41 +02:00
Alessandro Pasotti
3c4b2a7e73
Merge pull request #9704 from elpaso/bugfix-21697-server-gfi-top-group-layers
[server] Allow WMS GetFeatureInfo on root layer and groups
2019-04-05 07:46:22 +02:00
nirvn
578c398219 [FEATURE][expression] Add concatenate_unique() aggregation function 2019-04-05 12:01:06 +07:00
nirvn
9fd5509ad0 Add a aggregation method to concatenate unique values 2019-04-05 12:01:06 +07:00
Nyall Dawson
4582cb8d09 Fix crash, missing points in some corner cases 2019-04-05 12:00:47 +10:00
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
Nyall Dawson
4d7f0c2f50 More unit tests 2019-04-05 11:33:08 +10:00
Nyall Dawson
af2286323a Correctly handle inverse transforms with reversed axis CRS in proj 6.0 builds
This logic is too complex and fragile -- we should drop support for proj 6.0
as soon as we can, so that we can the inbuilt handling which
is enabled for proj >= 6.1 only.
2019-04-05 11:33:08 +10:00
Nyall Dawson
83dc159cc5 Correctly handle swapped axis order for proj 6.0 2019-04-05 11:33:08 +10:00
Nyall Dawson
905ccc0917 Fix proj4 build 2019-04-05 11:33:08 +10:00
Nyall Dawson
353060dc36 Add helper method to determine whether a proj string uses angular units 2019-04-05 11:33:08 +10:00
Alessandro Pasotti
d995070a8e Add missing reference file for gfi test 2019-04-04 14:28:27 +02:00