Dear users, I try at windows 7 to get an svg-image with nik2img.
Well, I`m not so fit in python, I`m not sure if the steps I did are correct.
Mapnik runs well at the system (Windows 7), I get for example a png-file at
the base of my osm-data.
I downloaded now nik2img and put the code at
D:/nik2img-svn
There I did: setup.py install
and I get:
setup.py install
running install
running build
running build_py
running build_scripts
running install_lib
running install_scripts
running install_egg_info
Removing C:\Python26\Lib\site-packages\nik2img-0.7.0-py2.6.egg-info
Writing C:\Python26\Lib\site-packages\nik2img-0.7.0-py2.6.egg-info
I can render png-files with nik2img, but if I run python tests/run_tests.py
I get:
======================================================================
FAIL: Doctest: using_nik2img.txt
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python26\lib\doctest.py", line 2163, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for using_nik2img.txt
File "tests\using_nik2img.txt", line 0
----------------------------------------------------------------------
File "tests\using_nik2img.txt", line 77, in using_nik2img.txt
Failed example:
c.open()
Exception raised:
Traceback (most recent call last):
File "C:\Python26\lib\doctest.py", line 1253, in __run
compileflags, 1) in test.globs
File "<doctest using_nik2img.txt[35]>", line 1, in <module>
c.open()
File "C:\Python26\lib\site-packages\mapnik_utils\composer.py", line 218,
n open
self.render()
File "C:\Python26\lib\site-packages\mapnik_utils\composer.py", line 208,
n render
renderer.render_file()
File "C:\Python26\lib\site-packages\mapnik_utils\renderer.py", line 240,
n render_file
self.local_render_wrapper(self.m, self.image, self.format)
File "C:\Python26\lib\site-packages\mapnik_utils\renderer.py", line 124,
n local_render_wrapper
self.render_to_file(*args)
File "C:\Python26\lib\site-packages\mapnik_utils\renderer.py", line 192,
n render_to_file
mapnik.render_to_file(*args)
RuntimeError: Cairo backend not available, cannot write to format: pdf
----------------------------------------------------------------------
The error: RuntimeError: Cairo backend not available, cannot write to
format: svg
If I try
"nik2img.py C:/mapnik_0_7_1/beispiel2/osm.xml -fsvg
-b 7.992 52.307 8.014 52.317 -d 2000 2000 image.svg && rsvg -d150 -p150 image.sv
g C:/mapnik_0_7_1/beispiel2/osna.png" I get:
RuntimeError: Cairo backend not available, cannot write to
format: svg
I installed pygtk-all-in-one-2.22.5.win32-py2.6.msi
and I also copied libcairo-2.dll,libcairo-script-interpreter-2.dll and
libcairo-gobject-2.dll in C:......system32/ and restarted the system.
Can anybody give me a hint please?
I presume I´m doing s.th. wrong maybe in installing nik2img?
Thank you very much, Kai
--
Dipl.-Geogr. Dipl.-Umweltwiss. Kai Behncke
Geschäftsführer Gesellschaft für Geoinformatik (GfGI)
Institut für Geoinformatik und Fernerkundung (IGF)
Barbarastr. 22b
49076 Osnabrück
Tel.: +49 541 969-3922
**********
Geoinformatik 2011 (15.-17. Juni in Münster): http://www.geoinformatik2011.de
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users