30 Commits

Author SHA1 Message Date
Nyall Dawson
03d561b199 [labeling] Ensure short lines (wrt font size) still generate sufficient
candidates to ensure centered placement of labels
2019-07-25 12:11:45 +10:00
Nyall Dawson
b04374d46f Tweak curved label cost of placing away from center (increase cost slightly to encourage more central placements) 2019-05-30 17:27:00 +10:00
Nyall Dawson
61523c8124 Update label test masks following sort algorithm change
std::sort is returning a slightly different sort order when
label z order (or label cost) is equal

Given that the order in these cases is effectively arbitrary
I've updated the test masks to accept either order.
2017-02-07 14:08:02 +10:00
nirvn
769c82b579 [pal] fix curved labels failure with zero-width characters
(fixes 15801)
2016-11-03 13:35:51 +07:00
Nyall Dawson
10ee1c3c26 Update test masks 2016-09-23 13:58:14 +10:00
Nyall Dawson
6dbdd4c24b Update test masks for qt5 2016-09-05 13:44:41 +10:00
Nyall Dawson
863c73db8f Label test mask updates 2016-08-09 16:55:13 +10:00
Nyall Dawson
c3f720f80b [pal] Only apply distance from line midpoint penalty to non closed linestrings
Sponsored by Andreas Neumann
2016-08-09 16:55:12 +10:00
Nyall Dawson
dc0cc32046 Further tweaks to line labeling, add tests
Sponsored by Andreas Neumann
2016-08-09 16:55:11 +10:00
Nyall Dawson
01e6c04980 Labeling tests 2016-08-09 16:55:11 +10:00
Nyall Dawson
4bcae0693d Revert "Update labeling reference images"
This reverts commit 1aec78145f7553ca62584a9bb626b8a531a01a8e.
2016-07-20 19:44:04 +10:00
Nyall Dawson
1aec78145f Update labeling reference images 2016-07-20 13:04:50 +10:00
Nyall Dawson
57d114e2e2 Update test masks for Qt5, enable labeling tests 2016-05-15 20:38:38 +10:00
Nyall Dawson
90613ca5d3 One more xenial test mask update 2016-04-22 07:07:08 +10:00
Nyall Dawson
b8c620a317 update test mask 2016-02-26 22:48:08 +11:00
Nyall Dawson
58c85bb8c0 Tweak vertical position of labels under points in "cartographic"
label placement mode

Previously labels were being drawn too low
2016-02-26 19:36:20 +11:00
Nyall Dawson
f0d8efbdd4 Update test mask 2016-01-13 16:16:39 +11:00
Nyall Dawson
8779091225 Fix failing tests 2016-01-12 08:24:56 +11:00
Nyall Dawson
8b28c040d1 [FEATURE] Add mode to apply label distance from symbol bounds
(only works with Cartographic point label placement). When this
setting is active, the label distance applies from the bounds
of the rendered symbol for a point, instead of the point itself.
It's especially useful when the symbol size isn't fixed, eg if
it's set by a data defined size or when using different symbols
in a categorised renderer.

Sponsored by Andreas Neumann
2016-01-12 08:24:39 +11:00
Nyall Dawson
6499439cc5 Fix failing tests, add tests for ordered placement
Sponsored by Andreas Neumann
2016-01-12 08:24:38 +11:00
Nyall Dawson
e03f5549ca Update test mask images 2015-11-25 07:48:47 +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
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
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
253e13154e Start on placement test suite for labeling
Sponsored by City of Uster
2015-08-28 12:47:56 +10:00