[Qgis-developer] problem with ogr2ogr

PikoBoZ piklas at gmail.com
Tue May 13 05:10:13 EDT 2008


Hi list !

Got a problem with an ogr2ogr call from a python plugin.
I developped this plugin on v 0.9.1 and then on v.0.9.1rc2. In those
versions, there was the gdal/ogr .exe at Quantum GIS root directory, and the
foolowing lin like this was working:

myogr2ogr = 'ogr2ogr -a_srs "' + str(myproj4) + '" -t_srs EPSG:4326
-overwrite -f "KML" "' + str(mydestpath) + '" "'+ str(mysource) +'" '
res=os.popen(myogr2ogr).readlines()

iN NEW RELEASE 0.10, the exe are no longer at QGIS root dir
so, i wonder how i can call ogr2ogr utility from my plugin.

The idea is to allow user to use ogr2ogr without having to install FWTools

Another question, is it possible that my plugin on older releases was
calling the fwtools ogr2ogr.exe that was in my windows path ? (and not the
QGIS one ?)

Has anybody got an idea on how i could call ogr2ogr the simpler way from
python, to make the plugin work on any QGIS install  ?

Thank by advance

PikO







-- 
View this message in context: http://www.nabble.com/problem-with-ogr2ogr-tp17204278p17204278.html
Sent from the qgis-developer mailing list archive at Nabble.com.



More information about the Qgis-developer mailing list