Mapnik win32 binaries

Yesterday, I built and packaged win32 binaries for Mapnik. All libraries including dependencies are built with VC++ Express on Vista.

There is no installer (yet) so you have to setup %PATH% etc yourself. In 'bin' directory (e.g c:\\mapnik\\bin ) there is a small demo application 'rundemo.exe' which produces two map images from demo data. You can run it like this:

rundemo.exe c:\mapnik\lib\mapnik\input 

Everyone (with Windows box) is encouraged to give it a try and report any problems, gotchas ... If everything is OK then win32 binaries will be available as a part of Mapnik release, starting from 0.4.1.

Cheers,
Artem

Posted by Artem on April 27, 2007

Comments

2007-04-29 07:21:05 - david.shu

great job! I tried to compiler mapnik with vc7 under windows xp about one year ago and I got a python module successfully.however,the module couldn't be used as the example says.I guess something must be wrong during my building process.so I gived up. I tried your win32 binaries for mapnik. I found it should work with python 2.5. my python version is 2.4. there are some python modules only for 2.4. can you build win32 binaries for mapnik for python 2.4? thanks.

2007-05-01 23:22:09 - Artem

Sure. I'll let you know.

2007-05-02 14:32:16 - david.shu

Thanks very much. My email address is david.shu at 126.com. I'm looking forward to having it a try.

2007-05-02 15:30:31 - jp

rundemo.exe works no problem, but I can't get it to draw a shapefile from the command line. The background draws, it creates the png, but no boundaries, and no error message. I noticed this when trying to load a shapefile: >>> from mapnik import * >>> lyr = Layer('world') >>> lyr.datasource = Shapefile(file='C:\mapnik\data\boundaries.shp') >>> lyr.styles.append('My Style') >>> print lyr.envelope() Envelope(-1.0,-1.0,0.0,0.0) I'm using XP and Python 2.5.1

2007-05-02 19:40:52 - Artem

Hi Jp, Have a look in : $(PYTHON)/lib/python2.5/site-packages/mapnik/paths.py and also check paths in rundemo.py. HTH

2007-05-02 19:49:54 - Artem

Opps, I didn't look carefully at your script. You need to create style called 'MyStyle', see rundemo.py for ideas. If you remove .shp you should be able to print extent of your shapefile : lyr.datasource = Shapefile(file='C:\mapnik\data\boundaries') PS. There is a very basic tutorial at http://trac.mapnik.org/wiki/GettingStarted Cheers,

2007-05-03 13:11:55 - jp

thanks, one problem was the path: in $(PYTHON)/lib/python2.5/site-packages/mapnik/paths.py, I changed to: mapniklibpath = 'c:/mapnik/lib/mapnik' also, I needed to copy msvcr80.dll, msvcm80.dll, and msvcp80.dll from C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT to C:\mapnik\lib\mapnik. last, I needed to use \\ in the path to the shapefile. this example works. from mapnik import * lyr = Layer('world') lyr.datasource = Shapefile(file='C:\\mapnik\\data\\boundaries') print lyr.envelope()

2007-05-14 05:32:42 - NonGuru

Hi. Great application! Why do the demos say "powered by Google" - is mapnik just using GMap for "display"? Would be nice to have a clearer longer explanation on the "demos" page of this and a "pure mapnik" example as well.

2007-05-30 16:51:22 - slepnev

W00t! But I couldn't get Cyrillic labels to work. They're in Windows-1251 in the dbf. I set the encoding parameter in the Shapefile constructor to 'cp1251' and it still doesn't work. Numerical fields rasterize OK.

2007-08-16 05:09:48 - Denis

Please, make win32 binaries with support of encoding in DataSource. Iconv is commented in sources. Any other way to use shapes with attribute encoding other then UTF-8?

Post a comment

Comments are closed...