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

Fix SLD PerpendicularOffset for lines and labels #4801

Closed
wants to merge 2 commits into
base: branch-6-4
from

Conversation

Projects
None yet
1 participant
@tbonfort
Member

tbonfort commented Oct 28, 2013

From the mapserver-users mailing list:

Hi all,

I've noticed that there's an implementation difference between
specifying a perpendicular offset in the STYLE section of the Mapfile:

  STYLE
    ...
    OFFSET 3 -99
    ...
  END

and specifying it via an SLD:

  <sld:LineSymbolizer>
    ...
    <sld:PerpendicularOffset>3</sld:PerpendicularOffset>
    ...
  <sld:LineSymbolizer>


The first one, via the Mapfile, does a complex offset calculation
(function msOffsetPolyline() in maputil.c; calls msOffsetCurve() for
perpendicular offset).
The second one, via the SLD, simply does a displacement by the given
value in both the X and Y directions (function msSLDParseLineSymbolizer()
in mapogcsld.c).
These two produce quite different results.
[Note that the SLD one would be the same as specifying "OFFSET 3 3" in
the Mapfile.]

My questions:
Is there a reason the two methods are different?
If not, would it be possible to change the SLD one to use the same
calculations as done for the Mapfile?

@ghost ghost assigned tbonfort Oct 28, 2013

tbonfort added a commit that referenced this pull request Oct 29, 2013

Fix SLD PerpendicularOffset for lines and labels (#4801)
also use #defines instead of 99/-99 for label offsets
@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Oct 29, 2013

Member

rebased into branch-6-4 in 1d8b68a, closing

Member

tbonfort commented Oct 29, 2013

rebased into branch-6-4 in 1d8b68a, closing

@tbonfort tbonfort closed this Oct 29, 2013

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