27 Commits

Author SHA1 Message Date
Nyall Dawson
a16e424550 Add some more polygon labeling tests 2019-12-29 13:03:23 +10:00
Nyall Dawson
bb42c43829 Fix bug in polygon label candidate ranking
Candidates furthest from any obstacles were being preferred, even
when this resulted in labels being located around the edges of polygon
features.

The correct logic should be only to consider direct overlaps of the
candidate with an obstacle as a conflict, and if a candidate does
NOT overlap and obstacles then we rely on the "put labels furthest
from edges as possible" rule.
2019-12-26 13:18:57 +10:00
Nyall Dawson
a997ab8b85 Add more labeling tests covering different label/obstacle combinations 2019-11-27 13:16:52 +10:00
Nyall Dawson
175a075bd8 Use geojson files instead of sqlite for PAL test suite
It's much more git friendly...
2019-11-27 11:07:52 +10:00
Nyall Dawson
2bccde39cd Tweak test qml for test consistency 2019-11-27 11:07:52 +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
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
Matthias Kuhn
04919963f7 Merge pull request #2616 from SebDieBln/FixLayerCountAttribute
Remove the 'layercount' attribute in a project file
2016-01-12 10:46:17 +01: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
Sebastian Dietrich
d26bd46d99 remove 'layercount' attribute from project file
The 'layercount' attribute was not used anyway and the calculated number could already be outdated when loading the project file again due to changes to embedded projects.
2016-01-08 16:10:58 +01: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
Nyall Dawson
86ad564ef5 Add (disabled) test for labels around large symbols 2015-11-21 20:02:21 +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
Juergen E. Fischer
7c75ffa3b0 spelling fixes 2014-05-17 22:02:03 +02:00
Larry Shaffer
20933dedd9 Add README.rst for labeling unit tests 2014-03-25 17:09:42 -06:00
Larry Shaffer
be83e7c8e3 Add test-labeling master project and italic, bold-italic test fonts 2014-02-19 13:27:59 -07:00
Larry Shaffer
2f1a5c92e0 Convert local test server over to controller of web and fcgi servers
- Initially using lighttpd/spawn-fcgi
2014-02-19 13:27:58 -07:00
Larry Shaffer
ff05ee0693 [tests] Add preconfigured project to test local server connection 2013-09-02 10:57:54 -06: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