[Gdal-dev] issues merging 7 bands of Landsat scene into 1 image

Maciej Sieczka tutey at o2.pl
Mon Mar 19 17:53:02 EDT 2007


Mateusz Loskot wrote:
> Maciej Sieczka wrote:
>> Mateusz Loskot wrote:
>>> Maciej Sieczka wrote:
>>>> GDAL --without-python --with-ngpython (full config syntax and other
>>>> details below) configures and builds without errors, but after the make
>>>> install, no python scripts get installed, including gdal_merge.py. How
>>>> do I build GDAL --with-ngpython and install it properly?
>>>>
>>>> I have python2.4-numeric 24.2 and python2.4-numarray 1.5.1 installed
>>>> into /usr. site-packages dir is /usr/lib/python2.4/site-packages/
>>>>
>>>> Note: there is a warning in config.log: "checking for NumPy include
>>>> files... missing"; does that matter?
>>> Maciej,
>>>
>>> Yes, it does.
>>> You need to install dev package for NumPy package.
>> I don't have such available. Never heard of...
> 
> I have installed python-numpy-dev

What distro are you using? I don't have any package with 'numpy' in
it's name, available.

>>> Try to install the NumPy dev package and it should help.
>> What is that missing include file exactly? Maybe some other package
>> provides it? I inspected config.log and found no hints.
> 
> Just try to install python-numpy-dev.
> 
>> Is there anybody on the list who knows how to build --without-python
>> --with-ngpython on Ubuntu Dapper? I will be grateful for your hints.
> 
> I just tested and it works for me.
> 
> ./configure --prefix=$HOME/usr --without-python --with-ngpython
> make
> make install
> 
> Here is listing of installed modules:
> 
> //////////////////////////////////////////////////////////////////
> mloskot:~/dev/gdal/_svn/trunk/gdal/pymod$ ls -l
> ~/usr/lib/python2.4/site-packages/
> total 1352
> -rw-r--r-- 1 mloskot mloskot   4276 2007-03-05 05:00 gdalconst.py
> -rw-r--r-- 1 mloskot mloskot   4290 2007-03-19 21:23 gdalconst.pyc
> -rwxr-xr-x 1 mloskot mloskot  57079 2007-03-19 21:22 _gdalconst.so
> -rw-r--r-- 1 mloskot mloskot  28381 2007-03-05 05:00 gdal.py
> -rw-r--r-- 1 mloskot mloskot  36881 2007-03-19 21:23 gdal.pyc
> -rwxr-xr-x 1 mloskot mloskot 383528 2007-03-19 21:22 _gdal.so
> -rw-r--r-- 1 mloskot mloskot  32974 2007-03-05 05:00 ogr.py
> -rw-r--r-- 1 mloskot mloskot  44717 2007-03-19 21:23 ogr.pyc
> -rwxr-xr-x 1 mloskot mloskot 361476 2007-03-19 21:22 _ogr.so
> -rw-r--r-- 1 mloskot mloskot  25161 2007-03-11 10:32 osr.py
> -rw-r--r-- 1 mloskot mloskot  31040 2007-03-19 21:23 osr.pyc
> -rwxr-xr-x 1 mloskot mloskot 329742 2007-03-19 21:22 _osr.so
> mloskot:~/dev/gdal/_svn/trunk/gdal/pymod$
> //////////////////////////////////////////////////////////////////

Allright, so I have these installed too, just where I would expect them
to be according to my --prefix=/usr/local:

