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
Artem May 1, 2007 at 11:22 p.m.
Sure. I'll let you know.
david.shu May 2, 2007 at 2:32 p.m.
Thanks very much. My email address is david.shu at 126.com. I'm looking forward to having it a try.
jp May 2, 2007 at 3:30 p.m.
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
Artem May 2, 2007 at 7:40 p.m.
Hi Jp,
Have a look in :
$(PYTHON)/lib/python2.5/site-packages/mapnik/paths.py
and also check paths in rundemo.py.
HTH
Artem May 2, 2007 at 7:49 p.m.
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/GettingStart...
Cheers,
jp May 3, 2007 at 1:11 p.m.
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()
NonGuru May 14, 2007 at 5:32 a.m.
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.
slepnev May 30, 2007 at 4:51 p.m.
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.
Denis August 16, 2007 at 5:09 a.m.
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?
guunjhm July 18, 2008 at 9:25 p.m.
hj0328 <a href="http://zjmunornyqwg.com/">zjmunornyqwg</a>, [url=http://rbpvrsszbjsd.com/]rbpvrsszbjsd[/url], [link=http://osfylpnjusfk.com/]osfylpnjusfk[/link], http://uvsscftbrojs.com/



david.shu April 29, 2007 at 7:21 a.m.
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.