I have a successfully running application on a Ubuntu 20.0.4 machine with Qt 5.12.9 and Arcgis runtime lib 100.8. On the other hand after copying my app to a nearly same machine with only difference being the Qt version (5.12.8), it started not showing the elevation data. I don't get any errors while loading the raster elevation by the way. What am I missing
QStringList turkeyPath;
QDir dir("/home/fatma/srtm/");
dir.setSorting(QDir::Name);
QStringList fileList = dir.entryList(QDir::AllEntries);
for(int i = 0; i < fileList.size(); i++){
turkeyPath.append(dir.filePath(fileList.at(i)));
}
const bool srcElevationFileExists = QFileInfo::exists(turkeyPath.at(0));
if(srcElevationFileExists)
{
RasterElevationSource* elevationsrc=new RasterElevationSource{turkeyPath, mpMainCentralWidget};
//When the elevation source is finished loading, call the elevationSrcFinishedLoading callback, so we can tell if it loaded succesfully.
connect(elevationSrc, &RasterElevationSource::doneLoading, this, &MainMapWidget::elevationSrcFinishedLoading, Qt::UniqueConnection);
cout << "Enabled " << elevationSrc->isEnabled() << endl;
elevationSrc->setEnabled(true);
cout << "Enabled " << elevationSrc->isEnabled() << endl;
m_scene->baseSurface()->elevationSources()->append(elevationSrc);
}
?
Solved! Go to Solution.
Hi @FatmaAkdemir ,
I am not sure what the issue could be, but one part of your description jumps out. You mentioned you're building your app with Qt 5.12.9, and then copying it to another machine and running it with Qt 5.12.8. That is typically a problematic scenario to run with a lower Qt version than you built against. Can you try either building the app with Qt 5.12.8 or installing Qt 5.12.9 on the second machine?
Aside from that I'd double check there are no filesystem permissions issues, or troubleshoot if you're loading your rasters over NFS to make sure there are no issues there.
Thanks @JamesBallard1 . It turned out to be a Language settings issue. After I changed language to English and restart the machine, it showed the elevation data. It wasn't about the Qt version.
Hi @FatmaAkdemir ,
I am not sure what the issue could be, but one part of your description jumps out. You mentioned you're building your app with Qt 5.12.9, and then copying it to another machine and running it with Qt 5.12.8. That is typically a problematic scenario to run with a lower Qt version than you built against. Can you try either building the app with Qt 5.12.8 or installing Qt 5.12.9 on the second machine?
Aside from that I'd double check there are no filesystem permissions issues, or troubleshoot if you're loading your rasters over NFS to make sure there are no issues there.
Thanks @JamesBallard1 . It turned out to be a Language settings issue. After I changed language to English and restart the machine, it showed the elevation data. It wasn't about the Qt version.
@FatmaAkdemir thanks for the update. I am not sure why that would matter for loading raster elevation data. Would you be willing to share what language the OS was in when it was failing? I want to see if we can replicate the issue so we can follow up.
Hi @JamesBallard1 ,
It was Turkish before, and by the way I also installed qgis application and packages to examine the dted files before restarting the computer. It might also have had an impact on solving the problem, I'm not sure.