Opened 19 years ago

Closed 13 years ago

#1452 closed defect (fixed)

[Symbol] SIZE does not affect symbol STYLE

Reported by: jlacroix Owned by: aboudreault
Priority: high Milestone: 6.0 release
Component: MapServer C Library Version: 4.8
Severity: normal Keywords:
Cc: sdlime, dmorissette, assefa, tbonfort

Description (last modified by dmorissette)

We can specify a STYLE in a symbol definition. This is used to draw praw pattern in lines (dashed lines). However, the STYLE does not scale depending on the size of the symbol. This cause the symbol's style to be un-useable when changing the symbol size.

Image this symbol definition:

SYMBOL
  NAME "test"
  TYPE Ellipse
  STYLE 1 5 END
  FILLED TRUE
  POINTS
  1 1
  END
END

With a size of 5 in the STYLE object this would render very nicely. But with a size of 10 or more the circle will overlap on each other. I'll attach an example.

Steve, I don't think this is hard to change. Instead of putting the one pixel of space between each symbol draw, we can put [SIZE] number of pixels.

We can either change the default behavior (I don't think this funcitonality is used to much) or use negative numbers. Or we can add a param in the symbols, but usually I think you try to prevent to add new parameters in the MapFile/Symbols definition :) .

What do you think? If you give me your opinion I can take care of this.

Julien

PS: Should I do a RFC for this?

Attachments (1)

symbol_style.png (1.2 KB ) - added by jlacroix 19 years ago.
symbol_style.png - Patterned lines, 2 different size

Download all attachments as: .zip

Change History (8)

by jlacroix, 19 years ago

Attachment: symbol_style.png added

symbol_style.png - Patterned lines, 2 different size

comment:1 by sdlime, 19 years ago

You mean pattern size times symbol size correct? In the example below you'd put 
down a marker then skip 45 pixels (9x5) put down another one and so on. That'd 
work I think and would take care general scaling of patterns.

However, there is a downside to this modification. The current behaviour can be 
viewed as a feature. Perhaps someone wants overlapping circles or diamonds to 
achieve a particular effect. Perhaps that's not worth worrying about.

I'd actually like to move SYMBOL STYLES into CLASS STYLES as a parameter called 
PATTERN. That way a symbol would contain a primitive definition (a circle or 
diamond) and the CLASS STYLE would contain everything pertinent to it's being 
drawn.

Steve

comment:2 by dmorissette, 15 years ago

Cc: sdlime dmorissette assefa added
Description: modified (diff)
Milestone: 5.4 release
Owner: changed from mapserverbugs to aboudreault

This issue is coming up again as we start thinking about generating high-resolution maps for printing. The eventual map resolution RFC should take this ticket into account and propose to fix it.

comment:3 by dmorissette, 15 years ago

Description: modified (diff)

comment:4 by fwarnock, 15 years ago

Just wanted to provide my experience with this feature also.

Point symbols in the symbol file will scale when applied to a map based on the size provided in the map file. I expected that dashed line symbols would behave the same way. Currently only the thickness of the dashed line changes, which means that a line symbol would have to be designed specifically for the size of the line in the mapfile.

There are also two different behaviors:

  1. If the map is rendered in GD, the lines will have a round cap that overlaps the gap. Increasing the size of the line in the mapfile will eventually render a solid line.
  1. If the map is rendered in AGG the lines have a butt cap that will not overlap the gap. Increasing the size of the line in the mapfile will leave the gaps, but it starts looking more like a barcode than a dashed line.

comment:5 by tbonfort, 15 years ago

Cc: tbonfort added

I'd be inclined to push this to 6.0 as the modification would only happen before entering the specific renderers, as opposed to having to modify all the renderers in the 24h gap we have until the 5.4 feature-freeze.

comment:6 by dmorissette, 15 years ago

Milestone: 5.4 release6.0 release

Sure. Moving to 6.0.

comment:7 by tbonfort, 13 years ago

Resolution: fixed
Status: newclosed

style PATTERN (renamed from SYMBOL->STYLE some time ago) is scaled according to the supplied scalefactor in 6.0, closing

Note: See TracTickets for help on using tickets.