Hi Jae,
Hello all, I'm running into some trouble using mapnik in a Linux
Ubuntu setting. I've got it successfully installed (i think). The
issues are:
1. from mapnik import Projection - does not print the following
lines for me :
registered datasource : raster
registered datasource : shape
registered datasource : postgis
2. Project(['init=epsg:42304']) does not work for me:
>>> from mapnik import *
>>> p = Projection(['init=epsg:42304'])
The above is deprecated syntax.
Please, try :
>>> from mapnik import *
>>> p = Projection("+init=epsg:42304") # to init projection you need
to pass prj_init_plus format string, consult proj4 for more information
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
Projection.__init__(Projection, list)
did not match C++ signature:
__init__(_object*)
__init__(_object*, std::string)
3. The current tutorial 1 (http://trac.mapnik.org/wiki/
GettingStarted) fails for me with the message:
Traceback (most recent call last):
File "test.py", line 32, in <module>
lyr.datasource = Shapefile()
Yep, the above will throw
File "/usr/lib/python2.5/site-packages/mapnik/__init__.py", line
72, in Shapefile
return CreateDatasource(keywords)
RuntimeError: failed opening file: Bad file descriptor
This happens even if I modify the line "Shapefile(file="....")" to
just "Shapefile()". I tried many possible values for the parameter
"file" (relative, absolute, etc) for the zipfile and the contents of
the zipfile from here: http://www.census.gov/geo/www/cob/vt2000.html#shp
It should work if you pass full path to shapefile without extension i.e
shp = Shapefile(file="/path/to/shapefile") #!! No .shp !!
Let me know if it doesn't.
Thanks, and let me know if anything is unclear.
- Jae
Also, I noticed that the installation instructions for Mapnick is
wrong. It doesn't state libboost_iostream development headers as a
prerequisite.
Also, it would be nice to state what minimum version of g++ is
required for installation. I had version < 3.0 and the scons job was
failing without a good explanation.
I agree we need to update some docs and make scons more verbose,
friendly.
As with any FOSS projects any help is highly appreciated.
Cheers
Artem
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users