AnsweredAssumed Answered

Trying to load the tfw when opening a tif file

Question asked by twiggerich on Mar 7, 2017
Latest reply on Oct 9, 2018 by twiggerich

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

Outcomes