Ticket #89 (closed defect: fixed)

Opened 7 months ago

Last modified 2 months ago

empty text labels get rendered as zero (0)

Reported by: jburgess777 Owned by: artem
Priority: critical (top) Milestone:
Component: Core Library Version:
Severity: Normal Keywords:
Cc: Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: yes
Design Decision Needed: no

Description

When running the SVN mapnik tree I get lots of 0 for text labels. This occurs of a road has no label. This started happening since r657 removed NUL columns from the postgis result set.

The problem occurs because the text symbolizer accesses 'feature[sym.get_name()]' which will return a value(0) if the name does not exist in the feature properties.

I have a tentative fix which I'll attach.

Attachments

mapnik-text-0-nulls.patch (16.8 kB) - added by jburgess777 7 months ago.
The patch looks massive but is mostly white space changes (do 'svn diff -x -w' on the result to see something more reasonable)
10867.png (5.4 kB) - added by jburgess777 7 months ago.
example tile shoiwing 0's

Change History

Changed 7 months ago by jburgess777

The patch looks massive but is mostly white space changes (do 'svn diff -x -w' on the result to see something more reasonable)

Changed 7 months ago by jburgess777

example tile shoiwing 0's

Changed 7 months ago by tomh

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

Patch committed as r692.

Changed 7 months ago by tomh

Talking with Jon on IRC we think a better solution may be an explicit null type in the boost::variant used by mapnik::value...

Changed 7 months ago by tomh

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 7 months ago by tomh

Original fix reverted and new improved fix committed as r693. This fixes both the problem described here and the problem with over matching by rules which do not equals comparisons on attributes which do not exist.

Changed 7 months ago by tomh

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

Changed 2 months ago by springmeyer

  • priority set to critical (top)
  • has_patch set
  • patch_need_improvement unset
  • need_documentation unset
  • design_decision_needed unset
Note: See TracTickets for help on using tickets.