Opened 13 years ago

Closed 13 years ago

#3806 closed defect (fixed)

OGR STYLEITEM AUTO error in position handling

Reported by: dmorissette Owned by: dmorissette
Priority: normal Milestone: 6.0 release
Component: OGR Support Version: unspecified
Severity: normal Keywords:
Cc: tamas, aboudreault

Description (last modified by dmorissette)

While looking at ticket #3784, I noticed that the implementation of label position in mapogr.cpp (SVN trunk / 6.0.0-beta4) seems to contain an error for label positions 10, 11 and 12.

Fortunately this was added only in 5.7-dev r10537, so there are no stable releases with this error.

Instead of

                case 10: c->label.position = MS_LR; break; /*approximate*/
                case 11: c->label.position = MS_LC; break;
                case 12: c->label.position = MS_LL; break;

we should have:

                case 10: c->label.position = MS_UR; break; /*approximate*/
                case 11: c->label.position = MS_UC; break;
                case 12: c->label.position = MS_UL; break;

(Keep in mind that OGR position codes define the position of the label anchor point relative to the label itself, and in MapServer the codes correspond to the position of the label relative to the geometry, so the meaning are reversed, i.e. LL in OGR means UR of point in MapServer)

Attachments (1)

style_textanchor.gif (7.2 KB ) - added by dmorissette 13 years ago.
OGR label text anhor codes

Download all attachments as: .zip

Change History (5)

by dmorissette, 13 years ago

Attachment: style_textanchor.gif added

OGR label text anhor codes

comment:1 by dmorissette, 13 years ago

Description: modified (diff)
Status: newassigned

comment:2 by dmorissette, 13 years ago

Tamas, do you agree with this fix?

in reply to:  2 comment:3 by tamas, 13 years ago

Replying to dmorissette:

Tamas, do you agree with this fix?

Seems reasonable to me

comment:4 by dmorissette, 13 years ago

Resolution: fixed
Status: assignedclosed

Thanks. Fixed in r11471.

Note: See TracTickets for help on using tickets.