Skip to content
Snippets Groups Projects
Commit 5a5dfd9f authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : correct header data type + file write number of characters

parent 6d219814
No related branches found
No related tags found
No related merge requests found
......@@ -50,8 +50,7 @@ int otbOssimElevManagerTest4(int argc,char* argv[])
size[1]= atoi(argv[8]);
double* image = new double[size[0]*size[1]];
ossimElevManager * elevManager = ossimElevManager::instance();
elevManager->openDirectory(srtmDir);
......@@ -68,7 +67,7 @@ int otbOssimElevManagerTest4(int argc,char* argv[])
ossimWorldPoint.lon=point[0];
ossimWorldPoint.lat=point[1];
double height = elevManager->getHeightAboveMSL(ossimWorldPoint);
if (!ossim::isnan(height))
{
// Fill the image
......@@ -83,9 +82,10 @@ int otbOssimElevManagerTest4(int argc,char* argv[])
}
std::ofstream file;
std::cout<<outfname<<std::endl;
file.open(outfname, ios::binary|ios::out);
file.write(reinterpret_cast<char*>(image), sizeof(image)*size[0]*size[1]);
file.write(reinterpret_cast<char*>(image), sizeof(double)*size[0]*size[1]);
file.close();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment