[postgis-devel] wktraster with python bindings and gdal2wktraster.py

Mateusz Loskot mateusz at loskot.net
Fri Aug 28 18:29:43 PDT 2009


Jeff Hamann wrote:
> I'm trying to get the latest wktraster into an experimental software
> application and 'm not sure I'm posting to the correct place since it
> seems to be that I'm build an dev version of GDAL/OGR. Am I posting to
> the correct place?
> 
> I'm having a bit of trouble installing the wktraster project (svn
> version 63) from the repository:
> 
> \begin{verbatim}
> $ svn co http://www.gis4free.org/gdal_wktraster gdal-1.70dev
> $ cd gdal-1.70dev
> $ ./configure --with-grass=/usr/local/grass-6.4.0svn/
> --with-macosx-framework --with-python
> $ make
> \end{verbatim}
> 
> which ALMOST makes it (I think)...
> 
> ld: warning in ../../.libs/libgdal.dylib, file is not of required
> architecture

This message looks disturbing to me, but I'm not able to tell what's wrong.

> yields,
> 
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/setuptools/command/sdist.py",
> line 98, in entries_finder
>     log.warn("unrecognized .svn/entries format in %s", dirname)
> NameError: global name 'log' is not defined
> make[2]: *** [install] Error 1
> make[1]: *** [install] Error 2
> make: *** [install-actions] Error 2
> macbook:gdal-1.7.0dev hamannj$
> 
> It builds without the python bindings, but I need them to be able to use
> the gdal2wktraster.py script, right?

I can confirm you need GDAL with Python bindings to use the script.

> I'm not versed at all in things python, but when I've tried to run the
> gdal2wktraster.py script, I get the following results:
> 
> macbook:bin hamannj$ gdal2wktraster.py
> Traceback (most recent call last):
>   File "./gdal2wktraster.py", line 32, in <module>
>     from osgeo import gdal
> ImportError: No module named osgeo

GDAL or GDAL+Python is not available/installed.

> which means that I need to add/create/modify a PYTHONPATH variable
> somewhere?

$ export PYTHON=/path/to/gdal/python/module
$ gdal2wktraster.py --help

If it doesn't work, have you tried to use official GDAL binaries for OSX
that include Python bindings?

http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries

which directs to:

http://www.kyngchaos.com/software:frameworks#gdal

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org



More information about the postgis-devel mailing list