14 Commits

Author SHA1 Message Date
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
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
8779091225 Fix failing tests 2016-01-12 08:24:56 +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
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
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
Martin Dobias
d43176af60 Fix server labeling tests
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:11 +08:00
Martin Dobias
6cc1f4c2cb Fix unit tests and issues with cached layers
This code has been funded by Tuscany Region (Italy) - SITA (CIG: 63526840AE) and commissioned to Gis3W s.a.s.
2015-09-21 12:57:09 +08: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
Nyall Dawson
16cab9fcf9 Add tests for line placement of labels 2015-06-24 17:11:45 +10:00
Larry Shaffer
4d03cf7f95 [labeling] Update unit test control images, features db and .qml styles 2013-08-21 06:05:12 -06:00
Larry Shaffer
9c4c2150bf [labeling] Initial python unittest setup and some tests
- Note: some tests will fail until differences in platform dpi are worked out
2013-08-11 13:12:06 -06:00