Ticket #3806 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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) (diff)

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

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

Change History

Changed 2 years ago by dmorissette

OGR label text anhor codes

  Changed 2 years ago by dmorissette

  • status changed from new to assigned
  • description modified (diff)

follow-up: ↓ 3   Changed 2 years ago by dmorissette

Tamas, do you agree with this fix?

in reply to: ↑ 2   Changed 2 years ago by tamas

Replying to dmorissette:

Tamas, do you agree with this fix?

Seems reasonable to me

  Changed 2 years ago by dmorissette

  • status changed from assigned to closed
  • resolution set to fixed

Thanks. Fixed in r11471.

Note: See TracTickets for help on using tickets.