Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3151 closed defect (fixed)

Curved labels with MINFEATURESIZE auto doesn't work

Reported by: aboudreault Owned by: aboudreault
Priority: normal Milestone: 5.6 release
Component: MapServer C Library Version: svn-trunk (development)
Severity: normal Keywords: curved label, minfeaturesize
Cc: jmckenna

Description

Jeff McKenna has reported that bug on the mailing. If minfeaturesize auto is set with curved labels (ANGLE FOLLOW), no curved labels are drawn.

Change History (11)

comment:1 by aboudreault, 14 years ago

Resolution: fixed
Status: newclosed

Fixed and committed in r9379.

comment:2 by aboudreault, 14 years ago

FYI, the problem was that when adding a label path in the label cache object, the feature size "0.0" was used (that value is used in the msDrawLabelCache() function). The function msPolylineLabelPath() already check if the feature can be drawn depending of the minfeaturesize value before calculating the label path. Basically, the function msDrawLabelCache shouldn't recheck that value if the label is a labelPath. Now, I changed the value "0.0" for "-1" when a labelPath is added in the label cache object, and disabled the check in msDrawLabelCache() for that case.

comment:3 by sdlime, 14 years ago

Confused. Does this mean MINFEATURESIZE still doesn't work but now at least doesn't break anything? What about populating the feature size correctly? We must have the length of the path being labeled available in msPolylineLabelPath().

Steve

comment:4 by sdlime, 14 years ago

Oh, should we back port this to 5.4? (I'd say yes...)

comment:5 by aboudreault, 14 years ago

The minfeaturesize works perfectly now. Populating the feature size of the paths wouldn't be useful because at the moment, the minfeaturesize is already tested before the label path algorithm (which is OK... else we would have to calculate ALL label paths then.. verify the featuresize and eliminate all that doesn't match: overhead?). If the labelpath x is returned by the msPolylineLabelPath() function, that means the label can be drawn on the line and that it passed the minfeaturesize test.

All right, will back port this in 5.4.

comment:6 by sdlime, 14 years ago

Ah, I get it, thanks for the clarification and the fix.

Steve

comment:7 by aboudreault, 14 years ago

Backported branch-5.4 in r9380.

comment:8 by jmckenna, 14 years ago

Cc: jmckenna added

comment:10 by aboudreault, 14 years ago

Are you sure that link have minfeaturesize auto ?

Note: See TracTickets for help on using tickets.