Hello ,
I am trying to load a tif file (map000.tif) and also the correspondig tfw file (map000.tfw).
What he actually does is, he loads the given map (map000.tif) and shows it. But I don't think that he loaded the tfw file correctly. (So loading two rasters they will be shown at the same position.)
There is no SpatialReference which I could set?
I tried to set the set SpatialReference of the Map (m_map) but it then shows nothing.
m_mapView = new MapGraphicsView( this );
QString dataPath = "<Path>\\map000.tif";
Esri::ArcGISRuntime::Raster * raster = new Esri::ArcGISRuntime::Raster( dataPath, this );
Esri::ArcGISRuntime::RasterLayer* rasterLayer = new Esri::ArcGISRuntime::RasterLayer( raster, this );
std::cout << "SpatialRefernce: " << rasterLayer->spatialReference().wkid() << std::endl;
mp_basemap = new Esri::ArcGISRuntime::Basemap( rasterLayer, this );
m_map = new Esri::ArcGISRuntime::Map( mp_basemap, this );
m_mapView->setMap( m_map );
What do I wrong?
A long time ago I had a similar question concering the SDK 10.2.3.
How to load the .tfw file when opening a .tif file?
With kind regards
Torben
Solved! Go to Solution.
Thx, for having a look on this
Hi Luke,
after a long time, I'm coming back to this problem... Cause we need this soon...
So I made a project which is in the old 10.2.3 SDK and is able to load more tif files and the corresponding tfw files.
So here is the code again:
https://de.files.fm/u/zyq5w6td
Do I have somewho the functionality to set the desired option later on manually. So that, if no information is available in the tif File, I just tell him to use this spatial reference if no one is set.
With kind regards
Torben
By the way, if I load a tif image with the corresponding values set. Than it will be displayed at the correct postion. But if I have no information in the tif image, than it will not be displayed. I think that he even do not read any value from the tfw file.
I only have the Esri Arcgis Runtime for Qt.
Your 10.2.3 example uses Local Server. Have you tried 100.x with Local Server? Perhaps that'll give you the expected output - arcgis-runtime-samples-qt/DynamicWorkspaceRaster.cpp at master · Esri/arcgis-runtime-samples-qt · Gi...
If that doesn't work, I think you might want to consider contacting Esri support to work through this issue. They will be able to help troubleshoot your issue further
Yes,
with the Local Server it works . I did not know that I have to download it manually, cause it was included in the 10.2.3.
Now it works.
Thank you