Ticket #190 (closed enhancement: duplicate)

Opened 20 months ago

Last modified 16 months ago

Make symbolizers editable in memory (allowing application of scaling factors)

Reported by: springmeyer Owned by: springmeyer
Priority: critical (top) Milestone: 0.8.0
Component: Boost.Python Binding Version: SVN Trunk
Severity: Normal Keywords:
Cc: cmarqu Patch Needs Improvement: no
Needs Docmentation: no Has Patch?: no
Design Decision Needed: no

Description (last modified by springmeyer) (diff)

Symbolizers are currently not editable from python (once created and attached to the Map), and fully const inside of a boost variant container in C++.

We need a way to support variable output resolutions and a key part of supporting this is allowing a scale factor to be applied to all line widths, font sizes, symbol sizes, and dash-spacing for each relevant symbolizer.

This could either be done by allowing a scale factor to be applied to all in memory symbolizer object properties or by applying a scale factor to the symbolizer processor at rendering for both agg and cairo.

The latter approach was recently taken by Mapserver:

http://trac.osgeo.org/mapserver/changeset/8843

The former approach has it benefits since all modified symbolizers could then be serialized to xml and saved.

The latter approach may be more flexible and avoids hardcoding scaled sized inside the xml.

Change History

Changed 20 months ago by springmeyer

  • summary changed from Make symbolizers available/editable via a layer object in python bindings to Make symbolizers available/editable via a Style object in python bindings

Fixed title.

Changed 19 months ago by springmeyer

conversion on #mapnik about this ticket: http://mapnik.dbsgeo.com/days/2009-01-26

Changed 19 months ago by springmeyer

The idea behind this ticket is to be able to globally tweak relevant sizes of symbolizers, such as fonts, line width, symbols, etc.

A discussion today on the mapserver list about this is being termed 'magnification': http://lists.osgeo.org/pipermail/mapserver-dev/2009-February/008266.html

Perhaps a c++ function to internally magnify all object properties would be even more useful than python access to them to do it from the bindings.

Changed 19 months ago by cmarqu

  • cc cmarqu added

Changed 19 months ago by springmeyer

23:12:54 <artem> it might be a good idea to consider implementing all symbolizers as 'property maps' 23:13:18 <artem> name=value containers or something similar 23:15:05 <artem> keep internal impl as it is but provide user-friendly way to set/get properties .. needs some thinking

Changed 17 months ago by springmeyer

  • priority changed from normal to critical (top)
  • milestone changed from 1.0.0 to 0.7.0

Changed 17 months ago by springmeyer

  • summary changed from Make symbolizers available/editable via a Style object in python bindings to Make symbolizers editable in memory (allowing application of scaling factors)

renaming this ticket so it serves as umbrella for edibility of symbolizers (esp from python).

Changed 17 months ago by springmeyer

  • description modified (diff)

Changed 17 months ago by springmeyer

Noting here that mapserver ended up going with a scale_factor applied at rendering time in agg and gd renderers:

http://trac.osgeo.org/mapserver/changeset/8843

Changed 16 months ago by springmeyer

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

closing as duplicate since there are at least two ideas going on here that we'll now cover in other tickets..

1) allowing symbolizers to be created from python with a set of **kwargs: see now #319

2) Allowing for a way to scale font sizes, symbol sizes, and line widths for variable resolution output: see now #342

Note: See TracTickets for help on using tickets.