9 Commits

Author SHA1 Message Date
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