allow offsetting FOLLOW labels #4399

Closed
wants to merge 33 commits into
from

Projects

None yet

4 participants

@tbonfort
Member

Currently labels with ANGLE FOLLOW ignore the label's OFFSET parameter. This ticket tracks the implementation of offsetting labels to the right or to the left of the underlying feature.

The feature will be activated with

OFFSET x -99

in the same way that offset works for STYLE, i.e. a positive x offsets to the right of the curve, and a negative x offsets to the left of the curve.

The implementation will require the presence of GEOS of at least version 3.3.0, where the GEOSOffsetCurve is present.

Håvard Tveite and others added some commits Jun 5, 2012
Håvard Tveite Documentation of the removal of the DUMP parameter in the migration g…
…uide (#3830)
c50d7b1
Håvard Tveite Revert "Documentation of the removal of the DUMP parameter in the mig…
…ration guide (#3830)"

This reverts commit c50d7b1.

I have to apply to 6.0 first, so undoing this one!
b484454
Håvard Tveite Updated migration guide - removal of DUMP (#3830) c32e9a8
@unicolet unicolet Error in new refcounting locking code: restore project build also whe…
…n thread support is disabled
f19951e
Håvard Tveite Merge remote branch 'upstream/master' 0904541
Håvard Tveite Updated the migration guide with some rendering changes between 6.0 a…
…nd 6.2
8b89fc8
@tbonfort tbonfort Merge pull request #4366 from havatv/master
Updated the migration guide with some rendering changes between 6.0 and 6.2
117a041
@tbonfort tbonfort Merge branch 'branch-6-2' into tmpmaster 77f1511
@tbonfort tbonfort update master for version 6.3-dev c5d56fa
@tbonfort tbonfort typo: s/6.2/6.4 e0180d4
@tbonfort tbonfort Merge branch 'branch-6-2' into tmp4364 0628120
@tbonfort tbonfort Merge branch 'branch-6-2' 17d862e
@tbonfort tbonfort Merge branch 'branch-6-2' 10b68d8
@tbonfort tbonfort Merge branch 'branch-6-2' bd4cf18
@tbonfort tbonfort Merge branch 'branch-6-2' 35ace39
@tbonfort tbonfort Merge branch 'branch-6-2' 210ef0c
@tbonfort tbonfort Merge branch 'branch-6-2' 9e66415
@tbonfort tbonfort Merge branch 'branch-6-2' 4311508
@tbonfort tbonfort Merge branch 'branch-6-2' 4e50373
@sdlime sdlime Removed min/max scale override via URL (#4368). 41a1285
Martin Kofahl Fixing a couple of invalid calls to msSetError() in mapunion.c and ma…
…pcluster.c causing a segmentation fault.
3d7ce43
@tbonfort tbonfort Merge pull request #4386 from faegi/segfaultClusterUnion
mapunion and mapcluster codes causes segmentation fault instead of throwing an error
20ee29d
unknown Fix java compilation on Windows (MSVC2003) c921a06
@tbonfort tbonfort Merge branch 'branch-6-2' 42876e0
@tbonfort tbonfort Merge branch 'branch-6-2' ed7afa0
@tbonfort tbonfort Merge branch 'branch-6-2' 81bf62b
@tbonfort tbonfort Merge branch 'branch-6-2' cd81b87
@tbonfort tbonfort Merge branch 'branch-6-2' 2fadbde
@tbonfort tbonfort Merge branch 'branch-6-2' b329772
@tbonfort tbonfort was assigned Jul 18, 2012
@tbonfort tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Jul 18, 2012
@tbonfort tbonfort add test for offset angle follow labels #4399 d656487
@sdlime
Member
sdlime commented Jul 18, 2012

Cool! How about above or below a curve? Or inside or outside a polyline? Does this have application in those use cases? Above/below is a common request.

Steve

@tbonfort tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Jul 18, 2012
@tbonfort tbonfort add result for cairo (mapserver/mapserver#4399) eead313
@tbonfort
Member

above/below is going to be more or less ill-defined for some line configurations. If looking at the start and end point of the line to determine if it's mostly left-to-right or right-to-left is sufficient, then it would be simple enough to force the label to be on top or under the curve. Could be activated with OFFSET x 99 instead of OFFSET x -99

@tbonfort
Member

either I messed up my implementation, either GEOS's OffsetCurve implementation is severely buggy when specifying a negative offset. Needs more work... cc @dmorissette

@tbonfort
Member

this is the output of the geos offset curve,
with a positive offset:
positive offset
with a negative offset:
negative offset

@tbonfort
Member

unsurprisingly it was my fault in incorrectly using GEOSOffsetCurve with negative offset, which is now fixed. I have also added the possibility to offset the label above or below the line instead of just left or right.

  • OFFSET x 99 : offset to the top
  • OFFSET -x 99: offset to the bottom
  • OFFSET x -99: offset to the right
  • OFFSET -x -99: offset to the left

cc @dmorissette

@sdlime
Member
sdlime commented Jul 19, 2012

Ok by me to merge... Steve

@tbonfort tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Dec 11, 2012
@tbonfort tbonfort update offset line results for GEOS offsetter 41ddd5d
@tbonfort tbonfort added a commit to tbonfort/msautotest that referenced this pull request Dec 11, 2012
@tbonfort tbonfort add tests for offsetted labels 634a457
@tbonfort tbonfort added a commit that referenced this pull request Dec 11, 2012
@tbonfort tbonfort update autotests submodule for #4399 27c1c75
@tbonfort
Member

applied, closing

@tbonfort tbonfort closed this Dec 11, 2012
@dmorissette
Contributor

Have docs been updated or was a docs ticket created?

@tbonfort tbonfort added a commit to mapserver/docs that referenced this pull request Dec 11, 2012
@tbonfort tbonfort add docs for offsetted follow labels 6783177
@tbonfort
Member

docs added in mapserver/docs@6783177

@dmorissette
Contributor

Awesome. Thanks.

@mkofahl mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013
@tbonfort tbonfort implementation of offsets on follow labels (#4399) 2f9a4fe
@mkofahl mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013
@tbonfort tbonfort update autotests submodule for #4399 fa0d6c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment