Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3752 closed defect (fixed)

Scalable symbols - GAP and PATTERN

Reported by: havatv Owned by: tbonfort
Priority: normal Milestone: 6.0 release
Component: AGG Version: 6.0
Severity: major Keywords: style, symbol, line, gap, pattern, size, width, units
Cc: havatv

Description

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.
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).

Change History (5)

comment:1 by havatv, 11 years ago

Summary: Scalable symbols - GAPScalable symbols - GAP and PATTERN

comment:2 by havatv, 11 years ago

Keywords: style symbol line gap pattern size width units added

comment:3 by tbonfort, 11 years ago

Resolution: fixed
Status: newclosed

fixed in r11252

comment:4 by havatv, 11 years ago

Cc: havatv added

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?

in reply to:  4 comment:5 by havatv, 11 years ago

For the record: PATTERN has been fixed according to my suggestion, so the dash length and gaps no longer depends on the line width.

Note: See TracTickets for help on using tickets.