transcode strings in filter expressions (default to utf8 input)
-- we can use map definition *.xml to define encoding
-- and in case of Python from
# -*- coding: utf-8 -*-
utf8 encoded filters are working now.
Add new find_point_placements to cover the gap left.
Change shield symbolizer to use find_point_placements.
Results are the same as before, but with much less duplicate code.
Slightly changes the result of max_char_angle_delta as now character angles aren't strict against the line angles.
Example screenshots on mailing list! :)
Spacing and no spacing line rendering are done by the same function.
Code is cleaner, performance should be equal or improved.
Text displacement is "Different", better in some cases and worse in others, I can revert it if wanted.
Old non spacing code is not yet removed as it is used by ShieldSymbolizer which I haven't investigated yet.
Individual character placement still has issues, that is my next task to fix!
1. The first allows the user to add a <FileSource
name="foo">/home/bar/baz/</FileSource> to the beginning of the file
and then in any of the symbolisers you can say:
<FooSymboliser base="foo" name="bridge">
It it will refer to the file /home/bar/baz/bridge.
2. The second allows you to create Datasource templates at the top
level, which can be used later in the actual layers like so:
<Map>
<Datasource name="db">
<Paramaeter name="host">/tmp</Parameter>
</Datasource>
<Layer name="lay">
<Datasource base="db">
<Parameter name="table">points</Parameter>
</Datasource>
</Layer>
</Map>
And the host parameter will be used in the layer.
3. The third adds the "base" parameter to the raster and shape input
plugins. All it does is specify a path to prefix to the filename prior
to using it. Together with the above feature it allows things like:
<Map>
<Datasource name="shapes">
<Paramaeter name="base">/home/foo/shapes</Parameter>
</Datasource>
<Layer name="lay">
<Datasource base="shapes">
<Parameter name="file">places</Parameter>
</Datasource>
</Layer>
</Map>
And it will use the shapefile /home/foo/shapes/places
Example:
>>> from mapnik import *
>>> im = Image(200,200)
>> save_to_file('test.png',im) # Guess image type from file extension
>> save_to_file('test.png,'jpeg',im) # Explicitly save as JPEG