Commit 6da5b284 authored by Julien Michel's avatar Julien Michel

STY: Remove unused includes of iostream and fstream

parent 9558e454
......@@ -21,7 +21,6 @@
#ifndef otbDEMHandler_h
#define otbDEMHandler_h
#include <iostream>
#include <cstdio>
#include "itkIndent.h"
......
......@@ -22,7 +22,6 @@
#define otbFilterFunctionValues_h
#include <vector>
#include <iostream>
#include "itkDataObject.h"
#include "itkObjectFactory.h"
......
......@@ -21,7 +21,6 @@
#ifndef otbImageKeywordlist_h
#define otbImageKeywordlist_h
#include <iostream>
#include <map>
#include "gdal.h"
......
......@@ -25,7 +25,6 @@
#include "otbWrapperApplication.h"
#include <iostream>
// ListSample
#include "itkListSample.h"
......
......@@ -28,7 +28,6 @@
#include "itkListSample.h"
#include "itkVariableLengthVector.h"
#include <iostream>
namespace otb
{
......
......@@ -21,7 +21,6 @@
#ifndef otbCommandLineArgumentParser_h
#define otbCommandLineArgumentParser_h
#include <iostream>
#include <vector>
#include <string>
#include <map>
......
......@@ -23,7 +23,6 @@
#include "itkCommand.h"
#include <sstream>
#include <iostream>
namespace otb
{
......
......@@ -22,7 +22,6 @@
#define otbStringToHTML_h
#include <string>
#include <iostream>
#include "OTBCommonExport.h"
......
......@@ -19,6 +19,7 @@
*/
#include "otbStringToHTML.h"
#include <iostream>
namespace otb
{
......
......@@ -21,7 +21,6 @@
#ifndef otbCompositeTransform_h
#define otbCompositeTransform_h
#include <iostream>
#include <sstream>
#include <stdio.h>
#include "otbTransform.h"
......
......@@ -21,7 +21,6 @@
#ifndef otbGenericMapProjection_h
#define otbGenericMapProjection_h
#include <iostream>
#include <sstream>
#include "otbTransform.h"
......
......@@ -21,7 +21,6 @@
#ifndef otbSensorModelBase_h
#define otbSensorModelBase_h
#include <iostream>
#include "otbMacro.h"
#include "otbImageKeywordlist.h"
......
......@@ -26,7 +26,6 @@
#include "otbObjectList.h"
#include "otbVectorDataKeywordlist.h"
#include <iostream>
#include "ogrsf_frmts.h"
......
......@@ -30,7 +30,6 @@
#include "otbImageToPointSetFilter.h"
#include "itkVector.h"
#include <iostream>
namespace otb
{
......
......@@ -23,7 +23,6 @@
#include "otbMath.h"
#include "itkNumericTraits.h"
#include <iostream>
#include <vector>
namespace otb
......
......@@ -21,7 +21,6 @@
#ifndef otbDEMToImageGenerator_h
#define otbDEMToImageGenerator_h
#include <iostream>
#include <stdio.h>
#include "itkImageSource.h"
......
......@@ -25,7 +25,6 @@
#include "itkProgressReporter.h"
#include <iostream>
#include <string>
#include <vector>
......
......@@ -21,7 +21,6 @@
#ifndef otbOrthoRectificationFilter_h
#define otbOrthoRectificationFilter_h
#include <iostream>
#include <sstream>
#include <stdio.h>
......
......@@ -21,7 +21,6 @@
#ifndef otbMapFileProductWriter_h
#define otbMapFileProductWriter_h
#include <fstream>
#include "itkObjectFactory.h"
......
......@@ -25,7 +25,6 @@
// store the nodes (points) coordinates
#include <map>
#include <string>
#include <fstream>
#include "OTBCartoExport.h"
#include "otbVectorData.h"
......
......@@ -22,7 +22,6 @@
#define otbWorldFile_h
#include <iomanip>
#include <fstream>
#include "itkObject.h"
#include "itkObjectFactory.h"
......@@ -68,29 +67,8 @@ public:
itkGetStringMacro(ImageFilename)
itkSetStringMacro(ImageFilename)
void Update()
{
if (m_ImageFilename.empty())
{
itkExceptionMacro(<< "The image filename must be provided");
}
std::string worldFilename;
int i = m_ImageFilename.find_last_of('.');
worldFilename = m_ImageFilename.substr(0, i) + ".wld";
std::ofstream file;
file.open(worldFilename.c_str());
file << std::setprecision(15);
file << m_LonSpacing << std::endl;
file << m_LatRotation << std::endl; //yes, in this order
file << m_LonRotation << std::endl;
file << m_LatSpacing << std::endl;
file << m_LonOrigin << std::endl;
file << m_LatOrigin << std::endl;
file.close();
}
void Update();
protected:
WorldFile() : m_LonOrigin(0.0), m_LatOrigin(0.0),
m_LonSpacing(0.0), m_LatSpacing(0.0),
......
......@@ -22,6 +22,7 @@ set(OTBCarto_SRC
otbCoordinateToName.cxx
otbOSMDataToVectorDataGenerator.cxx
otbPlaceNameToLonLat.cxx
otbWorldFile.cxx
)
add_library(OTBCarto ${OTBCarto_SRC})
......
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "otbWorldFile.h"
#include <fstream>
namespace otb {
void WorldFile::Update()
{
if (m_ImageFilename.empty())
{
itkExceptionMacro(<< "The image filename must be provided");
}
std::string worldFilename;
int i = m_ImageFilename.find_last_of('.');
worldFilename = m_ImageFilename.substr(0, i) + ".wld";
std::ofstream file;
file.open(worldFilename.c_str());
file << std::setprecision(15);
file << m_LonSpacing << std::endl;
file << m_LatRotation << std::endl; //yes, in this order
file << m_LonRotation << std::endl;
file << m_LatSpacing << std::endl;
file << m_LonOrigin << std::endl;
file << m_LatOrigin << std::endl;
file.close();
}
}
......@@ -21,9 +21,9 @@
#ifndef otbBSQImageIO_h
#define otbBSQImageIO_h
#include <fstream>
#include <string>
#include <vector>
#include <fstream>
#include "otbImageIOBase.h"
......
......@@ -22,9 +22,9 @@
#define otbLUMImageIO_h
#include "otbImageIOBase.h"
#include <fstream>
#include <string>
#include <vector>
#include <fstream>
namespace otb
{
......
......@@ -22,9 +22,9 @@
#define otbRADImageIO_h
#include "otbImageIOBase.h"
#include <fstream>
#include <string>
#include <vector>
#include <fstream>
namespace otb
{
......
......@@ -26,7 +26,6 @@
#include "itkObjectFactory.h"
#include <string>
#include <iostream>
#include <sstream>
#include "OTBIOTileMapExport.h"
......
......@@ -23,8 +23,6 @@
#ifndef otbImageSeriesFileReaderBase_h
#define otbImageSeriesFileReaderBase_h
#include <iostream>
#include <fstream>
#include <string>
#include "itkMacro.h"
......
......@@ -21,7 +21,6 @@
#ifndef otbKmzProductWriter_h
#define otbKmzProductWriter_h
#include <fstream>
#include "itkObjectFactory.h"
......
......@@ -22,7 +22,6 @@
#include "otb_boost_string_header.h"
#include "itkListSample.h"
#include <fstream>
#include <string>
#include <algorithm>
......
......@@ -25,7 +25,6 @@
#include <map>
#include <string>
#include <iostream>
#include "itkMultiThreader.h"
#include "otbMacro.h"
......
......@@ -22,7 +22,6 @@
#include "otbMachineLearningModelTraits.h"
#include "otbMachineLearningModel.h"
#include <fstream>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
......
......@@ -30,7 +30,6 @@
#include <random>
#include <ctime>
#include <cassert>
#include <iostream>
namespace otb
{
......
......@@ -22,7 +22,6 @@
#define otbContingencyTable_h
#include <vector>
#include <iostream>
#include <iomanip>
#include <itkObject.h>
#include <itkObjectFactory.h>
......
......@@ -26,7 +26,6 @@
#include "itkRegionOfInterestImageFilter.h"
#include "otbNumberOfDivisionsTiledStreamingManager.h"
#include <vector>
#include <iostream>
#include <sstream>
#include <itksys/SystemTools.hxx>
......
......@@ -28,7 +28,6 @@
#include "otbObjectList.h"
#include "otbFilterFunctionValues.h"
#include <vector>
#include <iostream>
namespace otb
{
......
......@@ -28,7 +28,6 @@
#include "otbObjectList.h"
#include "otbFilterFunctionValues.h"
#include <vector>
#include <iostream>
namespace otb
{
......
......@@ -27,7 +27,6 @@
#include "otbMacro.h"
#include "otbOpticalImageMetadataInterfaceFactory.h"
#include <fstream>
namespace otb
{
......
......@@ -28,7 +28,6 @@
#include "otbMacro.h"
#include "otbOpticalImageMetadataInterfaceFactory.h"
#include <fstream>
namespace otb
{
......
......@@ -26,7 +26,6 @@
#include <itkObjectFactory.h>
#include <vector>
#include <utility>
#include <fstream>
#include <limits>
namespace otb
......
......@@ -23,7 +23,6 @@
#include <vector>
#include <utility>
#include <fstream>
#include <limits>
#include "otbSpectralResponse.h"
......
......@@ -25,7 +25,6 @@
#include <itkObjectFactory.h>
#include <vector>
#include <utility>
#include <fstream>
#include <limits>
#include "otbVectorImage.h"
......
......@@ -26,6 +26,7 @@
#include "otbSpectralResponse.h"
#include <algorithm>
#include <fstream>
namespace otb
{
......
......@@ -24,7 +24,6 @@
#define otbLabelObjectOpeningMuParserFilter_h
#include "itkProgressReporter.h"
#include <iostream>
#include <string>
#include <vector>
......
......@@ -32,7 +32,6 @@
#include <cassert>
#include <cstring>
#include <ostream>
// #include <iostream>
#include <sstream>
#include <typeinfo>
#include <stdexcept>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarData_h
#define AlosPalsarData_h
#include <iostream>
#include <map>
class ossimKeywordlist;
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarDataSetSummary_h
#define AlosPalsarDataSetSummary_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
#include <AlosPalsar/AlosPalsarRecord.h>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarFacilityData_h
#define AlosPalsarFacilityData_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
#include <AlosPalsar/AlosPalsarRecord.h>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarLeader_h
#define AlosPalsarLeader_h
#include <iostream>
#include "AlosPalsar/AlosPalsarFileDescriptor.h"
#include "AlosPalsar/AlosPalsarDataSetSummary.h"
#include "AlosPalsar/AlosPalsarMapProjectionData.h"
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarMapProjectionData_h
#define AlosPalsarMapProjectionData_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
#include <AlosPalsar/AlosPalsarRecord.h>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarPlatformPositionData_h
#define AlosPalsarPlatformPositionData_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecord.h>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarPositionVectorRecord_h
#define AlosPalsarPositionVectorRecord_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecord.h>
......
......@@ -27,7 +27,6 @@
#ifndef AlosPalsarRadiometricData_h
#define AlosPalsarRadiometricData_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecord.h>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
......
......@@ -29,7 +29,6 @@
#include <AlosPalsar/AlosPalsarRecordHeader.h>
#include <iostream>
namespace ossimplugins
{
......
......@@ -28,7 +28,6 @@
#define AlosPalsarSignalData_h
#include <iostream>
#include <cstdlib>
#include <AlosPalsar/AlosPalsarRecordHeader.h>
#include <AlosPalsar/AlosPalsarRecord.h>
......
......@@ -26,7 +26,6 @@
#ifndef AntennaElevationPatterns_h
#define AntennaElevationPatterns_h
#include <iostream>
#include <EnvisatAsar/EnvisatAsarRecord.h>
namespace ossimplugins
......
......@@ -26,7 +26,6 @@
#ifndef ChirpParameters_h
#define ChirpParameters_h
#include <iostream>
#include <EnvisatAsar/EnvisatAsarRecord.h>
namespace ossimplugins
......
......@@ -26,7 +26,6 @@
#ifndef DopplerCentroidParameters_h
#define DopplerCentroidParameters_h
#include <iostream>
#include <EnvisatAsar/EnvisatAsarRecord.h>
namespace ossimplugins
......
......@@ -26,7 +26,6 @@
#ifndef EnvisatAsarData_h
#define EnvisatAsarData_h
#include <iostream>
#include "sph.h"
#include "mph.h"
#include "SQ_ADSR.h"
......