271 Commits

Author SHA1 Message Date
Matthias Kuhn
c9fa33410d Fix rendering geometry generators for line layers
And add more tests
2015-12-11 11:41:41 +01:00
Matthias Kuhn
aa4f28882d Add geometry generator tests 2015-12-10 12:33:43 +01:00
Nyall Dawson
4624fb88ae Update test mask images 2015-11-26 12:53:52 +11:00
Nyall Dawson
e03f5549ca Update test mask images 2015-11-25 07:48:47 +11:00
Nyall Dawson
675da0ce40 Fix PyQgsServerAccessControl on Ubuntu
Add size tolerance to legend images, add masks for legend images
2015-11-24 07:54:29 +11:00
Nyall Dawson
f1458434fb Followup 7d600bd, proper fix for failing labeling engine test
When labelFeatures is called outside of the renderering loop,
we need to make sure the renderer is prepared by calling
startRender.
2015-11-24 07:26:37 +11:00
Nyall Dawson
169989a02f Update test mask images 2015-11-23 21:03:04 +11:00
Nyall Dawson
73ac9f9acd Update test mask images 2015-11-23 06:03:44 +11:00
Nyall Dawson
7d600bdaed [FEATURE] Use rendered symbol size as obstacle for point feature labels
Previously, only the point feature itself was treated as an obstacle
for label candidates. If a large or offset symbol was used for the
point, then labels were allowed to overlap this symbol without
incurring the obstacle cost.

Sponsored by City of Uster
2015-11-22 21:30:42 +11:00
Nyall Dawson
2e0019df39 Test mask updates 2015-11-22 18:08:34 +11:00
Nyall Dawson
9cc10e2a21 [labeling] Allow different obstacle geometry to feature geometry
This change makes it possible to have a different geometry used
for labeling obstacle detection to the geometry used for generating
label position candidates.

Also fixes parts of multipolygon features were not treated as
obstacles when "label only largest part" of polygon was checked.
Some inefficiencies in pal were also fixed (eg avoiding adding
features/obstacles to pal rtree indexes when they will never
be used).

Sponsored by City of Uster
2015-11-21 22:23:16 +11:00
Nyall Dawson
47e6d3031b Update test masks 2015-11-21 22:03:19 +11:00
Nyall Dawson
03f9e1b351 [pal] Never treat features as obstacles for their own labels
Fixes issues like rule based labelling registering two labels for
a single feature which was resulting in each label colliding
with the feature's geometry registered by the other label. This
resulted in poor placement for these labels.

Sponsored by City of Uster
2015-11-21 20:49:28 +11:00
Nyall Dawson
86ad564ef5 Add (disabled) test for labels around large symbols 2015-11-21 20:02:21 +11:00
Nyall Dawson
b81858f3fc Rename marker line symbol test folder to match other symbol tests 2015-11-21 19:05:48 +11:00
Nyall Dawson
711c38dfaf Make symbol line fill tests more robust 2015-11-21 19:01:28 +11:00
Nyall Dawson
11c82045b7 More test mask updates 2015-11-21 18:39:36 +11:00
Juergen E. Fischer
ff3a622e53 4 more pixels... (followup ca3da4c) 2015-11-21 00:52:33 +01:00
Juergen E. Fischer
ca3da4ceee adapt render tests to c6460a3 2015-11-20 23:23:50 +01:00
Nyall Dawson
4203a7c1f4 Add method to determine approximate rendered symbol bounds for markers
Sponsored by City of Uster
2015-11-20 19:55:02 +11:00
Nyall Dawson
4d02e48f16 Update test mask images for windows 2015-11-20 11:29:09 +11:00
Stéphane Brunner
c9f0d83aaf The plugin define the following methods:
* layerFilterExpression
  Return an additional filter, used in
  WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature to filter the features
* layerFilterSubsetString
  Return an additional the subset string (typically SQL) filter.
  Faster than the layerFilterExpression but not supported on all the
  type of layer
* layerPermissions
  Change the rights on the layer per user (known by the plugin)
  Concern rights: publish, insert, update, delete.
  Mostly used in WFS/Transaction, and the publish in all requests.
* authorizedLayerAttributes
  Be able to show some attributes only for a subset of user
  Used in: WMS/GetFeatureInfo, WFS/GetFeature
* allowToEdit
  Be able to don't allow to edit a particular feature, in our case base
  on the Geometry
  Used in: WFS/Transaction
* cacheKey
  Cache key to used to create the capabilities cache, "" for no cache,
  shouldn't contains any "-", default to ""
