2

I want to create a vrt from my plugin via gdal-tool. From OSGEO4W-Shell the command works. In my code i tried this:

QString program = "gdalbuildvrt";
                    QStringList arguments;
                    arguments.append("C:\\Temp\\output.vrt");
                    arguments.append("P:\\Daten\\Rasterdatenkatalog\\Raster1\\kat_1\\teil1\\4331ein.tif");
                    arguments.append("P:\\Daten\\Rasterdatenkatalog\\Raster1\\kat_1\\teil1\\4332ein.tif");
                    arguments.append("P:\\Daten\\Rasterdatenkatalog\\Raster1\\kat_1\\teil1\\4333ein.tif");

                    QProcess p;
                    p.start(program, arguments);
                    if (p.waitForStarted())
                    {
                        p.waitForFinished();
                        qDebug() << p.readAllStandardOutput();
                    }
                    else
                        qDebug() << "Failed to start";

I get no errormessage but the file will not be created. Do I need the full path to gdalbuildvrt? I thought in qgis the path is even set.

Thanks for any idea.

  • Echo your path and check whether gdal is there? – johanvdw Sep 26 '13 at 14:18
  • I gave the program the full path to gdalbuildvrt but it doesn't helped. – Ms. Smith Sep 26 '13 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.