Opened 15 years ago
Closed 15 years ago
#3050 closed enhancement (fixed)
MINDISTANCE not considering label size on lines
Reported by: | adube | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | mindistance |
Cc: | adube, dmorissette, sdlime |
Description
Distance between labels do not consider the label size. If you have a long label on a line with a MINDISTANCE of let's say 80, we don't have 80 pixels between labels. Instead, we have 80 pixels between the position of the labels.
Since the new REPEATDISTANCE do consider the label size, it should be the same thing with MINDISTANCE.
I'll come up with a sample data test that demonstrates the problem.
Attachments (2)
Change History (9)
by , 15 years ago
Attachment: | mindistance-problem.png added |
---|
comment:1 by , 15 years ago
Type: | defect → enhancement |
---|
comment:2 by , 15 years ago
Cc: | added; removed |
---|
Since the label size is calculated before the calls of msTestLabelCacheCollisions(), we could simply add it as a parameter to the msTestLabelCacheCollisions() function. Then, we verify that the distance between the 2 points is <= than the mindistance value + half the size of the label (ie. if the label position if CC). What do you think?
comment:3 by , 15 years ago
Cc: | added |
---|
Sounds like an acceptable fix. Adding Steve to CC to get his opinion.
comment:4 by , 15 years ago
Not perfect but better than what's there and a heckuva lot faster than checking the true distance between a cached label's polygon. Have you tried it?
Steve
comment:6 by , 15 years ago
Seems to work well, I've simply added the label_size to the mindistance value when checking the point to point distance. That way, I ensure that there is really the mindistance value between the two labels
MINDISTANCE 80, should be 80px between Dudley Ave, currently not