Windows binaries (Release Candidate 0)
Hello, Windows users! Thank you for your patience.
Following 2.0 release, we have been working hard to port more features, support more compilers, and ultimately to make the whole process of building and using Mapnik on Windows more fun.
So, here are the latest Windows 32-bit binaries (RC0) . They are built with Visual C++ 2008 Express and require vc90 runtime. The provided python bindings support for now just support Python version 2.7 32 bit (not 64 bit) which can be downloaded from here.
Cairo backend support
This feature has been around for a while in Mapnik but was missing from Windows binaries. Now it’s possible to generate PDF, PS and SVG on Windows, too.
Microsoft SQL Server
Currently through the Mapnik OGR plug-in it’s possible to load spatial data from MSSQL.
(Tested with Microsoft SQL Server 2012 RC0)
Layer options might look like:
mapnik.Ogr(string='MSSQL:server=VISTA\SQLEXPRESS;database=osm;trusted_connection=yes',layer='roads',encoding="latin1")
Give it a try and give us feedback!
PS. There is more “Windows” news on the way, so stay tuned.
Setup
Simply unzip the archive into: c:/mapnik-2.0.1rc0 and set your %PATH% to point to c:/mapnik-2.0.1rc0:
set PATH=%PATH%;c:\mapnik-2.0.1rc0\lib
Then you should be able to run the demo program:
cd c:\mapnik-2.0.1rc0\demo\c++ rundemo ..\..\lib\mapnik
If you want to use the python bindings then enable them like:
set PYTHONPATH=%PYTHONPATH%;c:\mapnik-2.0.1rc0\python\2.7\site-packages;
And make sure Python27 is on your path:
set PATH=%PATH%;c:\Python27
Then you should be able to run the python demo:
cd c:\mapnik-2.0.1rc0\demo\python python rundemo.py
Release 2.0
The Mapnik team is pleased to announce that Mapnik 2.0 is finally here! We've jumped from 0.7 to 2.0, not because we got confused with our numbers, but to reflect that this release represents a big step forward for the project. We believe Mapnik 2.0 will provide a much more flexible and expressive platform for creating beautiful maps. For full details see:
Thanks to all contributors and also a supersize thank-you as always to Dane Springmeyer for managing and inspiring this release. This is a recommended upgrade for all Mapnik users.
NOTE: This release is going out without Windows binaries just yet, as a source distribution only. We're planning to follow up with Windows and Mac OS X binaries asap.
Raster Reprojection lands in trunk
Alberto Valverde has recently been hard at work getting initial support in trunk (to be part of Mapnik 2.x) for on the fly reprojection of rasters.
Thanks to Alberto for all his hard work on this and for his company Meteogrid for supporting his contributions to open source
Carto parser wrapup
Similar to Herm I wanted to update the community on the status of my work this summer on the native carto parser. There has been a lot of progress since the midterm update and we are now very close to being completely compatible with the current javascript carto parser.
Recent work has focused on implementing the dynamic features of carto, namely variable and expression handling. A simple example demonstrating this processing is included in the gist below:
With these features implemented we are able to work with complex styles like the open_street_dc map from the tilemill project. While more debugging is necessary the parser is able to produce valid output which can be rendered:
carto C++:
carto javascript:

Hopefully we will be able to resolve the remaining issues in the near future with the goal of merge both the parser and generator into trunk to be part of Mapnik 2.1.
Text formating
Now that Google Summer of Code is over I'd like to show you some of theresults:
I already posted information about the
Improving text formating was the second half of my project.
Currently when you want to label a peak like this
Elevation

This usually works, but it has some limitations. For example let's see what happens when the name gets a little longer:

Mapnik breaks the long name and the elevation disappears, because the offset is not correct.
Now let's have a look at how it is done with the new placement system:You only define one TextSymbolizer but with a different syntax:(Note: is the XML encoding of a newline character)

As you can see Mapnik automatically takes care of correct line spacing, no need to calculate offsets manually.
Backwards incompatible changes
To make this work some backwards incompatibilities had to be introduced.
- Line spacing is no longer defined by the largest character in a certain text, but by the line spacing value defined in the font file. This should result in a nice line spacing by default, but if you have defined additional line spacing in your style you have to remove it or at least reduce it to get the same effect as before.
- The text rendered by a TextSymbolizer is no longer given in the
name attribute, but as a text node.<TextSymbolizer name="[abc]" />
becomes<TextSymbolizer>[abc]</TextSymbolizer>
Parameters you can change
You can change the following text attributes with the
- face-name
- size
- character-spacing
- line-spacing
- opacity
- wrap-character
- text-transform
- fill
- halo-fill
- halo-radius
But you are not limited to using a fixed format. You can implement your own class in C++ to do the formating. It's very simple:In the same way you can do custom text formating:
Next steps
The code is ready, now it's required to test it on larger styles to find any remaining bugs. Python bindings also have to be updated to fully support the new features. When this is done the code will be released as Mapnik 2.1 as it's to late in the release cycle to include it in Mapnik 2.0.

