Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
artemp opened this issue Oct 11, 2011 · 7 comments
Closed

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

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.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] Fixed title.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

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

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[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.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

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

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

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

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[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

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] 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 Symbolizers via python accepting **kwargs in constructor #319

  2. Allowing for a way to scale font sizes, symbol sizes, and line widths for variable resolution output: see now Allow memory-mapping of shapefiles to be optional param for shape.input #342

@artemp artemp closed this as completed Oct 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant