[Gdal-dev] issues merging 7 bands of Landsat scene into 1 image
mateusz at loskot.net
Mon Mar 19 18:06:51 EDT 2007
Maciej Sieczka wrote:
> 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
>>>>> Note: there is a warning in config.log: "checking for NumPy
>>>>> include files... missing"; does that matter?
>>>> Yes, it does. You need to install dev package for NumPy
>>> 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.
I use Ubuntu 6.10 (Edgy Eft)
Here is the package:
>> 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: [...]
These runnable utilities like gdal_merge.py are not installed
because the NG Python support is not finally finished, there are some
One of them is to add installation of these tools to building system
> -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 41453 2007-03-17 22:38 ogr.py -rw-r--r--
> 1 shoofi ubunciu 25472 2007-03-17 22:38 osr.py
Note, that not all *.py scripts in gdal/pymod directory are end-user
tools. These listed above are old Traditional Python modules.
In your case, you need to copy tools only, scripts listed here:
> 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).
NumPy is a next generation of numeric/numarray packages.
> 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.
Yes, that's interesting.
Obviously, it needs to be checked.
> 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.
The gdal/pymod includes two types of scripts:
1. Old Traditional Python bindings
2. GDAL utilities, like those listed here:
Now, if you build NG Python - Next Generation Python bindings,
you do not need anything from gdal/pymod that applies to point 1.
(so to not copy anything like gdal.py, ogr.py, osr.py,...)
You only need to manually copy end-user tools (point 2.)
And you are right, these tools should be installed from make install,
but they are not, because lack of configuration - this subject is under
construction, so you need to manually install it (copy).
I hope it explains the current situation.
If you'll have any question, don't hesitate to ask here.
More information about the Gdal-dev