[Gdal-dev] NG Bindings, numpy, & 1.4.0 Beta 1

Vincent Schut schut at sarvision.nl
Wed Dec 6 02:41:51 EST 2006


Howard Butler wrote:
> All,
>
> 1.4.0 beta 1 includes preliminary support for numpy in the next-gen 
> bindings.  Functionally, it appears to work, but it has not been 
> thoroughly tested.  Those who are interested in using numpy with GDAL 
> are encouraged to build up the next-gen bindings and give it a whirl.  
> Catch me on #gdal if you have any issues with building or using it.
>
> Howard
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
Howard,

I'll try to get to you on #gdal today but don't know if I'll have time 
etc. so I send you this by mail too.

First, by the way, many many thanks for diving into this and creating 
the long awaited (by me at least) numpy support in gdal!

Then the problem:
On my pc, probably because it's an amd64 and maybe because I'm running 
python2.5, I get the following error during make install:

running build_ext
building '_gdal' extension
creating build/temp.linux-x86_64-2.5
x86_64-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -fPIC 
-I../../port -I../../gcore -I../../alg -I../../ogr 
-I/usr/lib64/python2.5/site-packages/numpy/core/include 
-I/usr/include/python2.5 -c gdal_wrap.cpp -o 
build/temp.linux-x86_64-2.5/gdal_wrap.o
gdal_wrap.cpp: In function 'int 
SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
gdal_wrap.cpp:2051: error: invalid conversion from 'const char*' to 'char*'
gdal_wrap.cpp: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**, 
size_t*, int*)':
gdal_wrap.cpp:2657: error: cannot convert 'int*' to 'Py_ssize_t*' for 
argument '3' to 'int PyString_AsStringAndSize(PyObject*, char**, 
Py_ssize_t*)'
gdal_wrap.cpp: In function 'PyObject* 
_wrap_Dataset_WriteRaster(PyObject*, PyObject*, PyObject*)':
gdal_wrap.cpp:7603: error: cannot convert 'int*' to 'Py_ssize_t*' for 
argument '3' to 'int PyString_AsStringAndSize(PyObject*, char**, 
Py_ssize_t*)'
gdal_wrap.cpp: In function 'PyObject* _wrap_Band_WriteRaster(PyObject*, 
PyObject*, PyObject*)':
gdal_wrap.cpp:9168: error: cannot convert 'int*' to 'Py_ssize_t*' for 
argument '3' to 'int PyString_AsStringAndSize(PyObject*, char**, 
Py_ssize_t*)'
gdal_wrap.cpp: In function 'void SWIG_Python_FixMethods(PyMethodDef*, 
swig_const_info*, swig_type_info**, swig_type_info**)':
gdal_wrap.cpp:11167: error: invalid conversion from 'const char*' to 'char*'
error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1

Any ideas?

Vincent.



More information about the Gdal-dev mailing list