New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow offsetting FOLLOW labels #4399

Closed
wants to merge 33 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@tbonfort
Member

tbonfort commented Jul 18, 2012

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
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!
Merge pull request #4366 from havatv/master
Updated the migration guide with some rendering changes between 6.0 and 6.2
Merge pull request #4386 from faegi/segfaultClusterUnion
mapunion and mapcluster codes causes segmentation fault instead of throwing an error

@ghost ghost assigned tbonfort Jul 18, 2012

tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Jul 18, 2012

@sdlime

This comment has been minimized.

Show comment
Hide comment
@sdlime

sdlime Jul 18, 2012

Member

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

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 added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Jul 18, 2012

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 18, 2012

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

Member

tbonfort commented Jul 18, 2012

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 18, 2012

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

Member

tbonfort commented Jul 18, 2012

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 18, 2012

Member

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

Member

tbonfort commented Jul 18, 2012

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

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Jul 19, 2012

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

Member

tbonfort commented Jul 19, 2012

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

This comment has been minimized.

Show comment
Hide comment
@sdlime

sdlime Jul 19, 2012

Member

Ok by me to merge... Steve

Member

sdlime commented Jul 19, 2012

Ok by me to merge... Steve

tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this pull request Dec 11, 2012

tbonfort added a commit to tbonfort/msautotest that referenced this pull request Dec 11, 2012

tbonfort added a commit that referenced this pull request Dec 11, 2012

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Dec 11, 2012

Member

applied, closing

Member

tbonfort commented Dec 11, 2012

applied, closing

@tbonfort tbonfort closed this Dec 11, 2012

@dmorissette

This comment has been minimized.

Show comment
Hide comment
@dmorissette

dmorissette Dec 11, 2012

Contributor

Have docs been updated or was a docs ticket created?

Contributor

dmorissette commented Dec 11, 2012

Have docs been updated or was a docs ticket created?

tbonfort added a commit to mapserver/docs that referenced this pull request Dec 11, 2012

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort
Member

tbonfort commented Dec 11, 2012

docs added in mapserver/docs@6783177

@dmorissette

This comment has been minimized.

Show comment
Hide comment
@dmorissette

dmorissette Dec 11, 2012

Contributor

Awesome. Thanks.

Contributor

dmorissette commented Dec 11, 2012

Awesome. Thanks.

mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013

mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment