loading of the NITF(. ntf) image format over an ArcGIs 2D map using raster layer functions

747
2
06-04-2021 12:02 AM
TASL_Virendra
New Contributor II
I have tried the loading of the NITF(. ntf) image format over an ArcGIs 2D map using raster layer functions and got output as expected.

Here is the code for the reference:


************************** Normal raster layer with .ntf file****************************************************************

if (dataPath.contains("file:/"))
dataPath = QString(QUrl(dataPath).toLocalFile());


//! [RasterLayerFile cpp new raster layer]
Raster* raster = new Raster(dataPath, this);
SpotStriprasterLayer = new RasterLayer(raster, this);
//! [RasterLayerFile cpp new raster layer]
double min= 20.0,max=tel:+441000;

Envelope Env;
connect(SpotStriprasterLayer, &RasterLayer::doneLoading, this, [this](Error loadError)
{
if (!loadError.isEmpty())
{
qDebug()<<"!loadError.isEmpty()";

return;
}

m_mapView->setViewpointCenter(SpotStriprasterLayer->fullExtent().center(), tel:+4450000;


SpotStriprasterLayer->setGamma(50.0);
SpotStriprasterLayer->setContrast(CCommonClass::objCModeDisplayClass->dSpotStripContrstValue);
SpotStriprasterLayer->setBrightness(CCommonClass::objCModeDisplayClass->dSpotStripBrgtValue);


});

m_map->operationalLayers()->clear();
m_map->operationalLayers()->append(SpotStriprasterLayer);




***†*********-**********†*************************


When i replace the image format with a char buffer, I am not able to get an output. I have gone through few sample projects of raster layer functions to achieve this, but i didnt find any alternate solution.

Could you please let me know how to fix this issue right now am facing?

Note: I want it to be in raster layers not on QIamge.
0 Kudos
2 Replies
JamesBallard1
Esri Regular Contributor

Hi @TASL_Virendra . Can you provide some more details about what you're trying to do?

What do you mean when you are replacing the image format with a char buffer?

0 Kudos
TASL_Virendra
New Contributor II

Hi James,

Thanks for reply.

We have .ntf image available in character buffer and we want to put the .ntf  as raster layer over the map.

We have succeeded in doing the same from the stored file  in standalone application but now .ntf is being streamed over socket which we are storing in buffer before putting over map. 

following are the question:

  1.  how to create a raster image from char buffer as supported by SDK.
  2.  alternate option draw image over map from char buffer which has .ntf image data packet by packet.

I hope I made myself clear, let me know if it is still not clear.

Thanks in Advance!! 

0 Kudos