$ ls -l /usr/local/lib/python2.4/site-packages
-rw-r--r-- 1 root root   4276 2007-03-17 22:38 gdalconst.py
-rw-r--r-- 1 root root   4283 2007-03-19 18:50 gdalconst.pyc
-rwxr-xr-x 1 root root  61724 2007-03-18 11:18 _gdalconst.so
-rw-r--r-- 1 root root  28381 2007-03-17 22:38 gdal.py
-rw-r--r-- 1 root root  36874 2007-03-19 18:50 gdal.pyc
-rwxr-xr-x 1 root root 559042 2007-03-18 11:18 _gdal.so
-rw-r--r-- 1 root root  32974 2007-03-17 22:38 ogr.py
-rw-r--r-- 1 root root  44710 2007-03-19 18:50 ogr.pyc
-rwxr-xr-x 1 root root 548130 2007-03-18 11:18 _ogr.so
-rw-r--r-- 1 root root  17556 2007-03-17 22:38 osr.py
-rw-r--r-- 1 root root  21565 2007-03-19 18:50 osr.pyc
-rwxr-xr-x 1 root root 382335 2007-03-18 11:18 _osr.so

> Note, that currently none of python utils from gdal/pymod are installed,
> so you won't see gdal_merge.py in the $PREFIX/bin directory.
> You need to manually copy all tools you need, from gdal/pymod
> to $PREFIX/bin.

This I would never guess. I thought they would be installed just as in
case of the old --with-python. And since they were not installed, I
assumed they were not built. But look, they are all there in my source
GDAL directory:

$ ls -l ~/src/straight/gdal140_svn/pymod | grep \.py

-rwxr-xr-x 1 shoofi ubunciu   6630 2007-03-17 22:38 epsg_tr.py
-rwxr-xr-x 1 shoofi ubunciu   2184 2007-03-17 22:38 esri2wkt.py
-rwxr-xr-x 1 shoofi ubunciu   4663 2007-03-17 22:38 gcps2vec.py
-rwxr-xr-x 1 shoofi ubunciu   2568 2007-03-17 22:38 gcps2wld.py
-rwxr-xr-x 1 shoofi ubunciu   4206 2007-03-17 22:38 gdal2xyz.py
-rwxr-xr-x 1 shoofi ubunciu   3184 2007-03-17 22:38 gdalchksum.py
-rw-r--r-- 1 shoofi ubunciu   4058 2007-03-17 22:38 gdalconst.py
-rwxr-xr-x 1 shoofi ubunciu   3330 2007-03-17 22:38 gdalimport.py
-rwxr-xr-x 1 shoofi ubunciu  16445 2007-03-17 22:38 gdal_merge.py
-rw-r--r-- 1 shoofi ubunciu  10285 2007-03-17 22:38 gdalnumeric.py
-rw-r--r-- 1 shoofi ubunciu  38712 2007-03-17 22:38 gdal.py
-rw-r--r-- 1 shoofi ubunciu   3325 2007-03-17 22:38 gdal_py.h
-rwxr-xr-x 1 shoofi ubunciu   7377 2007-03-17 22:38 mkgraticule.py
-rw-r--r-- 1 shoofi ubunciu  13023 2007-03-17 22:38 numpydataset.cpp
-rw-r--r-- 1 shoofi ubunciu  41453 2007-03-17 22:38 ogr.py
-rw-r--r-- 1 shoofi ubunciu  25472 2007-03-17 22:38 osr.py
-rwxr-xr-x 1 shoofi ubunciu   5297 2007-03-17 22:38 pct2rgb.py
-rwxr-xr-x 1 shoofi ubunciu   5181 2007-03-17 22:38 rgb2pct.py

Summarising:

1. I don't need any "numpy-dev" package; apparently python2.4-numeric
or python2.4-numarray provide all the headers needed (dont't know which
one exactly).

2. The warning in config.log: "checking for NumPy include files...
missing" is bogus and does not affect building --with-ngpython at all.
However confusing it is.

3. I don't understand why the python scripts from /pymod directory are
not installed when using --with-ngpython, while they are installed when
I build with the old-fashioned --with-python. Confusing as well.

Thanks for helping me. Now I can get back to playing with VRT and
gdal_merge.py.

Best,
Maciek



More information about the Gdal-dev mailing list