2015-11-18 14:49:43 +01:00
Nyall Dawson
e6d495a2d6 Update test mask images 2015-11-15 14:48:45 +11:00
Nyall Dawson
d699569b86 Add initial tests for marker symbol layers 2015-11-14 20:17:54 +11:00
Sandro Santilli
824fd7bf32 Fix endpoint swap on negative marker line offset
Fixes #13811
Includes testcase
2015-11-13 15:29:44 +01:00
Nyall Dawson
452e61c8e0 More test mask updates for windows 2015-11-10 17:15:43 +11:00
Nyall Dawson
7c149d77a9 Update atlas test mask image for Win 2015-11-10 06:26:55 +11:00
Nyall Dawson
2988dbdd18 Update legend test mask images for debian builds 2015-11-10 06:24:41 +11:00
Nyall Dawson
9e84fcafd8 Followup 2ac5933 with more data defined fixes
2ac5933 fixed the regression in 2.12, but there were more underlying
issues from <2.8 causing sub symbols with data defined properties
to be ignored.

Add some tests.

(refs #13707)
2015-11-04 16:03:46 +11:00
Hugo Mercier
d16cdcf449 Add more options for filtering legend elements
This introduces two new options to filter legend elements:
- filter by expression: a boolean expression can be set. Only symbols of
features that make the expression evaluated to true will be kept in the legend
- filter by polygon: only symbols of features that are inside the given
polygon will be part of the legend.

The polygon filtering is used in particular for a new option in the
composer legend that allows to filter out anything that is not included
in the current atlas polygon.
2015-11-03 10:39:09 +01:00
Juergen E. Fischer
d9c8e73fa2 'fix' PyQgsRulebasedRenderer test (followup 08185c9a) 2015-10-29 15:21:05 +01:00
Nyall Dawson
772ab8e249 Update test mask images 2015-10-16 17:46:22 +11:00
Nyall Dawson
ec9fd86d30 Add missing mask from previous commit 2015-10-12 21:57:01 +11:00
Nyall Dawson
b93f2eacbe Follow up c7b9fa, fix failing tests
Looks like there's a label in the test which is placed right on the
boundary of the map, so the geos changes in c7b9fa have shifted it
slightly off the canvas and resulted in it not being drawn.

Update test mask images so this label is optional.
2015-10-12 21:56:31 +11:00
Nyall Dawson
1aefa17fbd Update TestQgsLabelingEngineV2 to use render checker, reenable on Travis 2015-10-12 18:38:29 +11:00
Nyall Dawson
80ccb39ae5 More test mask updates. Also disable qgis_labelingenginev2 on Travis
qgis_labelingenginev2 needs to be refactored to use QgsRenderChecker.
Directly comparing the two images is too fragile due and is failing
on Travis.
2015-10-10 22:07:39 +11:00
Nyall Dawson
4eb53d366a Update test mask images 2015-10-10 21:21:21 +11:00
Nyall Dawson
d1be2ff214 Fix hardcoded border for raster legend items (fix #13540)
Previously raster legend items always had a fixed black border.
Now there's options to change the color/width of this border or
disable it entirely.
2015-10-09 06:12:37 +11:00
Nyall Dawson
2f343008c1 [FEATURE][composer] Add fit page to contents option
New option in the composition panel, with optional extra margins
to add

Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
2215d48712 [FEATURE][composer] Add option to hide pages from view/export
Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Matthias Kuhn
93e9204b43 Add test for rulebased renderer else rule 2015-09-08 17:03:21 +02:00
Nyall Dawson
5ae2881c81 Update test mask 2015-09-07 20:24:57 +10:00
Nyall Dawson
9133538a74 [FEATURE][composer] Advanced customisation of cell background color
for attribute tables

This allows users to set differing colors for alternating rows and
columns, first/last row/column and header row. Fixes #5131.

Sponsored by Ville de Morges
2015-09-05 22:06:31 +10:00
Nyall Dawson
f9fa9793f0 [pal] Improved test for candidate against polygon obstacles
Previous test was just checking point in polygon for the corner,
mid points and center. This test was not sufficient for narrow
or small polygons which were not covered by these points
but were still covering parts of the label candidate.

Now, the area of the intersection between the obstacle polygon
and the label candidate is used to calculate the obstacle
cost.
2015-08-31 12:20:14 +10:00
Nyall Dawson
0c5475545f Cleanup control_images folder by grouping some tests in subfolders 2015-08-30 20:15:25 +10:00
Nyall Dawson
253e13154e Start on placement test suite for labeling
Sponsored by City of Uster
2015-08-28 12:47:56 +10:00
Nyall Dawson
9aecf9f236 Test mask update 2015-08-25 08:42:25 +10:00
Nyall Dawson
46114659a8 More robust maprotation label test
Previous test was too reliant on platform-specific font rendering
2015-08-24 12:49:50 +10:00
Nyall Dawson
86ace247c5 Test mask updates 2015-08-22 18:52:22 +10:00
Nyall Dawson
b87e5f7573 [FEATURE][composer] Data defined style preset for composer maps
Sponsored by City of Uster
2015-08-19 20:43:19 +10:00