Skip to content
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

Scalable symbols - GAP and PATTERN #3752

Closed
mapserver-bot opened this issue Apr 4, 2012 · 3 comments
Closed

Scalable symbols - GAP and PATTERN #3752

mapserver-bot opened this issue Apr 4, 2012 · 3 comments
Assignees
Milestone

Comments

@mapserver-bot
Copy link

Reporter: havatv
Date: 2011/03/18 - 09:56
Trac URL: http://trac.osgeo.org/mapserver/ticket/3752
In order to enable scalable decorated lines,
LAYER-> CLASS-> STYLE-> PATTERN and LAYER-> CLASS-> STYLE-> GAP
must both be scalable (and their units compatible).
PATTERN seems to scale in 6.0.0beta1, while GAP does not seem
scale (gaps seem to be constant over scales).

For scalable symbols, it is important that the units of
LAYER-> CLASS-> STYLE-> PATTERN and LAYER-> CLASS-> STYLE-> GAP
are compatible with WIDTH/SIZE.

This means that when I specify "WIDTH 5", and "PATTERN 5 5"
(and LINECAP BUTT), I expect to see a line that is 5 units wide,
in dashes of 5 units with a spacing of 5 units. Currently, there
seems to be a scale difference between the PATTERN units and the
WIDTH units, but the scale seems to depend on the value of WIDTH...?
GAP has to use the same units as SIZE, WIDTH and PATTERN in order to allow scalable decorated patterned lines, for example:

---#--- ---#--- ---#--- ---#---

The numbers for SIZE, WIDTH, PATTERN and GAP must refer
to the same units.[[BR]]
When the map scale is SYMBOLSCALEDENOM,
SIZE should specify the final height of a symbol on the map (before rotation).
WIDTH should specify the final width of a line on the map.
GAP should specify the final gap between symbols on the map.
PATTERN should specify the final dash lengths and spacing
between dashes on the map.
The numbers could refer to pixels for images, or some length
unit for vector graphics (possibly with a scaling factor).

@mapserver-bot
Copy link
Author

Author: tbonfort
Date: 2011/03/18 - 19:14
fixed in 850a12c (r11252)

@mapserver-bot
Copy link
Author

Author: havatv
Date: 2011/03/20 - 00:27
Great!

GAP now works perfectly. SIZE and GAP use the same units, and things seem to scale.

However, PATTERN behaves a bit different than I thought was logical. To get a line that is 5 units wide, in dashes of 5 units with a spacing of 5 units, in 6beta2 I must specify:

WIDTH 5
LINECAP BUTT
PATTERN 1 1

PATTERN seems to use the WIDTH as units.

I would have thought that the following would be more intuitive:

WIDTH 5
LINECAP BUTT
PATTERN 5 5

I don't know if this is a bug or intended behaviour, so I have not reopened the ticket.
What do you think?

@mapserver-bot
Copy link
Author

Author: havatv
Date: 2011/05/11 - 11:19
For the record:
PATTERN has been fixed according to my suggestion, so the dash length and gaps no longer depends on the line width.

@ghost ghost assigned tbonfort Apr 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants