Opened 15 years ago
Closed 15 years ago
#3030 closed defect (fixed)
Labeling enhancements: ability to repeat labels along a line/multiline
Reported by: | dmorissette | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 6.0 release |
Component: | Documentation - MapServer | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | jmckenna |
Description
We're looking at making a couple of enhancements to the labelling algorithm to add more labels along long line or multiline shapes, and before I go ahead and write a RFC I would like to discuss this here and see if anyone has thoughts on this.
1- Label all the lines in a MultiLine shape:
At the moment, if you've got a MultiLine shape (i.e. a shapeObj with numlines > 1) then only the longest of the Lines is labelled. This is fine in most cases, but in some cases, we may want each individual Line in the MultiLine to get a label. That's the first enhancement that I would like to propose: make it possible to label all lines in a MultiLine shape.
2- Ability to repeat labels along a line with ANGLE FOLLOW
At the moment, with ANGLE FOLLOW, a label is placed at the center of the line. In the case of very long lines (roads), and especially when using metatiles to render a tile cache, we may want to repeat the label at some interval along the line. That's the second enhancement: make it possible to repeat the label at a given interval along a line when using ANGLE FOLLOW.
A possible way to control this in the mapfile could be to add a LABEL.REPEATDISTANCE parameter. By default this would be turned off and we would keep the current behavior. If REPEATDISTANCE is set to any value > 0 then the labels would be repeated on every line of a multiline shape (item 1 above), and would be repeated multiple times along a given line at an interval of REPEATDISTANCE pixels (item 2 above). In all cases the MINDISTANCE value would still be handled by the label cache so that multiple labels ending up too close to each other for various reasons would be eliminated by the label cache.
Since a picture is worth a thousand words, I will attach a picture showing what we currently get with a multiline and what we would like to get using the new REPEATDISTANCE keyword.
Any thoughts on this before I write a RFC?
Suggestions of a better name for the REPEATDISTANCE keyword?
Should we consider having separate keywords to control item 1 (label each line in a multiline) and item 2 (repeat labels along a line)?
Attachments (4)
Change History (8)
by , 15 years ago
Attachment: | repeat_label.gif added |
---|
by , 15 years ago
Attachment: | label-comparison.jpg added |
---|
by , 15 years ago
Attachment: | shield-comparison.jpg added |
---|
comment:1 by , 15 years ago
I've attached two images for label comparison and shield comparison of the current and new behavior.
comment:2 by , 15 years ago
Cc: | added |
---|---|
Component: | MapServer C Library → MapServer Documentation |
Enhancements committed in r9194
comment:3 by , 15 years ago
See also RFC-57 for all the details: http://mapserver.org/development/rfc/ms-rfc-57.html
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Documentation updated in r9197.
repeat_label.gif - Picture showing current and new behavior