QT and GDAL , no errors but the console application not showing anything
-
dera all,
here is my code :
#include <QCoreApplication>
#include <iostream>
#include<gdal.h>
#include <gdal_priv.h>
#include <cpl_conv.h>
using namespace std;
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
const char *input ="C:/Users/plt/Documents/untitled3/IMAGERY.TIF";
const char output ="C:/Users/plt/Documents/untitled3/new_IMAGERY.TIF";
GDALAllRegister();
GDALDataset pOlDS, * pNewDS;
GDALDriver pDriverTiff;
pDriverTiff= GetGDALDriverManager()->GetDriverByName("GTiff");
pOlDS = (GDALDataset) GDALOpen(input,GA_ReadOnly);
pNewDS = pDriverTiff->CreateCopy(output, pOlDS, FALSE, NULL, NULL, NULL);
GDALClose(pOlDS);
GDALClose(pNewDS);
/////////////////////////////////////////////////////////////////////////////////////
system("pause");return a.exec();
}
i do not have errors and it is executing but the process is not done. -
Hi,
I don't know that library but I don't see any error checks in your code.
Also, are you sure that this library supports slashes in file path on Windows ?