Opened 12 years ago

Closed 12 years ago

#4146 closed defect (fixed)

Geomtransform Labelpoly fails with symbol and NULL data values

Reported by: jmckenna Owned by: sdlime
Priority: normal Milestone: 6.2 release
Component: MapServer C Library Version: svn-trunk (development)
Severity: normal Keywords:
Cc: orkniwa, tbonfort

Description

  • originally reported by Niwa-san from Orkney: http://lists.osgeo.org/pipermail/mapserver-users/2011-December/071137.html
  • small test package, contains 'label_error.map' with one layer, that points to a small point shapefile that has some NULL values in the labelitem field: http://labs.gatewaygeomatics.com/dl/geomtransform-labelpoly.zip
  • example command with test package:
      shp2img -m label_error.map -o test.png -map_debug 3
    
  • if the LABEL object has a GEOMTRANSFORM LABELPOLY parameter, and the CLASS has a symbol, and the shapefile has NULL values: MapServer on Windows crashes (however Niwa-san must have tested on Linux, as the test package contains a 'label_error.png' file)
  • Niwa-san has provided a patch for MapServer SVN/trunk (in package, and I will attach here)
  • I have tested the patch, and after applying it I get a correct map image, on Windows

Attachments (1)

annotation_symbol_w_label.patch (1.1 KB ) - added by jmckenna 12 years ago.
patch for MapServer trunk (r12977)

Download all attachments as: .zip

Change History (11)

comment:1 by sdlime, 12 years ago

Status: newassigned

comment:2 by sdlime, 12 years ago

Hey Jeff: Can you create a ticket and post Orkney's fix for the legend label offset bug too? Steve

by jmckenna, 12 years ago

patch for MapServer trunk (r12977)

comment:3 by jmckenna, 12 years ago

Steve: yes doing that now, just had to finish this ticket report first :)

comment:4 by orkniwa, 12 years ago

Cc: orkniwa added

comment:5 by sdlime, 12 years ago

I wonder if this still applies. Any label-related code has been gutted in trunk. Guess I need to unpack the test case unless someone has it handy along with trunk...

Steve

comment:6 by sdlime, 12 years ago

Actually I know NULL labels are skipped now (they weren't necessarily in 6.0). Jeff, can you test in Windows? (I can't...)

Steve

in reply to:  6 ; comment:7 by orkniwa, 12 years ago

Replying to sdlime:

Actually I know NULL labels are skipped now (they weren't necessarily in 6.0).

Yes I know, only label "TEXT" is skipped if label is null or lable length is 0. But if label has style using GEOMTRANSFORM Labelpoly or Labelpoint , MapServer 6.0 is drawing Labelpoly or Labeloint in case of label is null. In this case MapServer cannot caluclate label polygon correctly, then crash or draw incorrect label polygon. I made a very simple patch, it skips drawing Labelpoly and Labelpoint if label is null or label length is 0.

makoto

in reply to:  7 ; comment:8 by tbonfort, 12 years ago

Cc: tbonfort added

Replying to orkniwa:

Replying to sdlime:

Actually I know NULL labels are skipped now (they weren't necessarily in 6.0).

Yes I know, only label "TEXT" is skipped if label is null or lable length is 0. But if label has style using GEOMTRANSFORM Labelpoly or Labelpoint , MapServer 6.0 is drawing Labelpoly or Labeloint in case of label is null. In this case MapServer cannot caluclate label polygon correctly, then crash or draw incorrect label polygon. I made a very simple patch, it skips drawing Labelpoly and Labelpoint if label is null or label length is 0.

makoto

Have you tried this with the trunk code, or is this the behavior that was used up until recently. As Steve said, the labelling code has been vastly changed in the last couple of months, and behavior related to labelpoly geomtransforms and null or empty labels has been impacted.

Please confirm that this issue is still valid with the current trunk.

in reply to:  8 comment:9 by orkniwa, 12 years ago

Replying to tbonfort:

Please confirm that this issue is still valid with the current trunk.

I tried revision 13307. That is all good!!. There is no problem. Thank you.

makoto.

comment:10 by tbonfort, 12 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.