[Qgis-developer] Re: [Qgis-user] Re: gdal tools & osgeo4w

Giovanni Manghi giovanni.manghi at gmail.com
Sat Mar 13 07:22:40 EST 2010


Hi,

On Sat, 2010-03-13 at 01:18 -0800, GFunvake wrote:
> I don't think the problem is in QGIS, I have the same issue in FWTools -
> actually tried QGIS to see if it works there.





Actually I don't have the same issue with fwtools, as a command that
doesn't works with gdal-tools plugin under gis/osgeo4w, with fwtools
works just fine. 

Issuing the same command using the osgeo4w binaries, from the command
line, still doesn't work.




I made a few tests using a fresh osgeo4w installations under XP:

*) If during qgis install with osgeo4w it is installed *just* the
library gdal16-python (so you have installed *just* gdal16), then all
the gdal utilities that are wrote in python fail do work. The error is
always like (both in the plugin and in the terminal using the osgeo4w
binaries):

------------------
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "c:/osgeo4w/apps/gdal-16/bin/gdal_merge.py", line 31, in <module>
    import gdal
ImportError: No module named gdal
------------------


*) so just to test, I installed also gdal-python (that obviously
installs also an older gdal version). 

The gdal utilities that are written in python stop to throw the above
error but still fail (actually gdal_merge works, but the others don't)
because - I guess- the plugin is written for gdal 1.6 and a number of
options are not available under older gdal releases. 

ex:

------------------
Traceback (most recent call last): 
File "C:\osgeo4w\apps\gdal-16\bin\gdal_proximity.py", line 170, in 
gdal.ComputeProximity( srcband, dstband, options, 
AttributeError: 'module' object has no attribute 'ComputeProximity' 
------------------

The other utilities (.exe) do still work.





Under Windows Seven, the situation is worst:

the behavior -with only gdal16-python or with also gdal-python- is the
same of XP, but there are other problems:


For example:

gdalinfo (both from the plugin or from the command line using the
osgeo4w binaries) returns

"gdalinfo.exe has stopped working"


in general every gdal utility that is not in python returns a message
like:

"gdalbuildvrt.exe has stopped working"

and then (in the plugin)

"The process crashed some time after starting successfully."

eventually they produce the output the right way in any case. 




Under Seven there seems to be a gdal_tools plugin problem for the merge
tool as it shows also this error

------------------
Traceback (most recent call last):
  File "C:\Users\gio\.qgis\python\plugins\GdalTools\tools\doMerge.py",
line 50, in fillInputFilesEdit
    (self.xmax, self.ymax, self.xmin, self.ymin) = self.getExtent()
  File "C:\Users\gio\.qgis\python\plugins\GdalTools\tools\doMerge.py",
line 119, in getExtent
    res = rect1.intersect( rect2 )
AttributeError: 'NoneType' object has no attribute 'intersect'
------------------

that in any case do not stop the tool to produce the ouput (if you have
installed gdal-python, and after having closed the error messages
produced by gdalinfo).



I would really appreciate if someone can help clarify the situation. I
have been able to replicate this problems in a number of different pcs
with windows (xp, vista, seven) and this make the gdal tools plugin
actually not usable on such platform (no problems under linux).



Cheers


-- Giovanni --



More information about the Qgis-developer mailing list