-
Notifications
You must be signed in to change notification settings - Fork 826
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
Extend PointSymbolizer to support image scaling #155
Comments
[springmeyer] Also see Ticket #60 |
[tomh] Are you saying that the Agg renderer does scale symbols and the Cairo renderer doesn't? Is this a new feature in the Agg renderer? or something I missed when doing Cairo? |
[springmeyer] Whoops, I didn't mean to tag that as only component cairo. This enhancement, I assume, would affect both renderers. |
[ajturner] I've started digging into this - but haven't yet figured out in Agg where to do the scaling transformation. More generally it would be good to expose mechanisms similar to KML's styling support: scale, 'hotspot' location (where to center the image), color overlay. |
[springmeyer] Another relevant thread relating to extending the PointSymbolizer: |
[springmeyer] A few likely relevant sources:
|
[springmeyer] FYI: Recent vector label action here: http://trac.osgeo.org/mapserver/log/trunk/mapserver/mapagg.cpp |
[ajturner] I have this somewhat working in my local copy. I'll try and clean up into a patch and submit |
[semprebon] I've taken ajturner's changes and updated them for version 0.6.0. |
[springmeyer] Fantastic, One thing I noticed right off is that we'll also need property serialization added to source:trunk/src/save_map.cpp as well. Nice job adding it to source:trunk/src/load_map.cpp |
[springmeyer] Okay, so I've given the patch an initial review. Overall I'm not sure, after thinking more about the PointSymbolizer as it is currently used, that scaling support should be added to the PointSymbolizer. If the goal is scaling raster icons/graphics read from the filesystem then this is useful. However if the goal is proper proportional symbology (this is a feature I'd like to see and I'm assuming you are after, but correct me..) of graphics primitives (circles, rectangles, ellipses, etc) then it seems more logical to write this functionality into a new symbolizer that would accept arguments like: {{{ Perhaps the actual arguments should stick to the svg spec: http://www.w3.org/TR/SVG11/shapes.html ? Thoughts? |
[springmeyer] Okay, if a full blown symbolizer that supports constructing graphics primitives is not what you are after, the existing patch still needs some improvement. These things have been fixed in my revised patch:
I've tested the revised patch with this sample XML and symbol: It now renders original symbol correctly if the 'color' and 'scale' parameters are not used. And it works to scale the symbol up or down and apply a color to it. Problems:
|
[rcoup] This patch seems to have gone a little off-course. When Craig & I were looking at scaling in #320, the outcome was to:
Cairo helpfully supports internal scaling via it's matrix, agg needs to use the stuff in The Adding |
[springmeyer] rcoup - I fully agree. |
This ticket is an enhancement request to look into new design options around adding more flexibility to or extending the PointSymbolizer.
Currently the behavior of the
width
andheight
parameters seems both redundant (see Ticket #60) and non-intuitive. Settingwidth
andheight
to any dimensions other than the exact dimensions of the input graphic file crops the graphic rather than scaling the image (which would be my expected behavior).Ideally support for scaling vector graphics could be added to allow things to be done with the PointSymbolizer related to thematic display of point data, similar to this request:
http://www.mail-archive.com/dev@openstreetmap.org/msg04395.html
The text was updated successfully, but these errors were encountered: