Thanks for the reply, Artem. Here's what happened when I ran the
commands you recommended in the regular Python interactive
interpreter:
>>> from mapnik import *
>>>
>>> p = Projection("+init=epsg:3309")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() should return None, not 'NoneType'
>>> p.forward(Coord(-1.25,51.75))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'p' is not defined
>>> m = Map(600,300,"+proj=latlong +datum=WGS84")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() should return None, not 'NoneType'
Also, I'm not sure if it makes any difference, but I installed boost
and all the other dependencies with MacPorts. Also, here's my gcc
version info:
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
--program-prefix= --host=i686-apple-darwin8
--target=i686-apple-darwin8
Thread model: posix
-Ken-ichi
On Fri, Feb 29, 2008 at 1:29 AM, Artem Pavlenko <[EMAIL PROTECTED]> wrote:
>
>
> > Hi all,
> >
> > Just wanted to poke around with Mapnik 0.5 a bit, but I'm having
> > problems getting it set up under Max OS 10.4.11, Python 2.5.1, and
> > Boost 1.34.
>
> I'm using the same setup.
>
>
> > I run scons.py to build and again to install and
> > everything seems to run fine, all the files seem to end up in the
> > right places, but here's what happens when I try the Projection
> > examples in the installation instructions in iPython (replacing the
> > EPSG code with something I actually had in my share/proj/epsg file):
> >
> > In [1]: from mapnik import Projection
> >
> > In [2]: p = Projection(['init=epsg:3309'])
>
>
> The above has been deprecated.
> > ----------------------------------------------------------------------
>
> > -----
> > <class 'Boost.Python.ArgumentError'> Traceback (most recent
> > call last)
> >
> > /Users/kueda/<ipython console> in <module>()
> >
> > <class 'Boost.Python.ArgumentError'>: Python argument types in
> > Projection.__init__(Projection, list)
> > did not match C++ signature:
> > __init__(_object*)
> > __init__(_object*, std::string)
> >
>
>
>
>
> >
> >
> > So that looked like it was expecting a string and not a list, so I
> > tried this:
> >
> > In [3]: p = Projection('init=epsg:3309')
> > ----------------------------------------------------------------------
> > -----
> > <type 'exceptions.RuntimeError'> Traceback (most recent
> > call last)
> >
> > /opt/local/src/mapnik-trunk/tests/<ipython console> in <module>()
> >
> > <type 'exceptions.RuntimeError'>: failed to initialize projection
> > with:init=epsg:3309
> >
> >
>
>
> Ok, try :
>
> from mapnik import *
>
> p = Projection("+init=epsg:3309")
> p.forward(Coord(-1.25,51.75))
>
> projections strings are in proj4_init_plus format.
>
>
> >
> > Any idea what's going on here? I also had trouble with the
> > GettingStarted tutorial:
> >
> > In [5]: from mapnik import *
> >
> > In [6]: m = Map(600,300,"+proj=latlong +datum=WGS84")
> > ----------------------------------------------------------------------
> > -----
> > <type 'exceptions.TypeError'> Traceback (most recent
> > call last)
> >
> > /Users/kueda/<ipython console> in <module>()
> >
> > <type 'exceptions.TypeError'>: __init__() should return None, not
> > 'NoneType'
>
> The above works for me. Could you try running the same not from
> iPython console ?
>
> Artem
>
> >
> >
> >
> > Any help would be appreciated, and apologies in advance if I'm asking
> > a question that's already been answered a billion times (I sifted
> > through the list archives and didn't see anything).
> >
> >
> > -Ken-ichi
> > _______________________________________________
> > 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