[geos-devel] python.i doesn't exist... why?
Pablo Souza Grigoletti
pablogrigoletti at yahoo.com.br
Tue Jun 6 00:43:24 EDT 2006
Hi Charlie,
I did what you said:
- mv geos_wrap.cxx geos_wrap.cxx.old
- I created python.i with the code that you gave me.
- swig -c++ -python -modern -o geos_wrap.cxx ../geos.i
../../source/headers/geos/geom.h:671: Warning(509): Overloaded
geos::CoordinateS equence::hasRepeatedPoints(geos::CoordinateSequence
const *) is shadowed by hasR epeatedPoints() const at
../../source/headers/geos/geom.h:658.
../../source/headers/geos/geom.h:684: Warning(509): Overloaded
geos::CoordinateS equence::minCoordinate(geos::CoordinateSequence *) is
shadowed by minCoordinate( ) const at
../../source/headers/geos/geom.h:661.
- python setup.py build
...
geos_wrap.cxx: In function 'geos::Geometry*
geos_Geometry_fromHEX(std::string)': geos_wrap.cxx:4417: error: 'class
geos::WKBReader' has no member named 'readHEX' geos_wrap.cxx: In
function 'PyObject* _wrap_Geometry_srid_set(PyObject*, PyObjec t*)':
geos_wrap.cxx:24176: warning: passing 'double' for argument 1 to
'virtual void g eos::Geometry::setSRID(int)' error: command 'gcc' failed
with exit status 1
As you said me, a problem with readHEX happened.
do you have any suggestion?
Ahh, I have the SWIG right version:
# swig -version
SWIG Version 1.3.29
Best regards.
Pablo
On Mon, 05 Jun 2006 21:21:17 -0600
Charlie Savage <cfis at savagexi.com> wrote:
> Hi Pablo,
>
> Sorry not to respond sooner - I just got back from vacation.
>
> What python.i is used for is to generate geos_wrap.cxx using SWIG. If
>
> you look, you'll see that file exists. So theory you could get by
> without python.i and just run the part of the build script that
> builds/installs the extensions.
>
> However, there unfortunately there is a problem with that because the
> geos_wrap.cxx file includes pointers to a method called readHex which
> does not actually exist in geos 2.2.2 (well, it does in my version but
>
> no release version).
>
> So I'd recommend:
>
> Create python.i in your swig/python directory. Then put this code
> into it:
>
> %template(vector_GeometryP) std::vector<geos::Geometry *>;
> %template(vector_LineStringP) std::vector<geos::LineString *>;
> %template(vector_PolygonP) std::vector<geos::Polygon *>;
>
> Then make sure you have swig 1.3.29 installed. Then try the build
> script again. You may also want to delete geos_wrap.cxx before you
> start.
>
> Hope this helps,
>
> Charlie
_______________________________________________________
Abra sua conta no Yahoo! Mail: 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz.
http://mail.yahoo.com.br/
More information about the geos-devel
mailing list