From 28dac59014d1b0e5678e60b71847bc0655457591 Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Thu, 28 Jan 2010 18:41:44 +0800 Subject: [PATCH] ENH: remove SAR model from ossim (now that they are on ossimplugins) --- Code/IO/otbImageFileReader.txx | 4 +- Code/IO/otbImageFileWriter.txx | 4 +- Code/IO/otbStreamingImageFileWriter.txx | 4 +- Utilities/otbossim/CMakeLists.txt | 10 - .../imaging/ErsSar/ErsSarData/ErsSarData.h | 70 - .../ErsSar/ErsSarData/ErsSarDataFactory.h | 29 - .../ErsSarImageOptionsFileDescriptor.h | 648 ------ .../ErsSarLeader/ErsSarDataSetSummary.h | 1056 ---------- .../ErsSar/ErsSarLeader/ErsSarFacilityData.h | 1795 ----------------- .../ErsSarLeader/ErsSarFileDescriptor.h | 619 ------ .../ErsSar/ErsSarLeader/ErsSarLeader.h | 80 - .../ErsSar/ErsSarLeader/ErsSarLeaderFactory.h | 33 - .../ErsSarLeader/ErsSarMapProjectionData.h | 308 --- .../ErsSarLeader/ErsSarPlatformPositionData.h | 283 --- .../ErsSarLeader/ErsSarPositionVectorRecord.h | 76 - .../ossim/imaging/ErsSar/ErsSarRecord.h | 64 - .../imaging/ErsSar/ErsSarRecordFactory.h | 49 - .../ossim/imaging/ErsSar/ErsSarRecordHeader.h | 129 -- .../ossim/imaging/RadarSat2/Rds2Annotation.h | 392 ---- .../ossim/imaging/TerraSar/TsxAnnotation.h | 519 ----- .../ossim/imaging/ossimErsSarTileSource.h | 114 -- .../imaging/ossimImageHandlerSarFactory.h | 55 - .../ossim/imaging/ossimRadarSat2TileSource.h | 107 - .../ossim/imaging/ossimTerraSarTileSource.h | 107 - .../ossim/projection/ossimErsSarModel.h | 70 - .../projection/ossimGeometricSarSensorModel.h | 175 -- .../ossim/projection/ossimRadarSat2Model.h | 89 - .../ossim/projection/ossimTerraSarModel.h | 90 - .../imaging/ErsSar/ErsSarData/ErsSarData.cpp | 118 -- .../ErsSar/ErsSarData/ErsSarDataFactory.cpp | 15 - .../ErsSarImageOptionsFileDescriptor.cpp | 353 ---- .../ErsSarLeader/ErsSarDataSetSummary.cpp | 760 ------- .../ErsSarLeader/ErsSarFacilityData.cpp | 1151 ----------- .../ErsSarLeader/ErsSarFileDescriptor.cpp | 322 --- .../ErsSar/ErsSarLeader/ErsSarLeader.cpp | 129 -- .../ErsSarLeader/ErsSarLeaderFactory.cpp | 21 - .../ErsSarLeader/ErsSarMapProjectionData.cpp | 194 -- .../ErsSarPlatformPositionData.cpp | 235 --- .../ErsSarPositionVectorRecord.cpp | 70 - .../src/ossim/imaging/ErsSar/ErsSarRecord.cpp | 16 - .../imaging/ErsSar/ErsSarRecordFactory.cpp | 27 - .../imaging/ErsSar/ErsSarRecordHeader.cpp | 67 - .../imaging/RadarSat2/Rds2Annotation.cpp | 310 --- .../ossim/imaging/TerraSar/TsxAnnotation.cpp | 418 ---- .../ossim/imaging/ossimErsSarTileSource.cpp | 347 ---- .../imaging/ossimImageHandlerSarFactory.cpp | 345 ---- .../imaging/ossimRadarSat2TileSource.cpp | 260 --- .../ossim/imaging/ossimTerraSarTileSource.cpp | 301 --- .../src/ossim/projection/ossimErsSarModel.cpp | 397 ---- .../ossimGeometricSarSensorModel.cpp | 248 --- .../ossim/projection/ossimRadarSat2Model.cpp | 430 ---- .../ossim/projection/ossimTerraSarModel.cpp | 496 ----- 52 files changed, 6 insertions(+), 14003 deletions(-) delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarData.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecord.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordFactory.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordHeader.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/RadarSat2/Rds2Annotation.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/TerraSar/TsxAnnotation.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ossimErsSarTileSource.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ossimImageHandlerSarFactory.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ossimRadarSat2TileSource.h delete mode 100644 Utilities/otbossim/include/ossim/imaging/ossimTerraSarTileSource.h delete mode 100644 Utilities/otbossim/include/ossim/projection/ossimErsSarModel.h delete mode 100644 Utilities/otbossim/include/ossim/projection/ossimGeometricSarSensorModel.h delete mode 100644 Utilities/otbossim/include/ossim/projection/ossimRadarSat2Model.h delete mode 100644 Utilities/otbossim/include/ossim/projection/ossimTerraSarModel.h delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarData.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecord.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordFactory.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordHeader.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/RadarSat2/Rds2Annotation.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/TerraSar/TsxAnnotation.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ossimErsSarTileSource.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ossimImageHandlerSarFactory.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ossimRadarSat2TileSource.cpp delete mode 100644 Utilities/otbossim/src/ossim/imaging/ossimTerraSarTileSource.cpp delete mode 100644 Utilities/otbossim/src/ossim/projection/ossimErsSarModel.cpp delete mode 100644 Utilities/otbossim/src/ossim/projection/ossimGeometricSarSensorModel.cpp delete mode 100644 Utilities/otbossim/src/ossim/projection/ossimRadarSat2Model.cpp delete mode 100644 Utilities/otbossim/src/ossim/projection/ossimTerraSarModel.cpp diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx index f9b3dd93bf..c1b87fbc01 100644 --- a/Code/IO/otbImageFileReader.txx +++ b/Code/IO/otbImageFileReader.txx @@ -28,7 +28,7 @@ #include "otbMetaDataKey.h" #include "imaging/ossimImageHandlerRegistry.h" -#include "ossim/imaging/ossimImageHandlerSarFactory.h" +// #include "ossim/imaging/ossimImageHandlerSarFactory.h" #include "imaging/ossimImageHandler.h" #include "init/ossimInit.h" #include "base/ossimKeywordlist.h" @@ -363,7 +363,7 @@ ImageFileReader<TOutputImage> if (!hasMetaData) { // Add the radar factory - ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); + // ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); ossimImageHandler* handler = ossimImageHandlerRegistry::instance() diff --git a/Code/IO/otbImageFileWriter.txx b/Code/IO/otbImageFileWriter.txx index e327b79cbc..f94fafbaff 100644 --- a/Code/IO/otbImageFileWriter.txx +++ b/Code/IO/otbImageFileWriter.txx @@ -25,7 +25,7 @@ #include "vnl/vnl_vector.h" #include "imaging/ossimImageHandlerRegistry.h" -#include "ossim/imaging/ossimImageHandlerSarFactory.h" +// #include "ossim/imaging/ossimImageHandlerSarFactory.h" #include "imaging/ossimImageHandler.h" #include "init/ossimInit.h" #include "base/ossimKeywordlist.h" @@ -99,7 +99,7 @@ ImageFileWriter<TInputImage> if(geom_kwl.getSize()>0) { otbMsgDevMacro(<<"Exporting keywordlist ..."); - ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); +// ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); ossimImageHandler* handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(this->GetFileName())); if(!handler) diff --git a/Code/IO/otbStreamingImageFileWriter.txx b/Code/IO/otbStreamingImageFileWriter.txx index 19042052af..511f35d408 100644 --- a/Code/IO/otbStreamingImageFileWriter.txx +++ b/Code/IO/otbStreamingImageFileWriter.txx @@ -27,7 +27,7 @@ #include "otbImageIOFactory.h" #include "imaging/ossimImageHandlerRegistry.h" -#include "ossim/imaging/ossimImageHandlerSarFactory.h" +//#include "ossim/imaging/ossimImageHandlerSarFactory.h" #include "imaging/ossimImageHandler.h" #include "init/ossimInit.h" #include "base/ossimKeywordlist.h" @@ -543,7 +543,7 @@ StreamingImageFileWriter<TInputImage> if(geom_kwl.getSize()>0) { otbMsgDevMacro(<<"Exporting keywordlist ..."); - ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); +// ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance()); ossimImageHandler* handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(this->GetFileName())); if(!handler) diff --git a/Utilities/otbossim/CMakeLists.txt b/Utilities/otbossim/CMakeLists.txt index 79f7a4de98..2ed3a4cc52 100644 --- a/Utilities/otbossim/CMakeLists.txt +++ b/Utilities/otbossim/CMakeLists.txt @@ -48,17 +48,7 @@ IF(NOT OTB_DISABLE_UTILITIES_COMPILATION) LIST(REMOVE_ITEM ossim_base_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/base/ossimFactoryBaseTemplate.cpp") # Removing sources not in use any more (switched to ossim plugins) - LIST(REMOVE_ITEM ossim_projection_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/projection/ossimRadarSat2Model.cpp") - LIST(REMOVE_ITEM ossim_projection_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/projection/ossimGeometricSarSensorModel.cpp") - LIST(REMOVE_ITEM ossim_projection_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/projection/ossimErsSarModel.cpp") LIST(REMOVE_ITEM ossim_projection_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/projection/ossimCosmoSkymedModel.cpp") - LIST(REMOVE_ITEM ossim_projection_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/projection/ossimTerraSarModel.cpp") - LIST(REMOVE_ITEM ossim_imaging_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/imaging/ErsSar/*") - LIST(REMOVE_ITEM ossim_imaging_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/imaging/RadarSat2/*") - LIST(REMOVE_ITEM ossim_imaging_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/imaging/ossimRadarSat2TileSource.cpp") - LIST(REMOVE_ITEM ossim_imaging_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/imaging/TerraSar/*") - LIST(REMOVE_ITEM ossim_imaging_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/src/ossim/imaging/ossimTerraSarTileSource.cpp") - # Adjust the compiler flags to avoid problems with ossim code. IF(CMAKE_COMPILER_IS_GNUCXX) FOREACH(f ${ossim_base_SRCS} ${ossim_elevation_SRCS} ${ossim_font_SRCS} ${ossim_imaging_SRCS} ${ossim_matrix_SRCS} diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarData.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarData.h deleted file mode 100644 index fa61cdb1a0..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarData.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef ErsSarData_h -#define ErsSarData_h - -#include <iostream> -#include <map> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> - -class ErsSarImageOptionsFileDescriptor; -/** - * @ingroup DataFile - * @brief This class is able to read the data file of the RadarSat file structure - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarData -{ -public: - /** - * @brief Constructor - */ - ErsSarData(); - - /** - * @brief Destructor - */ - ~ErsSarData(); - - /** - * @brief This function write the Data in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarData& data); - - /** - * @brief This function read a Data from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarData& data); - - /** - * @brief Copy constructor - */ - ErsSarData(const ErsSarData& rhs); - - /** - * @brief Copy operator - */ - ErsSarData& operator=(const ErsSarData& rhs); - - /** - * @brief Remove all the previous records from the Data - */ - void ClearRecords(); - - /** - * @brief Insert an existing record in the Data - */ - void InsertRecord(int id, ErsSarRecord* record); - - ErsSarImageOptionsFileDescriptor* get_ErsSarImageOptionsFileDescriptor(); - - -protected: - - std::map<int, ErsSarRecord*> _records; - static const int ErsSarImageOptionsFileDescriptorID; -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h deleted file mode 100644 index 4edeeb4ca2..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef ErsSarDataFactory_h -#define ErsSarDataFactory_h - -#include <ossim/imaging/ErsSar/ErsSarRecordFactory.h> -#include <map> -/** - * @ingroup DataFile - * @brief This class is a facory able to construct Record base classes - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 03-12-07 - */ -class ErsSarDataFactory : public ErsSarRecordFactory -{ -public: - /** - * @brief Contstructor - */ - ErsSarDataFactory(); - /** - * @brief Destructor - */ - ~ErsSarDataFactory(); - -protected: -private: -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h deleted file mode 100644 index c3fa7ad2ed..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h +++ /dev/null @@ -1,648 +0,0 @@ -#ifndef ErsSarImageOptionsFileDescriptor_h -#define ErsSarImageOptionsFileDescriptor_h - -#include <iostream> -#include <cstdlib> - -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - -/** - * @ingroup ErsSarImageOptionsFileDescriptionRecord - * @brief This class is able to read an Image options file descriptor record - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 03-12-07 - */ -class ErsSarImageOptionsFileDescriptor : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarImageOptionsFileDescriptor(); - - /** - * @brief Destructor - */ - ~ErsSarImageOptionsFileDescriptor(); - - /** - * @brief Copy constructor - */ - ErsSarImageOptionsFileDescriptor(const ErsSarImageOptionsFileDescriptor& rhs); - - /** - * @brief Copy operator - */ - ErsSarImageOptionsFileDescriptor& operator=(const ErsSarImageOptionsFileDescriptor& rhs); - /** - * @brief This function write the ErsSarImageOptionsFileDescriptor in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarImageOptionsFileDescriptor& data); - - /** - * @brief This function read a ErsSarImageOptionsFileDescriptor from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarImageOptionsFileDescriptor& data); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarImageOptionsFileDescriptor(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarImageOptionsFileDescriptor(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - /** - * @brief ASCII flag - */ - std::string get_ascii_flag() - { - return _ascii_flag; - }; - - /** - * @brief Format control document - */ - std::string get_format_doc() - { - return _format_doc; - }; - /** - * @brief Format document revision - */ - std::string get_format_rev() - { - return _format_rev; - }; - /** - * @brief File design revision - */ - std::string get_design_rev() - { - return _design_rev; - }; - /** - * @brief Software identifier - */ - std::string get_software_id() - { - return _software_id; - }; - /** - * @brief File number - */ - int get_file_num() - { - return _file_num; - }; - /** - * @brief File name - */ - std::string get_file_name() - { - return _file_name; - }; - /** - * @brief Record sequence/location flag - */ - std::string get_rec_seq() - { - return _rec_seq; - }; - /** - * @brief Sequence number location - */ - int get_seq_loc() - { - return _seq_loc; - }; - /** - * @brief Sequence number length - */ - int get_seq_len() - { - return _seq_len; - }; - /** - * @brief Record code/location flag - */ - std::string get_rec_code() - { - return _rec_code; - }; - /** - * @brief Record code location - */ - int get_code_loc() - { - return _code_loc; - }; - /** - * @brief Record code length - */ - int get_code_len() - { - return _code_len; - }; - /** - * @brief Record length/location flag - */ - std::string get_rec_len() - { - return _rec_len; - }; - /** - * @brief Record length location - */ - int get_rlen_loc() - { - return _rlen_loc; - }; - /** - * @brief Record length length - */ - int get_rlen_len() - { - return _rlen_len; - }; - - - /** - * @brief Number of SAR data records - */ - int get_n_dataset() - { - return _n_dataset; - }; - /** - * @brief SAR data record length - */ - int get_l_dataset() - { - return _l_dataset; - }; - - /** - * @brief Number of bits per sample - */ - int get_nbit() - { - return _nbit; - }; - /** - * @brief Samples per data group - */ - int get_nsamp() - { - return _nsamp; - }; - /** - * @brief Bytes per data group - */ - int get_nbyte() - { - return _nbyte; - }; - /** - * @brief Sample justification and order - */ - std::string get_justify() - { - return _justify; - }; - /** - * @brief Number of SAR channels - */ - int get_nchn() - { - return _nchn; - }; - /** - * @brief Lines per data set - */ - int get_nlin() - { - return _nlin; - }; - /** - * @brief Left border pixels per line - */ - int get_nleft() - { - return _nleft; - }; - /** - * @brief Groups per line per channel - */ - int get_ngrp() - { - return _ngrp; - }; - /** - * @brief Right border pixels per line - */ - int get_nright() - { - return _nright; - }; - /** - * @brief Top border lines - */ - int get_ntop() - { - return _ntop; - }; - /** - * @brief Bottom border lines - */ - int get_nbott() - { - return _nbott; - }; - /** - * @brief Interleave indicator - */ - std::string get_intleav() - { - return _intleav; - }; - /** - * @brief Number of physical records per line - */ - int get_nrec_lin() - { - return _nrec_lin; - }; - /** - * @brief Number of physical records per multi-channel line in this file - */ - int get_nrec_chn() - { - return _nrec_chn; - }; - /** - * @brief Number of bytes of prefix data per record - */ - int get_n_prefix() - { - return _n_prefix; - }; - /** - * @brief Number of bytes of SAR data (or pixel data) per record - */ - int get_n_sar() - { - return _n_sar; - }; - /** - * @brief Number of bytes of suffix data per record - */ - int get_n_suffix() - { - return _n_suffix; - }; - - /** - * @brief Line number locator - */ - std::string get_lin_loc() - { - return _lin_loc; - }; - /** - * @brief Channel number locator - */ - std::string get_chn_loc() - { - return _chn_loc; - }; - /** - * @brief Time locator - */ - std::string get_tim_loc() - { - return _tim_loc; - }; - /** - * @brief Left fill locator - */ - std::string get_left_loc() - { - return _left_loc; - }; - /** - * @brief Right fill locator - */ - std::string get_right_loc() - { - return _right_loc; - }; - /** - * @brief Pad pixel indicator - */ - std::string get_pad_ind() - { - return _pad_ind; - }; - - /** - * @brief Quality code locator - */ - std::string get_qual_loc() - { - return _qual_loc; - }; - /** - * @brief Calibration info locator - */ - std::string get_cali_loc() - { - return _cali_loc; - }; - /** - * @brief Gain value locator - */ - std::string get_gain_loc() - { - return _gain_loc; - }; - /** - * @brief Bias value locator - */ - std::string get_bias_loc() - { - return _bias_loc; - }; - /** - * @brief Data type identifier - */ - std::string get_type_id() - { - return _type_id; - }; - /** - * @brief Data type code - */ - std::string get_type_code() - { - return _type_code; - }; - /** - * @brief Number of left fill bits - */ - int get_left_fill() - { - return _left_fill; - }; - /** - * @brief Number of right fill bits - */ - int get_right_fill() - { - return _right_fill; - }; - /** - * @brief Maximum data range of pixel - */ - int get_pix_rng() - { - return _pix_rng; - }; - -protected: - /** - * @brief ASCII flag - */ - std::string _ascii_flag; - - /** - * @brief Format control document - */ - std::string _format_doc; - /** - * @brief Format document revision - */ - std::string _format_rev; - /** - * @brief File design revision - */ - std::string _design_rev; - /** - * @brief Software identifier - */ - std::string _software_id; - /** - * @brief File number - */ - int _file_num; - /** - * @brief File name - */ - std::string _file_name; - /** - * @brief Record sequence/location flag - */ - std::string _rec_seq; - /** - * @brief Sequence number location - */ - int _seq_loc; - /** - * @brief Sequence number length - */ - int _seq_len; - /** - * @brief Record code/location flag - */ - std::string _rec_code; - /** - * @brief Record code location - */ - int _code_loc; - /** - * @brief Record code length - */ - int _code_len; - /** - * @brief Record length/location flag - */ - std::string _rec_len; - /** - * @brief Record length location - */ - int _rlen_loc; - /** - * @brief Record length length - */ - int _rlen_len; - - - /** - * @brief Number of SAR data records - */ - int _n_dataset; - /** - * @brief SAR data record length - */ - int _l_dataset; - - /** - * @brief Number of bits per sample - */ - int _nbit; - /** - * @brief Samples per data group - */ - int _nsamp; - /** - * @brief Bytes per data group - */ - int _nbyte; - /** - * @brief Sample justification and order - */ - std::string _justify; - /** - * @brief Number of SAR channels - */ - int _nchn; - /** - * @brief Lines per data set - */ - int _nlin; - /** - * @brief Left border pixels per line - */ - int _nleft; - /** - * @brief Groups per line per channel - */ - int _ngrp; - /** - * @brief Right border pixels per line - */ - int _nright; - /** - * @brief Top border lines - */ - int _ntop; - /** - * @brief Bottom border lines - */ - int _nbott; - /** - * @brief Interleave indicator - */ - std::string _intleav; - /** - * @brief Number of physical records per line - */ - int _nrec_lin; - /** - * @brief Number of physical records per multi-channel line in this file - */ - int _nrec_chn; - /** - * @brief Number of bytes of prefix data per record - */ - int _n_prefix; - /** - * @brief Number of bytes of SAR data (or pixel data) per record - */ - int _n_sar; - /** - * @brief Number of bytes of suffix data per record - */ - int _n_suffix; - - /** - * @brief Line number locator - */ - std::string _lin_loc; - /** - * @brief Channel number locator - */ - std::string _chn_loc; - /** - * @brief Time locator - */ - std::string _tim_loc; - /** - * @brief Left fill locator - */ - std::string _left_loc; - /** - * @brief Right fill locator - */ - std::string _right_loc; - /** - * @brief Pad pixel indicator - */ - std::string _pad_ind; - - /** - * @brief Quality code locator - */ - std::string _qual_loc; - /** - * @brief Calibration info locator - */ - std::string _cali_loc; - /** - * @brief Gain value locator - */ - std::string _gain_loc; - /** - * @brief Bias value locator - */ - std::string _bias_loc; - /** - * @brief Data type identifier - */ - std::string _type_id; - /** - * @brief Data type code - */ - std::string _type_code; - /** - * @brief Number of left fill bits - */ - int _left_fill; - /** - * @brief Number of right fill bits - */ - int _right_fill; - /** - * @brief Maximum data range of pixel - */ - int _pix_rng; - -private: - -}; -#endif diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h deleted file mode 100644 index c3b6493638..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h +++ /dev/null @@ -1,1056 +0,0 @@ -#ifndef ErsSarDataSetSummary_h -#define ErsSarDataSetSummary_h - -#include <iostream> -#include <cstdlib> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -/** - * @ingroup ErsSarDataSetSummaryRecord - * @brief This class is able to read the SAR leader data set summary record of the leader file - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarDataSetSummary : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarDataSetSummary(); - - /** - * @brief Destructor - */ - ~ErsSarDataSetSummary(); - - /** - * @brief This function write the ErsSarDataSetSummary in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data); - - /** - * @brief This function read a ErsSarDataSetSummary from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarDataSetSummary& data); - - /** - * @brief Copy constructor - */ - ErsSarDataSetSummary(const ErsSarDataSetSummary& rhs); - - /** - * @brief Copy operator - */ - ErsSarDataSetSummary& operator=(const ErsSarDataSetSummary& rhs); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarDataSetSummary(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarDataSetSummary(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - - /** - * @brief Sequence number - */ - int get_seq_num() - { - return _seq_num; - }; - /** - * @brief SAR channel indicator - */ - int get_sar_chn() - { - return _sar_chn; - }; - /** - * @brief Scene identifier - */ - std::string get_scene_id() - { - return _scene_id; - }; - /** - * @brief Scene designator - */ - std::string get_scene_des() - { - return _scene_des; - }; - /** - * @brief Input scene centre time - */ - std::string get_inp_sctim() - { - return _inp_sctim; - }; - /** - * @brief Ascending/descending - */ - std::string get_asc_des() - { - return _asc_des; - }; - /** - * @brief Processed scene centre latitude - */ - double get_pro_lat() - { - return _pro_lat; - }; - /** - * @brief Processed scene centre longitude - */ - double get_pro_long() - { - return _pro_long; - }; - /** - * @brief Processed scene centre headng - */ - double get_pro_head() - { - return _pro_head; - }; - /** - * @brief Ellipsoid designator - */ - std::string get_ellip_des() - { - return _ellip_des; - }; - /** - * @brief Ellipsoid semi-major axis, km - */ - double get_ellip_maj() - { - return _ellip_maj; - }; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double get_ellip_min() - { - return _ellip_min; - }; - /** - * @brief Earth's mass - */ - double get_earth_mass() - { - return _earth_mass; - }; - /** - * @brief Gravitational constant - */ - double get_grav_const() - { - return _grav_const; - }; - /** - * @brief Ellipsoid J2-4 parameters - */ - double* get_ellip_j() - { - return _ellip_j; - }; - - /** - * @brief Average terrain height, km - */ - double get_terrain_h() - { - return _terrain_h; - }; - /** - * @brief Scene centre line number - */ - int get_sc_lin() - { - return _sc_lin; - }; - /** - * @brief Scene centre pixel number - */ - int get_sc_pix() - { - return _sc_pix; - }; - /** - * @brief Scene length, km - */ - double get_scene_len() - { - return _scene_len; - }; - /** - * @brief Scene width, km - */ - double get_scene_wid() - { - return _scene_wid; - }; - - /** - * @brief Number of SAR channels - */ - double get_nchn() - { - return _nchn; - }; - - /** - * @brief Mission identifier - */ - std::string get_mission_id() - { - return _mission_id; - }; - /** - * @brief Sensor identifier - */ - std::string get_sensor_id() - { - return _sensor_id; - }; - /** - * @brief Orbit number - */ - std::string get_orbit_num() - { - return _orbit_num; - }; - /** - * @brief Platform geodetic latitude - */ - double get_plat_lat() - { - return _plat_lat; - }; - /** - * @brief Platform geodetic longitude - */ - double get_plat_long() - { - return _plat_long; - }; - /** - * @brief Platform heading - */ - double get_plat_head() - { - return _plat_head; - }; - /** - * @brief Sensor clock angle - */ - double get_clock_ang() - { - return _clock_ang; - }; - /** - * @brief Incidence angle - */ - double get_incident_ang() - { - return _incident_ang; - }; - - /** - * @brief Radar wave length - */ - double get_wave_length() - { - return _wave_length; - }; - /** - * @brief Motion compensation indicator - */ - std::string get_motion_comp() - { - return _motion_comp; - }; - /** - * @brief Range pulse code specifier - */ - std::string get_pulse_code() - { - return _pulse_code; - }; - /** - * @brief Range chirp coefficients - */ - double* get_ampl_coef() - { - return _ampl_coef; - }; - /** - * @brief Range phase coefficients - */ - double* get_phas_coef() - { - return _phas_coef; - }; - /** - * @brief Chirp extraction index - */ - int get_chirp_ext_ind() - { - return _chirp_ext_ind; - }; - - /** - * @brief Range sampling rate - */ - double get_fr() - { - return _fr; - }; - /** - * @brief Range gate start time - */ - double get_rng_gate() - { - return _rng_gate; - }; - /** - * @brief Range pulse length - */ - double get_rng_length() - { - return _rng_length; - }; - /** - * @brief Baseband conversion flag - */ - std::string get_baseband_f() - { - return _baseband_f; - }; - /** - * @brief Range compressed flag - */ - std::string get_rngcmp_f() - { - return _rngcmp_f; - }; - /** - * @brief Like polarized gain - */ - double get_gn_polar() - { - return _gn_polar; - }; - /** - * @brief Cross polarized gain - */ - double get_gn_cross() - { - return _gn_cross; - }; - /** - * @brief Number of bits per channel - */ - int get_chn_bits() - { - return _chn_bits; - }; - /** - * @brief Quantization descriptor - */ - std::string get_quant_desc() - { - return _quant_desc; - }; - /** - * @brief I channel DC bias - */ - double get_i_bias() - { - return _i_bias; - }; - /** - * @brief Q channel DC bias - */ - double get_q_bias() - { - return _q_bias; - }; - /** - * @brief I/Q channel ratio - */ - double get_iq_ratio() - { - return _iq_ratio; - }; - - - /** - * @brief Mechanical boresight - */ - double get_mech_sight() - { - return _mech_sight; - }; - - /** - * @brief Nominal PRF, Hz - */ - double get_fa() - { - return _fa; - }; - - /** - * @brief Satellite binary time - */ - std::string get_sat_bintim() - { - return _sat_bintim; - }; - /** - * @brief Satellite clock time - */ - std::string get_sat_clktim() - { - return _sat_clktim; - }; - /** - * @brief Satellite clock increment - */ - std::string get_sat_clkinc() - { - return _sat_clkinc; - }; - - /** - * @brief Processing facility identifier - */ - std::string get_fac_id() - { - return _fac_id; - }; - /** - * @brief Processing system identifier - */ - std::string get_sys_id() - { - return _sys_id; - }; - /** - * @brief Processing version identifier - */ - std::string get_ver_id() - { - return _ver_id; - }; - - /** - * @brief Product type specifier - */ - std::string get_prod_type() - { - return _prod_type; - }; - /** - * @brief Processing algorithm identifier - */ - std::string get_algor_id() - { - return _algor_id; - }; - /** - * @brief Number of azimuth looks - */ - double get_n_azilok() - { - return _n_azilok; - }; - /** - * @brief Number of range looks - */ - double get_n_rnglok() - { - return _n_rnglok; - }; - /** - * @brief Bandwidth per look in azimuth,Hz - */ - double get_bnd_azilok() - { - return _bnd_azilok; - }; - /** - * @brief Bandwidth per look in range,Hz - */ - double get_bnd_rnglok() - { - return _bnd_rnglok; - }; - /** - * @brief Total azimuth look bandwidth - */ - double get_bnd_azi() - { - return _bnd_azi; - }; - /** - * @brief Total range look bandwidth - */ - double get_bnd_rng() - { - return _bnd_rng; - }; - /** - * @brief Azimuth weighting designator - */ - std::string get_azi_weight() - { - return _azi_weight; - }; - /** - * @brief Range weighting designator - */ - std::string get_rng_weight() - { - return _rng_weight; - }; - /** - * @brief Data input source - */ - std::string get_data_inpsrc() - { - return _data_inpsrc; - }; - /** - * @brief Range resolution, meter - */ - double get_rng_res() - { - return _rng_res; - }; - /** - * @brief Azimuth resolution, meter - */ - double get_azi_res() - { - return _azi_res; - }; - /** - * @brief Along track Doppler frequency terms - */ - double* get_alt_dopcen() - { - return _alt_dopcen; - }; - - /** - * @brief Cross track Doppler frequency terms - */ - double* get_crt_dopcen() - { - return _crt_dopcen; - }; - /** - * @brief Pixel time direction indicator - */ - std::string get_time_dir_pix() - { - return _time_dir_pix; - }; - /** - * @brief Line time direction indicator - */ - std::string get_time_dir_lin() - { - return _time_dir_lin; - }; - /** - * @brief Along track Doppler rate term - */ - double* get_alt_rate() - { - return _alt_rate; - }; - - /** - * @brief Cross track Doppler rate term - */ - double* get_crt_rate() - { - return _crt_rate; - }; - - /** - * @brief Line content indicator - */ - std::string get_line_cont() - { - return _line_cont; - }; - /** - * @brief Clutter lock applied flag - */ - std::string get_clutter_lock() - { - return _clutter_lock; - }; - /** - * @brief Auto-focus applied flag - */ - std::string get_auto_focus() - { - return _auto_focus; - }; - /** - * @brief Line spacing, meters - */ - double get_line_spacing() - { - return _line_spacing; - }; - /** - * @brief Pixel spacing, meters - */ - double get_pix_spacing() - { - return _pix_spacing; - }; - /** - * @brief Range compression designator - */ - std::string get_rngcmp_desg() - { - return _rngcmp_desg; - }; - /** - * @brief zero doppler range time (two way) of first pixel - */ - double get_zero_dop_range_time_f_pixel() - { - return _zero_dop_range_time_f_pixel; - } - /** - * @brief zero doppler range time (two way) of mid pixel - */ - double get_zero_dop_range_time_c_pixel() - { - return _zero_dop_range_time_c_pixel; - } - /** - * @brief zero doppler range time (two way) of last pixel - */ - double get_zero_dop_range_time_l_pixel() - { - return _zero_dop_range_time_l_pixel; - } - /** - * @brief zero doppler azimut time (UTC) of first pixel - */ - std::string get_zero_dop_az_time_f_pixel() - { - return _zero_dop_az_time_f_pixel; - } - /** - * @brief zero doppler azimut time (UTC) of mid pixel - */ - std::string get_zero_dop_az_time_c_pixel() - { - return _zero_dop_az_time_c_pixel; - } - /** - * @brief zero doppler azimut time (UTC) of last pixel - */ - std::string get_zero_dop_az_time_l_pixel() - { - return _zero_dop_az_time_l_pixel; - } - - -protected: - /** - * @brief Sequence number - */ - int _seq_num; - /** - * @brief SAR channel indicator - */ - int _sar_chn; - /** - * @brief Scene identifier - */ - std::string _scene_id; - /** - * @brief Scene designator - */ - std::string _scene_des; - /** - * @brief Input scene centre time - */ - std::string _inp_sctim; - /** - * @brief Ascending/descending - */ - std::string _asc_des; - /** - * @brief Processed scene centre latitude - */ - double _pro_lat; - /** - * @brief Processed scene centre longitude - */ - double _pro_long; - /** - * @brief Processed scene centre headng - */ - double _pro_head; - /** - * @brief Ellipsoid designator - */ - std::string _ellip_des; - /** - * @brief Ellipsoid semi-major axis, km - */ - double _ellip_maj; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double _ellip_min; - /** - * @brief Earth's mass - */ - double _earth_mass; - /** - * @brief Gravitational constant - */ - double _grav_const; - /** - * @brief Ellipsoid J2-4 parameters - */ - double _ellip_j[3]; - - /** - * @brief Average terrain height, km - */ - double _terrain_h; - /** - * @brief Scene centre line number - */ - int _sc_lin; - /** - * @brief Scene centre pixel number - */ - int _sc_pix; - /** - * @brief Scene length, km - */ - double _scene_len; - /** - * @brief Scene width, km - */ - double _scene_wid; - - /** - * @brief Number of SAR channels - */ - double _nchn; - - /** - * @brief Mission identifier - */ - std::string _mission_id; - /** - * @brief Sensor identifier - */ - std::string _sensor_id; - /** - * @brief Orbit number - */ - std::string _orbit_num; - /** - * @brief Platform geodetic latitude - */ - double _plat_lat; - /** - * @brief Platform geodetic longitude - */ - double _plat_long; - /** - * @brief Platform heading - */ - double _plat_head; - /** - * @brief Sensor clock angle - */ - double _clock_ang; - /** - * @brief Incidence angle - */ - double _incident_ang; - - /** - * @brief Radar wave length - */ - double _wave_length; - /** - * @brief Motion compensation indicator - */ - std::string _motion_comp; - /** - * @brief Range pulse code specifier - */ - std::string _pulse_code; - /** - * @brief Range chirp coefficients - */ - double _ampl_coef[5]; - /** - * @brief Range phase coefficients - */ - double _phas_coef[5]; - /** - * @brief Chirp extraction index - */ - int _chirp_ext_ind; - - /** - * @brief Range sampling rate - */ - double _fr; - /** - * @brief Range gate start time - */ - double _rng_gate; - /** - * @brief Range pulse length - */ - double _rng_length; - /** - * @brief Baseband conversion flag - */ - std::string _baseband_f; - /** - * @brief Range compressed flag - */ - std::string _rngcmp_f; - /** - * @brief Like polarized gain - */ - double _gn_polar; - /** - * @brief Cross polarized gain - */ - double _gn_cross; - /** - * @brief Number of bits per channel - */ - int _chn_bits; - /** - * @brief Quantization descriptor - */ - std::string _quant_desc; - /** - * @brief I channel DC bias - */ - double _i_bias; - /** - * @brief Q channel DC bias - */ - double _q_bias; - /** - * @brief I/Q channel ratio - */ - double _iq_ratio; - /** - * @brief Mechanical boresight - */ - double _mech_sight; - /** - * @brief Nominal PRF, Hz - */ - double _fa; - /** - * @brief Satellite binary time - */ - std::string _sat_bintim; - /** - * @brief Satellite clock time - */ - std::string _sat_clktim; - /** - * @brief Satellite clock increment - */ - std::string _sat_clkinc; - - /** - * @brief Processing facility identifier - */ - std::string _fac_id; - /** - * @brief Processing system identifier - */ - std::string _sys_id; - /** - * @brief Processing version identifier - */ - std::string _ver_id; - /** - * @brief Product type specifier - */ - std::string _prod_type; - /** - * @brief Processing algorithm identifier - */ - std::string _algor_id; - /** - * @brief Number of azimuth looks - */ - double _n_azilok; - /** - * @brief Number of range looks - */ - double _n_rnglok; - /** - * @brief Bandwidth per look in azimuth,Hz - */ - double _bnd_azilok; - /** - * @brief Bandwidth per look in range,Hz - */ - double _bnd_rnglok; - /** - * @brief Total azimuth look bandwidth - */ - double _bnd_azi; - /** - * @brief Total range look bandwidth - */ - double _bnd_rng; - /** - * @brief Azimuth weighting designator - */ - std::string _azi_weight; - /** - * @brief Range weighting designator - */ - std::string _rng_weight; - /** - * @brief Data input source - */ - std::string _data_inpsrc; - /** - * @brief Range resolution, meter - */ - double _rng_res; - /** - * @brief Azimuth resolution, meter - */ - double _azi_res; - /** - * @brief Along track Doppler frequency terms - */ - double _alt_dopcen[3]; - /** - * @brief Cross track Doppler frequency terms - */ - double _crt_dopcen[3]; - /** - * @brief Pixel time direction indicator - */ - std::string _time_dir_pix; - /** - * @brief Line time direction indicator - */ - std::string _time_dir_lin; - /** - * @brief Along track Doppler rate term - */ - double _alt_rate[3]; - - /** - * @brief Cross track Doppler rate term - */ - double _crt_rate[3]; - - /** - * @brief Line content indicator - */ - std::string _line_cont; - /** - * @brief Clutter lock applied flag - */ - std::string _clutter_lock; - /** - * @brief Auto-focus applied flag - */ - std::string _auto_focus; - /** - * @brief Line spacing, meters - */ - double _line_spacing; - /** - * @brief Pixel spacing, meters - */ - double _pix_spacing; - /** - * @brief Range compression designator - */ - std::string _rngcmp_desg; - /** - * @brief zero doppler range time (two way) of first pixel - */ - double _zero_dop_range_time_f_pixel; - /** - * @brief zero doppler range time (two way) of mid pixel - */ - double _zero_dop_range_time_c_pixel; - /** - * @brief zero doppler range time (two way) of last pixel - */ - double _zero_dop_range_time_l_pixel ; - /** - * @brief zero doppler azimut time (UTC) of first pixel - */ - std::string _zero_dop_az_time_f_pixel ; - /** - * @brief zero doppler azimut time (UTC) of mid pixel - */ - std::string _zero_dop_az_time_c_pixel; - /** - * @brief zero doppler azimut time (UTC) of last pixel - */ - std::string _zero_dop_az_time_l_pixel; - -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h deleted file mode 100644 index 9e616d764c..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h +++ /dev/null @@ -1,1795 +0,0 @@ -#ifndef ErsSarFacilityData_h -#define ErsSarFacilityData_h - -#include <iostream> -#include <cstdlib> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -/** - * @ingroup ErsSarFacilityDataRecord - * @brief This class is able to read the SAR leader data set summary record of the leader file - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarFacilityData : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarFacilityData(); - - /** - * @brief Destructor - */ - ~ErsSarFacilityData(); - - /** - * @brief This function write the ErsSarFacilityData in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarFacilityData& data); - - /** - * @brief This function read a ErsSarFacilityData from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarFacilityData& data); - - /** - * @brief Copy constructor - */ - ErsSarFacilityData(const ErsSarFacilityData& rhs); - - /** - * @brief Copy operator - */ - ErsSarFacilityData& operator=(const ErsSarFacilityData& rhs); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarFacilityData(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarFacilityData(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - - /** - * @brief name_of_facil_rec - */ - std::string get_name_of_facil_rec() - { - return _name_of_facil_rec; - }; - - /** - * @brief last_release_qc_date - */ - std::string get_last_release_qc_date() - { - return _last_release_qc_date; - }; - /** - * @brief last_release_cal_date - */ - std::string get_last_release_cal_date() - { - return _last_release_cal_date; - }; - /** - * @brief qa_summary_flag - */ - int get_qa_summary_flag() - { - return _qa_summary_flag; - }; - /** - * @brief prf_code_change_flag - */ - int get_prf_code_change_flag() - { - return _prf_code_change_flag; - }; - /** - * @brief sampling_win_change_flag - */ - int get_sampling_win_change_flag() - { - return _sampling_win_change_flag; - }; - /** - * @brief cal_gain_change_flag - */ - int get_cal_gain_change_flag() - { - return _cal_gain_change_flag; - }; - /** - * @brief quirp_qu_flag - */ - int get_quirp_qu_flag() - { - return _quirp_qu_flag; - }; - /** - * @brief inp_data_stat_flag - */ - int get_inp_data_stat_flag() - { - return _inp_data_stat_flag; - }; - /** - * @brief dopp_cent_conf_meas_flag - */ - int get_dopp_cent_conf_meas_flag() - { - return _dopp_cent_conf_meas_flag; - }; - /** - * @brief dopp_cent_val_flag - */ - int get_dopp_cent_val_flag() - { - return _dopp_cent_val_flag; - }; - /** - * @brief dopp_ambig_conf_meas_flag - */ - int get_dopp_ambig_conf_meas_flag() - { - return _dopp_ambig_conf_meas_flag; - }; - /** - * @brief outp_data_mean_flag - */ - int get_outp_data_mean_flag() - { - return _outp_data_mean_flag; - }; - /** - * @brief OGOB_flag - */ - int get_OGOB_flag() - { - return _OGOB_flag; - }; - /** - * @brief PRF_changes - */ - int get_PRF_changes() - { - return _PRF_changes; - }; - /** - * @brief sampling_win_changes - */ - int get_sampling_win_changes() - { - return _sampling_win_changes; - }; - /** - * @brief cal_gain_changes - */ - int get_cal_gain_changes() - { - return _cal_gain_changes; - }; - /** - * @brief missing_lines - */ - int get_missing_lines() - { - return _missing_lines; - }; - /** - * @brief rec_gain_changes - */ - int get_rec_gain_changes() - { - return _rec_gain_changes; - }; - /** - * @brief pulse_width_of_ACF_3db - */ - double get_pulse_width_of_ACF_3db() - { - return _pulse_width_of_ACF_3db; - }; - /** - * @brief first_side_lobe_lev_of_ACF - */ - double get_first_side_lobe_lev_of_ACF() - { - return _first_side_lobe_lev_of_ACF; - }; - /** - * @brief ISLR_of_ACF - */ - double get_ISLR_of_ACF() - { - return _ISLR_of_ACF; - }; - /** - * @brief dopp_cent_conf_meas - */ - double get_dopp_cent_conf_meas() - { - return _dopp_cent_conf_meas; - }; - /** - * @brief dopp_ambig_conf_meas - */ - double get_dopp_ambig_conf_meas() - { - return _dopp_ambig_conf_meas; - }; - /** - * @brief inp_data_I_mean - */ - double get_inp_data_I_mean() - { - return _inp_data_I_mean; - }; - /** - * @brief inp_data_Q_mean - */ - double get_inp_data_Q_mean() - { - return _inp_data_Q_mean; - }; - /** - * @brief inp_data_I_stddev - */ - double get_inp_data_I_stddev() - { - return _inp_data_I_stddev; - }; - /** - * @brief inp_data_Q_stddev - */ - double get_inp_data_Q_stddev() - { - return _inp_data_Q_stddev; - }; - /** - * @brief cal_sys_gain - */ - double get_cal_sys_gain() - { - return _cal_sys_gain; - }; - /** - * @brief first_rec_gain_read - */ - double get_first_rec_gain_read() - { - return _first_rec_gain_read; - }; - /** - * @brief dopp_ambig_num - */ - double get_dopp_ambig_num() - { - return _dopp_ambig_num; - }; - /** - * @brief I_channel_bias_correction - */ - double get_I_channel_bias_correction() - { - return _I_channel_bias_correction; - }; - /** - * @brief Q_channel_bias_correction - */ - double get_Q_channel_bias_correction() - { - return _Q_channel_bias_correction; - }; - /** - * @brief I_channel_gain_correction - */ - double get_I_channel_gain_correction() - { - return _I_channel_gain_correction; - }; - /** - * @brief Q_channel_gain_correction - */ - double get_Q_channel_gain_correction() - { - return _Q_channel_gain_correction; - }; - /** - * @brief Q_channel_I_Q_correction - */ - double get_Q_channel_I_Q_correction() - { - return _Q_channel_I_Q_correction; - }; - /** - * @brief noise_power - */ - double get_noise_power() - { - return _noise_power; - }; - /** - * @brief int_cal_utc - */ - int get_int_cal_utc() - { - return _int_cal_utc; - }; - /** - * @brief num_valid_cal_pulses - */ - int get_num_valid_cal_pulses() - { - return _num_valid_cal_pulses; - }; - /** - * @brief num_valid_noise_pulses - */ - int get_num_valid_noise_pulses() - { - return _num_valid_noise_pulses; - }; - /** - * @brief num_valid_replicas - */ - int get_num_valid_replicas() - { - return _num_valid_replicas; - }; - /** - * @brief first_replica_sample - */ - double get_first_replica_sample() - { - return _first_replica_sample; - }; - /** - * @brief mean_cal_pulse_power - */ - double get_mean_cal_pulse_power() - { - return _mean_cal_pulse_power; - }; - /** - * @brief mean_noise_power - */ - double get_mean_noise_power() - { - return _mean_noise_power; - }; - /** - * @brief range_comp_norm_fact - */ - double get_range_comp_norm_fact() - { - return _range_comp_norm_fact; - }; - /** - * @brief replica_power - */ - double get_replica_power() - { - return _replica_power; - }; - /** - * @brief first_range_pixel_mid_az_inc - */ - double get_first_range_pixel_mid_az_inc() - { - return _first_range_pixel_mid_az_inc; - }; - /** - * @brief center_range_pix_mid_az_inc - */ - double get_center_range_pix_mid_az_inc() - { - return _center_range_pix_mid_az_inc; - }; - /** - * @brief last_range_pix_mid_az_inc - */ - double get_last_range_pix_mid_az_inc() - { - return _last_range_pix_mid_az_inc; - }; - /** - * @brief norm_ref_range_ro - */ - double get_norm_ref_range_ro() - { - return _norm_ref_range_ro; - }; - /** - * @brief antenna_elev_flag - */ - int get_antenna_elev_flag() - { - return _antenna_elev_flag; - }; - /** - * @brief abs_cal_const_K - */ - double get_abs_cal_const_K() - { - return _abs_cal_const_K; - }; - /** - * @brief upp_bound_K - */ - double get_upp_bound_K() - { - return _upp_bound_K; - }; - /** - * @brief low_bound_K - */ - double get_low_bound_K() - { - return _low_bound_K; - }; - /** - * @brief proc_noise_scale_fact - */ - double get_proc_noise_scale_fact() - { - return _proc_noise_scale_fact; - }; - /** - * @brief K_gen_date - */ - std::string get_K_gen_date() - { - return _K_gen_date; - }; - /** - * @brief K_vers_num - */ - std::string get_K_vers_num() - { - return _K_vers_num; - }; - /** - * @brief num_duplic_input_lines - */ - int get_num_duplic_input_lines() - { - return _num_duplic_input_lines; - }; - /** - * @brief estim_bit_error_rate - */ - double get_estim_bit_error_rate() - { - return _estim_bit_error_rate; - }; - /** - * @brief out_image_mean - */ - double get_out_image_mean() - { - return _out_image_mean; - }; - /** - * @brief out_image_std_dev - */ - double get_out_image_std_dev() - { - return _out_image_std_dev; - }; - /** - * @brief out_image_max_value - */ - double get_out_image_max_value() - { - return _out_image_max_value; - }; - /** - * @brief time_raw_data_first_input - */ - std::string get_time_raw_data_first_input() - { - return _time_raw_data_first_input; - }; - /** - * @brief time_asc_node_state_vectors - */ - std::string get_time_asc_node_state_vectors() - { - return _time_asc_node_state_vectors; - }; - /** - * @brief asc_node_pos_X_comp - */ - std::string get_asc_node_pos_X_comp() - { - return _asc_node_pos_X_comp; - }; - /** - * @brief asc_node_pos_Y_comp - */ - std::string get_asc_node_pos_Y_comp() - { - return _asc_node_pos_Y_comp; - }; - /** - * @brief asc_node_pos_Z_comp - */ - std::string get_asc_node_pos_Z_comp() - { - return _asc_node_pos_Z_comp; - }; - /** - * @brief asc_node_vel_X_comp - */ - std::string get_asc_node_vel_X_comp() - { - return _asc_node_vel_X_comp; - }; - /** - * @brief asc_node_vel_Y_comp - */ - std::string get_asc_node_vel_Y_comp() - { - return _asc_node_vel_Y_comp; - }; - /** - * @brief asc_node_vel_Z_comp - */ - std::string get_asc_node_vel_Z_comp() - { - return _asc_node_vel_Z_comp; - }; - /** - * @brief out_pixel_bit_length - */ - int get_out_pixel_bit_length() - { - return _out_pixel_bit_length; - }; - /** - * @brief proc_gain_param_1 - */ - double get_proc_gain_param_1() - { - return _proc_gain_param_1; - }; - /** - * @brief proc_gain_param_2 - */ - double get_proc_gain_param_2() - { - return _proc_gain_param_2; - }; - /** - * @brief proc_gain_param_3 - */ - double get_proc_gain_param_3() - { - return _proc_gain_param_3; - }; - /** - * @brief peak_loc_cross_correl_fun - */ - int get_peak_loc_cross_correl_fun() - { - return _peak_loc_cross_correl_fun; - }; - /** - * @brief 3_dB_width_CCF - */ - double get_3_dB_width_CCF() - { - return _3_dB_width_CCF; - }; - /** - * @brief first_side_lobe_level - */ - double get_first_side_lobe_level() - { - return _first_side_lobe_level; - }; - /** - * @brief ISLR_CCF_between_last - */ - double get_ISLR_CCF_between_last() - { - return _ISLR_CCF_between_last; - }; - /** - * @brief peak_loc_CCF_betw_last - */ - int get_peak_loc_CCF_betw_last() - { - return _peak_loc_CCF_betw_last; - }; - /** - * @brief Roll_Tilt_Mode_flag - */ - int get_Roll_Tilt_Mode_flag() - { - return _Roll_Tilt_Mode_flag; - }; - /** - * @brief raw_data_correction_flag - */ - int get_raw_data_correction_flag() - { - return _raw_data_correction_flag; - }; - /** - * @brief look_detecion_flag - */ - int get_look_detecion_flag() - { - return _look_detecion_flag; - }; - /** - * @brief doppler_ambiguity_estimat_flag - */ - int get_doppler_ambiguity_estimat_flag() - { - return _doppler_ambiguity_estimat_flag; - }; - /** - * @brief azimuth_baseband_convers_flag - */ - int get_azimuth_baseband_convers_flag() - { - return _azimuth_baseband_convers_flag; - }; - /** - * @brief samples_per_line_used - */ - int get_samples_per_line_used() - { - return _samples_per_line_used; - }; - /** - * @brief range_lines_skip_factor - */ - int get_range_lines_skip_factor() - { - return _range_lines_skip_factor; - }; - /** - * @brief time_of_inp_state_vectors - */ - std::string get_time_of_inp_state_vectors() - { - return _time_of_inp_state_vectors; - }; - /** - * @brief inp_state_vect_pos_X_comp - */ - std::string get_inp_state_vect_pos_X_comp() - { - return _inp_state_vect_pos_X_comp; - }; - /** - * @brief inp_state_vect_pos_Y_comp - */ - std::string get_inp_state_vect_pos_Y_comp() - { - return _inp_state_vect_pos_Y_comp; - }; - /** - * @brief inp_state_vect_pos_Z_comp - */ - std::string get_inp_state_vect_pos_Z_comp() - { - return _inp_state_vect_pos_Z_comp; - }; - /** - * @brief inp_state_vect_vel_Vx_comp - */ - std::string get_inp_state_vect_vel_Vx_comp() - { - return _inp_state_vect_vel_Vx_comp; - }; - /** - * @brief inp_state_vect_vel_Vy_comp - */ - std::string get_inp_state_vect_vel_Vy_comp() - { - return _inp_state_vect_vel_Vy_comp; - }; - /** - * @brief inp_state_vect_vel_Vz_comp - */ - std::string get_inp_state_vect_vel_Vz_comp() - { - return _inp_state_vect_vel_Vz_comp; - }; - /** - * @brief inp_state_vector_type_flag - */ - int get_inp_state_vector_type_flag() - { - return _inp_state_vector_type_flag; - }; - /** - * @brief win_coeff_for_range_match - */ - double get_win_coeff_for_range_match() - { - return _win_coeff_for_range_match; - }; - /** - * @brief win_coeff_for_azi_match - */ - double get_win_coeff_for_azi_match() - { - return _win_coeff_for_azi_match; - }; - /** - * @brief update_period_range_match - */ - int get_update_period_range_match() - { - return _update_period_range_match; - }; - /** - * @brief look_scalar_gain_1 - */ - double get_look_scalar_gain_1() - { - return _look_scalar_gain_1; - }; - /** - * @brief look_scalar_gain_2 - */ - double get_look_scalar_gain_2() - { - return _look_scalar_gain_2; - }; - /** - * @brief look_scalar_gain_3 - */ - double get_look_scalar_gain_3() - { - return _look_scalar_gain_3; - }; - /** - * @brief look_scalar_gain_4 - */ - double get_look_scalar_gain_4() - { - return _look_scalar_gain_4; - }; - /** - * @brief look_scalar_gain_5 - */ - double get_look_scalar_gain_5() - { - return _look_scalar_gain_5; - }; - /** - * @brief look_scalar_gain_6 - */ - double get_look_scalar_gain_6() - { - return _look_scalar_gain_6; - }; - /** - * @brief look_scalar_gain_7 - */ - double get_look_scalar_gain_7() - { - return _look_scalar_gain_7; - }; - /** - * @brief look_scalar_gain_8 - */ - double get_look_scalar_gain_8() - { - return _look_scalar_gain_8; - }; - /** - * @brief samp_window_start_time_bias - */ - int get_samp_window_start_time_bias() - { - return _samp_window_start_time_bias; - }; - /** - * @brief doppler_centroid_cubic_coeff - */ - double get_doppler_centroid_cubic_coeff() - { - return _doppler_centroid_cubic_coeff; - }; - /** - * @brief PRF_code_first_range_line - */ - int get_PRF_code_first_range_line() - { - return _PRF_code_first_range_line; - }; - /** - * @brief PRF_code_last_range_line - */ - int get_PRF_code_last_range_line() - { - return _PRF_code_last_range_line; - }; - /** - * @brief samp_win_start_first - */ - int get_samp_win_start_first() - { - return _samp_win_start_first; - }; - /** - * @brief samp_win_start_last - */ - int get_samp_win_start_last() - { - return _samp_win_start_last; - }; - /** - * @brief cal_syst_gain_last_proc - */ - int get_cal_syst_gain_last_proc() - { - return _cal_syst_gain_last_proc; - }; - /** - * @brief receiver_gain_last_proc - */ - int get_receiver_gain_last_proc() - { - return _receiver_gain_last_proc; - }; - /** - * @brief first_processed_range_sample - */ - int get_first_processed_range_sample() - { - return _first_processed_range_sample; - }; - /** - * @brief azimuth_FFT_IFFT_ratio - */ - int get_azimuth_FFT_IFFT_ratio() - { - return _azimuth_FFT_IFFT_ratio; - }; - /** - * @brief num_azimuth_blocks_proc - */ - int get_num_azimuth_blocks_proc() - { - return _num_azimuth_blocks_proc; - }; - /** - * @brief num_input_raw_data_lines - */ - int get_num_input_raw_data_lines() - { - return _num_input_raw_data_lines; - }; - /** - * @brief initial_doppler_ambiguity_num - */ - int get_initial_doppler_ambiguity_num() - { - return _initial_doppler_ambiguity_num; - }; - /** - * @brief thresh_no_1_flag - */ - double get_thresh_no_1_flag() - { - return _thresh_no_1_flag; - }; - /** - * @brief thresh_no_2_flag - */ - double get_thresh_no_2_flag() - { - return _thresh_no_2_flag; - }; - /** - * @brief thresh_no_3_flag - */ - double get_thresh_no_3_flag() - { - return _thresh_no_3_flag; - }; - /** - * @brief thresh_no_4_flag - */ - double get_thresh_no_4_flag() - { - return _thresh_no_4_flag; - }; - /** - * @brief thresh_no_5_flag - */ - double get_thresh_no_5_flag() - { - return _thresh_no_5_flag; - }; - /** - * @brief thresh_no_6_flag - */ - double get_thresh_no_6_flag() - { - return _thresh_no_6_flag; - }; - /** - * @brief thresh_no_7_flag - */ - double get_thresh_no_7_flag() - { - return _thresh_no_7_flag; - }; - /** - * @brief thresh_no_8_flag - */ - double get_thresh_no_8_flag() - { - return _thresh_no_8_flag; - }; - /** - * @brief thresh_no_9_flag - */ - double get_thresh_no_9_flag() - { - return _thresh_no_9_flag; - }; - /** - * @brief thresh_no_10_flag - */ - double get_thresh_no_10_flag() - { - return _thresh_no_10_flag; - }; - /** - * @brief thresh_no_11_flag - */ - double get_thresh_no_11_flag() - { - return _thresh_no_11_flag; - }; - /** - * @brief sat_binary_time_of_first - */ - int get_sat_binary_time_of_first() - { - return _sat_binary_time_of_first; - }; - /** - * @brief num_valid_pixels_per_range - */ - int get_num_valid_pixels_per_range() - { - return _num_valid_pixels_per_range; - }; - /** - * @brief num_range_samp_discarded - */ - int get_num_range_samp_discarded() - { - return _num_range_samp_discarded; - }; - /** - * @brief I_gain_imb_lower_bound - */ - double get_I_gain_imb_lower_bound() - { - return _I_gain_imb_lower_bound; - }; - /** - * @brief I_gain_imb_upper_bound - */ - double get_I_gain_imb_upper_bound() - { - return _I_gain_imb_upper_bound; - }; - /** - * @brief I_Q_quad_depar_lower_bound - */ - double get_I_Q_quad_depar_lower_bound() - { - return _I_Q_quad_depar_lower_bound; - }; - /** - * @brief I_Q_quad_depar_upper_bound - */ - double get_I_Q_quad_depar_upper_bound() - { - return _I_Q_quad_depar_upper_bound; - }; - /** - * @brief 3_dB_look_bandwidth - */ - double get_3_dB_look_bandwidth() - { - return _3_dB_look_bandwidth; - }; - /** - * @brief 3_dB_look_proc_dopp_bandw - */ - double get_3_dB_look_proc_dopp_bandw() - { - return _3_dB_look_proc_dopp_bandw; - }; - /** - * @brief range_spread_loss_comp_flag - */ - int get_range_spread_loss_comp_flag() - { - return _range_spread_loss_comp_flag; - }; - /** - * @brief datation_flag - */ - bool get_datation_flag() - { - return _datation_flag; - }; - /** - * @brief max_error_range_line_timing - */ - int get_max_error_range_line_timing() - { - return _max_error_range_line_timing; - }; - /** - * @brief form_num_range_line_used - */ - int get_form_num_range_line_used() - { - return _form_num_range_line_used; - }; - /** - * @brief autom_look_scal_gain_flag - */ - bool get_autom_look_scal_gain_flag() - { - return _autom_look_scal_gain_flag; - }; - /** - * @brief max_value_look_scalar_gain - */ - int get_max_value_look_scalar_gain() - { - return _max_value_look_scalar_gain; - }; - /** - * @brief replica_norm_method_flag - */ - int get_replica_norm_method_flag() - { - return _replica_norm_method_flag; - }; - /** - * @brief coef_ground_range_1 - */ - double get_coef_ground_range_1() - { - return _coef_ground_range_1; - }; - /** - * @brief coef_ground_range_2 - */ - double get_coef_ground_range_2() - { - return _coef_ground_range_2; - }; - /** - * @brief coef_ground_range_3 - */ - double get_coef_ground_range_3() - { - return _coef_ground_range_3; - }; - /** - * @brief coef_ground_range_4 - */ - double get_coef_ground_range_4() - { - return _coef_ground_range_4; - }; - /** - * @brief coef_ant_elev_1 - */ - double get_coef_ant_elev_1() - { - return _coef_ant_elev_1; - }; - /** - * @brief coef_ant_elev_2 - */ - double get_coef_ant_elev_2() - { - return _coef_ant_elev_2; - }; - /** - * @brief coef_ant_elev_3 - */ - double get_coef_ant_elev_3() - { - return _coef_ant_elev_3; - }; - /** - * @brief coef_ant_elev_4 - */ - double get_coef_ant_elev_4() - { - return _coef_ant_elev_4; - }; - /** - * @brief coef_ant_elev_5 - */ - double get_coef_ant_elev_5() - { - return _coef_ant_elev_5; - }; - /** - * @brief range_time_origin_ant - */ - double get_range_time_origin_ant() - { - return _range_time_origin_ant; - }; - - -protected: - - /** - * @brief last_release_qc_date - */ - std::string _name_of_facil_rec; - /** - * @brief last_release_qc_date - */ - std::string _last_release_qc_date; - /** - * @brief last_release_cal_date - */ - std::string _last_release_cal_date; - /** - * @brief qa_summary_flag - */ - int _qa_summary_flag; - /** - * @brief prf_code_change_flag - */ - int _prf_code_change_flag; - /** - * @brief sampling_win_change_flag - */ - int _sampling_win_change_flag; - /** - * @brief cal_gain_change_flag - */ - int _cal_gain_change_flag; - /** - * @brief quirp_qu_flag - */ - int _quirp_qu_flag; - /** - * @brief inp_data_stat_flag - */ - int _inp_data_stat_flag; - /** - * @brief dopp_cent_conf_meas_flag - */ - int _dopp_cent_conf_meas_flag; - /** - * @brief dopp_cent_val_flag - */ - int _dopp_cent_val_flag; - /** - * @brief dopp_ambig_conf_meas_flag - */ - int _dopp_ambig_conf_meas_flag; - /** - * @brief outp_data_mean_flag - */ - int _outp_data_mean_flag; - /** - * @brief OGOB_flag - */ - int _OGOB_flag; - /** - * @brief PRF_changes - */ - int _PRF_changes; - /** - * @brief sampling_win_changes - */ - int _sampling_win_changes; - /** - * @brief cal_gain_changes - */ - int _cal_gain_changes; - /** - * @brief missing_lines - */ - int _missing_lines; - /** - * @brief rec_gain_changes - */ - int _rec_gain_changes; - /** - * @brief pulse_width_of_ACF_3db - */ - double _pulse_width_of_ACF_3db; - /** - * @brief first_side_lobe_lev_of_ACF - */ - double _first_side_lobe_lev_of_ACF; - /** - * @brief ISLR_of_ACF - */ - double _ISLR_of_ACF; - /** - * @brief dopp_cent_conf_meas - */ - double _dopp_cent_conf_meas; - /** - * @brief dopp_ambig_conf_meas - */ - double _dopp_ambig_conf_meas; - /** - * @brief inp_data_I_mean - */ - double _inp_data_I_mean; - /** - * @brief inp_data_Q_mean - */ - double _inp_data_Q_mean; - /** - * @brief inp_data_I_stddev - */ - double _inp_data_I_stddev; - /** - * @brief inp_data_Q_stddev - */ - double _inp_data_Q_stddev; - /** - * @brief cal_sys_gain - */ - double _cal_sys_gain; - /** - * @brief first_rec_gain_read - */ - double _first_rec_gain_read; - /** - * @brief dopp_ambig_num - */ - double _dopp_ambig_num; - /** - * @brief I_channel_bias_correction - */ - double _I_channel_bias_correction; - /** - * @brief Q_channel_bias_correction - */ - double _Q_channel_bias_correction; - /** - * @brief I_channel_gain_correction - */ - double _I_channel_gain_correction; - /** - * @brief Q_channel_gain_correction - */ - double _Q_channel_gain_correction; - /** - * @brief Q_channel_I_Q_correction - */ - double _Q_channel_I_Q_correction; - /** - * @brief noise_power - */ - double _noise_power; - /** - * @brief int_cal_utc - */ - int _int_cal_utc; - /** - * @brief num_valid_cal_pulses - */ - int _num_valid_cal_pulses; - /** - * @brief num_valid_noise_pulses - */ - int _num_valid_noise_pulses; - /** - * @brief num_valid_replicas - */ - int _num_valid_replicas; - /** - * @brief first_replica_sample - */ - double _first_replica_sample; - /** - * @brief mean_cal_pulse_power - */ - double _mean_cal_pulse_power; - /** - * @brief mean_noise_power - */ - double _mean_noise_power; - /** - * @brief range_comp_norm_fact - */ - double _range_comp_norm_fact; - /** - * @brief replica_power - */ - double _replica_power; - /** - * @brief first_range_pixel_mid_az_inc - */ - double _first_range_pixel_mid_az_inc; - /** - * @brief center_range_pix_mid_az_inc - */ - double _center_range_pix_mid_az_inc; - /** - * @brief last_range_pix_mid_az_inc - */ - double _last_range_pix_mid_az_inc; - /** - * @brief norm_ref_range_ro - */ - double _norm_ref_range_ro; - /** - * @brief antenna_elev_flag - */ - int _antenna_elev_flag; - /** - * @brief abs_cal_const_K - */ - double _abs_cal_const_K; - /** - * @brief upp_bound_K - */ - double _upp_bound_K; - /** - * @brief low_bound_K - */ - double _low_bound_K; - /** - * @brief proc_noise_scale_fact - */ - double _proc_noise_scale_fact; - /** - * @brief K_gen_date - */ - std::string _K_gen_date; - /** - * @brief K_vers_num - */ - std::string _K_vers_num; - /** - * @brief num_duplic_input_lines - */ - int _num_duplic_input_lines; - /** - * @brief estim_bit_error_rate - */ - double _estim_bit_error_rate; - /** - * @brief out_image_mean - */ - double _out_image_mean; - /** - * @brief out_image_std_dev - */ - double _out_image_std_dev; - /** - * @brief out_image_max_value - */ - double _out_image_max_value; - /** - * @brief time_raw_data_first_input - */ - std::string _time_raw_data_first_input; - /** - * @brief time_asc_node_state_vectors - */ - std::string _time_asc_node_state_vectors; - /** - * @brief asc_node_pos_X_comp - */ - std::string _asc_node_pos_X_comp; - /** - * @brief asc_node_pos_Y_comp - */ - std::string _asc_node_pos_Y_comp; - /** - * @brief asc_node_pos_Z_comp - */ - std::string _asc_node_pos_Z_comp; - /** - * @brief asc_node_vel_X_comp - */ - std::string _asc_node_vel_X_comp; - /** - * @brief asc_node_vel_Y_comp - */ - std::string _asc_node_vel_Y_comp; - /** - * @brief asc_node_vel_Z_comp - */ - std::string _asc_node_vel_Z_comp; - /** - * @brief out_pixel_bit_length - */ - int _out_pixel_bit_length; - /** - * @brief proc_gain_param_1 - */ - double _proc_gain_param_1; - /** - * @brief proc_gain_param_2 - */ - double _proc_gain_param_2; - /** - * @brief proc_gain_param_3 - */ - double _proc_gain_param_3; - /** - * @brief peak_loc_cross_correl_fun - */ - int _peak_loc_cross_correl_fun; - /** - * @brief 3_dB_width_CCF - */ - double _3_dB_width_CCF; - /** - * @brief first_side_lobe_level - */ - double _first_side_lobe_level; - /** - * @brief ISLR_CCF_between_last - */ - double _ISLR_CCF_between_last; - /** - * @brief peak_loc_CCF_betw_last - */ - int _peak_loc_CCF_betw_last; - /** - * @brief Roll_Tilt_Mode_flag - */ - int _Roll_Tilt_Mode_flag; - /** - * @brief raw_data_correction_flag - */ - int _raw_data_correction_flag; - /** - * @brief look_detecion_flag - */ - int _look_detecion_flag; - /** - * @brief doppler_ambiguity_estimat_flag - */ - int _doppler_ambiguity_estimat_flag; - /** - * @brief azimuth_baseband_convers_flag - */ - int _azimuth_baseband_convers_flag; - /** - * @brief samples_per_line_used - */ - int _samples_per_line_used; - /** - * @brief range_lines_skip_factor - */ - int _range_lines_skip_factor; - /** - * @brief time_of_inp_state_vectors - */ - std::string _time_of_inp_state_vectors; - /** - * @brief inp_state_vect_pos_X_comp - */ - std::string _inp_state_vect_pos_X_comp; - /** - * @brief inp_state_vect_pos_Y_comp - */ - std::string _inp_state_vect_pos_Y_comp; - /** - * @brief inp_state_vect_pos_Z_comp - */ - std::string _inp_state_vect_pos_Z_comp; - /** - * @brief inp_state_vect_vel_Vx_comp - */ - std::string _inp_state_vect_vel_Vx_comp; - /** - * @brief inp_state_vect_vel_Vy_comp - */ - std::string _inp_state_vect_vel_Vy_comp; - /** - * @brief inp_state_vect_vel_Vz_comp - */ - std::string _inp_state_vect_vel_Vz_comp; - /** - * @brief inp_state_vector_type_flag - */ - int _inp_state_vector_type_flag; - /** - * @brief win_coeff_for_range_match - */ - double _win_coeff_for_range_match; - /** - * @brief win_coeff_for_azi_match - */ - double _win_coeff_for_azi_match; - /** - * @brief update_period_range_match - */ - int _update_period_range_match; - /** - * @brief look_scalar_gain_1 - */ - double _look_scalar_gain_1; - /** - * @brief look_scalar_gain_2 - */ - double _look_scalar_gain_2; - /** - * @brief look_scalar_gain_3 - */ - double _look_scalar_gain_3; - /** - * @brief look_scalar_gain_4 - */ - double _look_scalar_gain_4; - /** - * @brief look_scalar_gain_5 - */ - double _look_scalar_gain_5; - /** - * @brief look_scalar_gain_6 - */ - double _look_scalar_gain_6; - /** - * @brief look_scalar_gain_7 - */ - double _look_scalar_gain_7; - /** - * @brief look_scalar_gain_8 - */ - double _look_scalar_gain_8; - /** - * @brief samp_window_start_time_bias - */ - int _samp_window_start_time_bias; - /** - * @brief doppler_centroid_cubic_coeff - */ - double _doppler_centroid_cubic_coeff; - /** - * @brief PRF_code_first_range_line - */ - int _PRF_code_first_range_line; - /** - * @brief PRF_code_last_range_line - */ - int _PRF_code_last_range_line; - /** - * @brief samp_win_start_first - */ - int _samp_win_start_first; - /** - * @brief samp_win_start_last - */ - int _samp_win_start_last; - /** - * @brief cal_syst_gain_last_proc - */ - int _cal_syst_gain_last_proc; - /** - * @brief receiver_gain_last_proc - */ - int _receiver_gain_last_proc; - /** - * @brief first_processed_range_sample - */ - int _first_processed_range_sample; - /** - * @brief azimuth_FFT_IFFT_ratio - */ - int _azimuth_FFT_IFFT_ratio; - /** - * @brief num_azimuth_blocks_proc - */ - int _num_azimuth_blocks_proc; - /** - * @brief num_input_raw_data_lines - */ - int _num_input_raw_data_lines; - /** - * @brief initial_doppler_ambiguity_num - */ - int _initial_doppler_ambiguity_num; - /** - * @brief thresh_no_1_flag - */ - double _thresh_no_1_flag; - /** - * @brief thresh_no_2_flag - */ - double _thresh_no_2_flag; - /** - * @brief thresh_no_3_flag - */ - double _thresh_no_3_flag; - /** - * @brief thresh_no_4_flag - */ - double _thresh_no_4_flag; - /** - * @brief thresh_no_5_flag - */ - double _thresh_no_5_flag; - /** - * @brief thresh_no_6_flag - */ - double _thresh_no_6_flag; - /** - * @brief thresh_no_7_flag - */ - double _thresh_no_7_flag; - /** - * @brief thresh_no_8_flag - */ - double _thresh_no_8_flag; - /** - * @brief thresh_no_9_flag - */ - double _thresh_no_9_flag; - /** - * @brief thresh_no_10_flag - */ - double _thresh_no_10_flag; - /** - * @brief thresh_no_11_flag - */ - double _thresh_no_11_flag; - /** - * @brief sat_binary_time_of_first - */ - int _sat_binary_time_of_first; - /** - * @brief num_valid_pixels_per_range - */ - int _num_valid_pixels_per_range; - /** - * @brief num_range_samp_discarded - */ - int _num_range_samp_discarded; - /** - * @brief I_gain_imb_lower_bound - */ - double _I_gain_imb_lower_bound; - /** - * @brief I_gain_imb_upper_bound - */ - double _I_gain_imb_upper_bound; - /** - * @brief I_Q_quad_depar_lower_bound - */ - double _I_Q_quad_depar_lower_bound; - /** - * @brief I_Q_quad_depar_upper_bound - */ - double _I_Q_quad_depar_upper_bound; - /** - * @brief 3_dB_look_bandwidth - */ - double _3_dB_look_bandwidth; - /** - * @brief 3_dB_look_proc_dopp_bandw - */ - double _3_dB_look_proc_dopp_bandw; - /** - * @brief range_spread_loss_comp_flag - */ - int _range_spread_loss_comp_flag; - /** - * @brief datation_flag - */ - bool _datation_flag; - /** - * @brief max_error_range_line_timing - */ - int _max_error_range_line_timing; - /** - * @brief form_num_range_line_used - */ - int _form_num_range_line_used; - /** - * @brief autom_look_scal_gain_flag - */ - bool _autom_look_scal_gain_flag; - /** - * @brief max_value_look_scalar_gain - */ - int _max_value_look_scalar_gain; - /** - * @brief replica_norm_method_flag - */ - int _replica_norm_method_flag; - /** - * @brief coef_ground_range_1 - */ - double _coef_ground_range_1; - /** - * @brief coef_ground_range_2 - */ - double _coef_ground_range_2; - /** - * @brief coef_ground_range_3 - */ - double _coef_ground_range_3; - /** - * @brief coef_ground_range_4 - */ - double _coef_ground_range_4; - /** - * @brief coef_ant_elev_1 - */ - double _coef_ant_elev_1; - /** - * @brief coef_ant_elev_2 - */ - double _coef_ant_elev_2; - /** - * @brief coef_ant_elev_3 - */ - double _coef_ant_elev_3; - /** - * @brief coef_ant_elev_4 - */ - double _coef_ant_elev_4; - /** - * @brief coef_ant_elev_5 - */ - double _coef_ant_elev_5; - /** - * @brief range_time_origin_ant - */ - double _range_time_origin_ant; - -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h deleted file mode 100644 index 089ec32b51..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h +++ /dev/null @@ -1,619 +0,0 @@ -#ifndef ErsSarFileDescriptor_h -#define ErsSarFileDescriptor_h - - -#include<iostream> -#include <cstdlib> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -/** - * @ingroup SARLeaderErsSarFileDescriptorRecord - * @brief This class is able to read the SAR leader file descriptor record of the leader file - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarFileDescriptor : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarFileDescriptor(); - /** - * @brief Destructor - */ - ~ErsSarFileDescriptor(); - - /** - * @brief This function write the ErsSarFileDescriptor in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarFileDescriptor& data); - - /** - * @brief This function read a ErsSarFileDescriptor from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarFileDescriptor& data); - - /** - * @brief Copy constructor - */ - ErsSarFileDescriptor(const ErsSarFileDescriptor& rhs); - - /** - * @brief Copy operator - */ - ErsSarFileDescriptor& operator=(const ErsSarFileDescriptor& rhs); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarFileDescriptor(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarFileDescriptor(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - - /** - * @brief ASCII flag - */ - std::string get_ascii_flag() - { - return _ascii_flag; - }; - - /** - * @brief Format control documentation - */ - std::string get_format_doc() - { - return _format_doc; - }; - /** - * @brief Format doc version - */ - std::string get_format_ver() - { - return _format_ver; - }; - /** - * @brief Format doc revision - */ - std::string get_design_rev() - { - return _design_rev; - }; - /** - * @brief Software identifier - */ - std::string get_software_id() - { - return _software_id; - }; - /** - * @brief File number - */ - int get_file_num() - { - return _file_num ; - }; - /** - * @brief File name - */ - std::string get_file_name() - { - return _file_name; - }; - /** - * @brief Record sequence/location flag - */ - std::string get_rec_seq() - { - return _rec_seq; - }; - /** - * @brief Sequence number location - */ - int get_seq_loc() - { - return _seq_loc; - }; - /** - * @brief Sequence number lenght - */ - int get_seq_len() - { - return _seq_len; - }; - /** - * @brief Record code/location flag - */ - std::string get_rec_code() - { - return _rec_code; - }; - /** - * @brief Record code location - */ - int get_code_loc() - { - return _code_loc; - }; - /** - * @brief Record code length - */ - int get_code_len() - { - return _code_len; - }; - /** - * @brief Record length/location flag - */ - std::string get_rec_len() - { - return _rec_len; - }; - /** - * @brief Record lenght location - */ - int get_rlen_loc() - { - return _rlen_loc; - }; - /** - * @brief Record length, bytes - */ - int get_rlen_len() - { - return _rlen_len; - }; - /** - * @brief Number of dataset summ records - */ - int get_n_dataset() - { - return _n_dataset; - }; - /** - * @brief Data set summary record length, bytes - */ - int get_l_dataset() - { - return _l_dataset; - }; - /** - * @brief Number of map proj records - */ - int get_n_map_proj() - { - return _n_map_proj; - }; - /** - * @brief Map projection record length, bytes - */ - int get_l_map_proj() - { - return _l_map_proj; - }; - /** - * @brief Number of platform position records - */ - int get_n_plat_pos() - { - return _n_plat_pos; - }; - /** - * @brief Platform position record length, bytes - */ - int get_l_plat_pos() - { - return _l_plat_pos; - }; - /** - * @brief Number of attitude data records - */ - int get_n_att_data() - { - return _n_att_data; - }; - /** - * @brief Attitude data record length, bytes - */ - int get_l_att_data() - { - return _l_att_data; - }; - /** - * @brief Number of radiometric data records - */ - int get_n_radi_data() - { - return _n_radi_data; - }; - /** - * @brief Radiometric data record length, bytes - */ - int get_l_radi_data() - { - return _l_radi_data; - }; - /** - * @brief Number of radiometric compensation records - */ - int get_n_radi_comp() - { - return _n_radi_comp; - }; - /** - * @brief Radiometric compensation record length, bytes - */ - int get_l_radi_comp() - { - return _l_radi_comp; - }; - /** - * @brief Number of data quality summary records - */ - int get_n_qual_sum() - { - return _n_qual_sum; - }; - /** - * @brief Data quality summary record length, bytes - */ - int get_l_qual_sum() - { - return _l_qual_sum; - }; - /** - * @brief Number of data histogram records - */ - int get_n_data_his() - { - return _n_data_his; - }; - /** - * @brief Data histogram record length, bytes - */ - int get_l_data_his() - { - return _l_data_his; - }; - /** - * @brief Number of range spectra records - */ - int get_n_rang_spec() - { - return _n_rang_spec ; - }; - /** - * @brief Range spectra record length, bytes - */ - int get_l_rang_spec() - { - return _l_rang_spec; - }; - /** - * @brief Number of DEM descriptor records - */ - int get_n_dem_desc() - { - return _n_dem_desc; - }; - /** - * @brief DEM desc record length, bytes - */ - int get_l_dem_desc() - { - return _l_dem_desc; - }; - /** - * @brief Number of RADAR par records - */ - int get_n_radar_par() - { - return _n_radar_par; - }; - /** - * @brief RADAR par record length, bytes - */ - int get_l_radar_par() - { - return _l_radar_par; - }; - /** - * @brief Number of annotation data records - */ - int get_n_anno_data() - { - return _n_anno_data; - }; - /** - * @brief Annotation data record length, bytes - */ - int get_l_anno_data() - { - return _l_anno_data; - }; - /** - * @brief Number of processing parameter records - */ - int get_n_det_proc() - { - return _n_det_proc; - }; - /** - * @brief Processing parameter record length, bytes - */ - int get_l_det_proc() - { - return _l_det_proc; - }; - /** - * @brief Number of calibration records - */ - int get_n_cal() - { - return _n_cal; - }; - /** - * @brief Calibration record length, bytes - */ - int get_l_cal() - { - return _l_cal; - }; - /** - * @brief Number of GCP records - */ - int get_n_gcp() - { - return _n_gcp; - }; - /** - * @brief GCP record length, bytes - */ - int get_l_gcp() - { - return _l_gcp; - }; - /** - * @brief Number of facility data records - */ - int get_n_fac_data() - { - return _n_fac_data; - }; - /** - * @brief Fac data record length, bytes - */ - int get_l_fac_data() - { - return _l_fac_data; - }; - -protected: - /** - * @brief ASCII flag - */ - std::string _ascii_flag; - - /** - * @brief Format control documentation - */ - std::string _format_doc; - /** - * @brief Format doc version - */ - std::string _format_ver; - /** - * @brief Format doc revision - */ - std::string _design_rev; - /** - * @brief Software identifier - */ - std::string _software_id; - /** - * @brief File number - */ - int _file_num; - /** - * @brief File name - */ - std::string _file_name; - /** - * @brief Record sequence/location flag - */ - std::string _rec_seq; - /** - * @brief Sequence number location - */ - int _seq_loc; - /** - * @brief Sequence number lenght - */ - int _seq_len; - /** - * @brief Record code/location flag - */ - std::string _rec_code; - /** - * @brief Record code location - */ - int _code_loc; - /** - * @brief Record code length - */ - int _code_len; - /** - * @brief Record length/location flag - */ - std::string _rec_len; - /** - * @brief Record lenght location - */ - int _rlen_loc; - /** - * @brief Record length, bytes - */ - int _rlen_len; - - - /** - * @brief Number of dataset summ records - */ - int _n_dataset; - /** - * @brief Data set summary record length, bytes - */ - int _l_dataset; - /** - * @brief Number of map proj records - */ - int _n_map_proj; - /** - * @brief Map projection record length, bytes - */ - int _l_map_proj; - /** - * @brief Number of platform position records - */ - int _n_plat_pos; - /** - * @brief Platform position record length, bytes - */ - int _l_plat_pos; - /** - * @brief Number of attitude data records - */ - int _n_att_data; - /** - * @brief Attitude data record length, bytes - */ - int _l_att_data; - /** - * @brief Number of radiometric data records - */ - int _n_radi_data; - /** - * @brief Radiometric data record length, bytes - */ - int _l_radi_data; - /** - * @brief Number of radiometric compensation records - */ - int _n_radi_comp; - /** - * @brief Radiometric compensation record length, bytes - */ - int _l_radi_comp; - /** - * @brief Number of data quality summary records - */ - int _n_qual_sum; - /** - * @brief Data quality summary record length, bytes - */ - int _l_qual_sum; - /** - * @brief Number of data histogram records - */ - int _n_data_his; - /** - * @brief Data histogram record length, bytes - */ - int _l_data_his; - /** - * @brief Number of range spectra records - */ - int _n_rang_spec; - /** - * @brief Range spectra record length, bytes - */ - int _l_rang_spec; - /** - * @brief Number of DEM descriptor records - */ - int _n_dem_desc; - /** - * @brief DEM desc record length, bytes - */ - int _l_dem_desc; - /** - * @brief Number of RADAR par records - */ - int _n_radar_par; - /** - * @brief RADAR par record length, bytes - */ - int _l_radar_par; - /** - * @brief Number of annotation data records - */ - int _n_anno_data; - /** - * @brief Annotation data record length, bytes - */ - int _l_anno_data; - /** - * @brief Number of processing parameter records - */ - int _n_det_proc; - /** - * @brief Processing parameter record length, bytes - */ - int _l_det_proc; - /** - * @brief Number of calibration records - */ - int _n_cal; - /** - * @brief Calibration record length, bytes - */ - int _l_cal; - /** - * @brief Number of GCP records - */ - int _n_gcp; - /** - * @brief GCP record length, bytes - */ - int _l_gcp; - - /** - * @brief Number of facility data records - */ - int _n_fac_data; - /** - * @brief Fac data record length, bytes - */ - int _l_fac_data; - -private: -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h deleted file mode 100644 index f59701fae5..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef ErsSarLeader_h -#define ErsSarLeader_h - -#include <iostream> -#include "ErsSarFileDescriptor.h" -#include "ErsSarDataSetSummary.h" -#include "ErsSarMapProjectionData.h" -#include "ErsSarPlatformPositionData.h" -#include "ErsSarFacilityData.h" -#include <map> - -class ErsSarPlatformPositionData; -class ErsSarMapProjectionData; -class ErsSarDataSetSummary; -class ErsSarFileDescriptor; -class ErsSarFacilityData; - -/** - * @ingroup ErsSarLeaderFile - * @brief This class is able to read the Leader file of the ErsSar file structure - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarLeader -{ -public: - /** - * @brief Constructor - */ - ErsSarLeader(); - - /** - * @brief Destructor - */ - ~ErsSarLeader(); - - /** - * @brief This function write the ErsSarLeader in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarLeader& data); - - /** - * @brief This function read a ErsSarLeader from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarLeader& data); - - /** - * @brief Copy constructor - */ - ErsSarLeader(const ErsSarLeader& rhs); - - /** - * @brief Copy operator - */ - ErsSarLeader& operator=(const ErsSarLeader& rhs); - - /** - * @brief Remove all the previous records from the ErsSarLeader - */ - void ClearRecords(); - ErsSarFacilityData * get_ErsSarFacilityData(); - ErsSarPlatformPositionData * get_ErsSarPlatformPositionData(); - ErsSarMapProjectionData * get_ErsSarMapProjectionData(); - ErsSarDataSetSummary * get_ErsSarDataSetSummary(); - ErsSarFileDescriptor * get_ErsSarFileDescriptor(); - -protected: - std::map<int, ErsSarRecord*> _records; - - static const int ErsSarFacilityDataID; - static const int ErsSarPlatformPositionDataID; - static const int ErsSarMapProjectionDataID; - static const int ErsSarDataSetSummaryID; - static const int ErsSarFileDescriptorID; -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h deleted file mode 100644 index 6c3b088078..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef ErsSarLeaderFactory_h -#define ErsSarLeaderFactory_h - - -#include <ossim/imaging/ErsSar/ErsSarRecordFactory.h> -#include <map> -/** - * @ingroup ErsSarLeaderFile - * @brief This class is a facory able to construct Record base classes - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarLeaderFactory : public ErsSarRecordFactory -{ -public: - /** - * @brief Contstructor - */ - ErsSarLeaderFactory(); - /** - * @brief Destructor - */ - ~ErsSarLeaderFactory(); - - -protected: - - -private: -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h deleted file mode 100644 index b8155543eb..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h +++ /dev/null @@ -1,308 +0,0 @@ -#ifndef ErsSarMapProjectionData_h -#define ErsSarMapProjectionData_h - -#include <iostream> -#include <cstdlib> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -/** - * @ingroup ErsSarMapProjectionDataRecord - * @brief This class is able to read the SAR leader data set summary record of the leader file - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarMapProjectionData : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarMapProjectionData(); - - /** - * @brief Destructor - */ - ~ErsSarMapProjectionData(); - - /** - * @brief This function write the ErsSarMapProjectionData in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarMapProjectionData& data); - - /** - * @brief This function read a ErsSarMapProjectionData from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarMapProjectionData& data); - - /** - * @brief Copy constructor - */ - ErsSarMapProjectionData(const ErsSarMapProjectionData& rhs); - - /** - * @brief Copy operator - */ - ErsSarMapProjectionData& operator=(const ErsSarMapProjectionData& rhs); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarMapProjectionData(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarMapProjectionData(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - - /** - * @brief map_proj_des - */ - std::string get_map_proj_des() - { - return _map_proj_des; - }; - /** - * @brief num_pix_in_line - */ - int get_num_pix_in_line() - { - return _num_pix_in_line; - }; - /** - * @brief num_lines - */ - int get_num_lines() - { - return _num_lines; - }; - /** - * @brief nom_interpixel_dist - */ - double get_nom_interpixel_dist() - { - return _nom_interpixel_dist; - }; - /** - * @brief nom_interline_dist - */ - double get_nom_interline_dist() - { - return _nom_interline_dist; - }; - /** - * @brief orientation_at_center - */ - double get_orientation_at_center() - { - return _orientation_at_center; - }; - /** - * @brief orbit_incl - */ - double get_orbit_incl() - { - return _orbit_incl; - }; - /** - * @brief asc_node_long - */ - double get_asc_node_long() - { - return _asc_node_long; - }; - /** - * @brief platform_heading - */ - double get_platform_heading() - { - return _platform_heading; - }; - /** - * @brief name_of_ref_ellipsoid - */ - std::string get_name_of_ref_ellipsoid() - { - return _name_of_ref_ellipsoid; - }; - /** - * @brief semi_maj_axis - */ - double get_semi_maj_axis() - { - return _semi_maj_axis; - }; - /** - * @brief semi_min_axis - */ - double get_semi_min_axis() - { - return _semi_min_axis; - }; - /** - * @brief first_line_first_pixel _lat - */ - double get_first_line_first_pixel_lat() - { - return _first_line_first_pixel_lat; - }; - /** - * @brief first_line_first_pixel_lon - */ - double get_first_line_first_pixel_lon() - { - return _first_line_first_pixel_lon; - }; - /** - * @brief first_line_last_pixel _lat - */ - double get_first_line_last_pixel_lat() - { - return _first_line_last_pixel_lat; - }; - /** - * @brief first_line_last_pixel_lon - */ - double get_first_line_last_pixel_lon() - { - return _first_line_last_pixel_lon; - }; - /** - * @brief last_line_last_pixel_lat - */ - double get_last_line_last_pixel_lat() - { - return _last_line_last_pixel_lat; - }; - /** - * @brief last_line_last_pixel_lon - */ - double get_last_line_last_pixel_lon() - { - return _last_line_last_pixel_lon; - }; - /** - * @brief last_line_first_pixel_lat - */ - double get_last_line_first_pixel_lat() - { - return _last_line_first_pixel_lat; - }; - /** - * @brief last_line_first_pixel_lon - */ - double get_last_line_first_pixel_lon() - { - return _last_line_first_pixel_lon; - }; - -protected: - /** - * @brief map_proj_des - */ - std::string _map_proj_des; - /** - * @brief num_pix_in_line - */ - int _num_pix_in_line; - /** - * @brief num_lines - */ - int _num_lines; - /** - * @brief nom_interpixel_dist - */ - double _nom_interpixel_dist; - /** - * @brief nom_interline_dist - */ - double _nom_interline_dist; - /** - * @brief orientation_at_center - */ - double _orientation_at_center; - /** - * @brief orbit_incl - */ - double _orbit_incl; - /** - * @brief asc_node_long - */ - double _asc_node_long; - /** - * @brief platform_heading - */ - double _platform_heading; - /** - * @brief name_of_ref_ellipsoid - */ - std::string _name_of_ref_ellipsoid; - /** - * @brief semi_maj_axis - */ - double _semi_maj_axis; - /** - * @brief semi_min_axis - */ - double _semi_min_axis; - /** - * @brief first_line_first_pixel_lat - */ - double _first_line_first_pixel_lat; - /** - * @brief first_line_first_pixel_lon - */ - double _first_line_first_pixel_lon; - /** - * @brief first_line_last_pixel_lat - */ - double _first_line_last_pixel_lat; - /** - * @brief first_line_last_pixel_lon - */ - double _first_line_last_pixel_lon; - /** - * @brief last_line_last_pixel_lat - */ - double _last_line_last_pixel_lat; - /** - * @brief last_line_last_pixel_lon - */ - double _last_line_last_pixel_lon; - /** - * @brief last_line_first_pixel_lat - */ - double _last_line_first_pixel_lat; - /** - * @brief last_line_first_pixel_lon - */ - double _last_line_first_pixel_lon; - - -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h deleted file mode 100644 index 2de89bf6f4..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h +++ /dev/null @@ -1,283 +0,0 @@ -#ifndef ErsSarPlatformPositionData_h -#define ErsSarPlatformPositionData_h - -#include <iostream> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h> -/** - * @ingroup PlatformPositionDataRecord - * @brief This class is able to read a Platform position data record - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 02-12-07 - */ -class ErsSarPlatformPositionData : public ErsSarRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarPlatformPositionData(); - - /** - * @brief Destructor - */ - ~ErsSarPlatformPositionData(); - - /** - * @brief Copy constructor - */ - ErsSarPlatformPositionData(const ErsSarPlatformPositionData& rhs); - - /** - * @brief Copy operator - */ - ErsSarPlatformPositionData& operator=(const ErsSarPlatformPositionData& rhs); - /** - * @brief This function write the ErsSar PlatformPositionData in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarPlatformPositionData& data); - - /** - * @brief This function read a ErsSar PlatformPositionData from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarPlatformPositionData& data); - - /** - * @brief This function is able to create a new instance of the class - */ - ErsSarRecord* Instanciate() - { - return new ErsSarPlatformPositionData(); - }; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - ErsSarRecord* Clone() - { - return new ErsSarPlatformPositionData(*this); - }; - - /** - * @brief Read the class data from a stream - */ - void Read(std::istream& is) - { - is>>*this; - }; - - /** - * @brief Write the class to a stream - */ - void Write(std::ostream& os) - { - os<<*this; - }; - - /** - * @brief Orbital elements designator - */ - std::string get_orbit_ele_desg() - { - return _orbit_ele_desg; - }; - /** - * @brief Orbital elements - */ - double* get_orbit_ele() - { - return _orbit_ele; - }; - /** - * @brief Number of data points - */ - int get_ndata() - { - return _ndata; - }; - /** - * @brief Year of data point - */ - int get_year() - { - return _year; - }; - /** - * @brief Month of data point - */ - int get_month() - { - return _month; - }; - /** - * @brief Day of data point - */ - int get_day() - { - return _day; - }; - /** - * @brief Day of year - */ - int get_gmt_day() - { - return _gmt_day; - }; - /** - * @brief Seconds of day - */ - double get_gmt_sec() - { - return _gmt_sec; - }; - /** - * @brief Data sampling interval - */ - double get_data_int() - { - return _data_int; - }; - /** - * @brief Reference coordinate system - */ - std::string get_ref_coord() - { - return _ref_coord; - }; - /** - * @brief Greenwich mean hour angle - */ - double get_hr_angle() - { - return _hr_angle; - }; - /** - * @brief Along track position error - */ - double get_alt_poserr() - { - return _alt_poserr; - }; - /** - * @brief Cross track position error - */ - double get_crt_poserr() - { - return _crt_poserr; - }; - /** - * @brief Radial position error - */ - double get_rad_poserr() - { - return _rad_poserr; - }; - /** - * @brief Along track velocity error - */ - double get_alt_velerr() - { - return _alt_velerr; - }; - /** - * @brief Cross track velocity error - */ - double get_crt_velerr() - { - return _crt_velerr; - }; - /** - * @brief Radial velocity error - */ - double get_rad_velerr() - { - return _rad_velerr; - }; - /** - * @brief Data point position/velocity - */ - ErsSarPositionVectorRecord* get_pos_vect() - { - return _pos_vect; - }; - -protected: - /** - * @brief Orbital elements designator - */ - std::string _orbit_ele_desg; - /** - * @brief Orbital elements - */ - double _orbit_ele[6]; - /** - * @brief Number of data points - */ - int _ndata; - /** - * @brief Year of data point - */ - int _year; - /** - * @brief Month of data point - */ - int _month; - /** - * @brief Day of data point - */ - int _day; - /** - * @brief Day of year - */ - int _gmt_day; - /** - * @brief Seconds of day - */ - double _gmt_sec; - /** - * @brief Data sampling interval - */ - double _data_int; - /** - * @brief Reference coordinate system - */ - std::string _ref_coord; - /** - * @brief Greenwich mean hour angle - */ - double _hr_angle; - /** - * @brief Along track position error - */ - double _alt_poserr; - /** - * @brief Cross track position error - */ - double _crt_poserr; - /** - * @brief Radial position error - */ - double _rad_poserr; - /** - * @brief Along track velocity error - */ - double _alt_velerr; - /** - * @brief Cross track velocity error - */ - double _crt_velerr; - /** - * @brief Radial velocity error - */ - double _rad_velerr; - /** - * @brief Data point position/velocity - */ - ErsSarPositionVectorRecord _pos_vect[64]; - -private: -}; -#endif diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h deleted file mode 100644 index b4d0c3f289..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef ErsSarPositionVectorRecord_h -#define ErsSarPositionVectorRecord_h - -#include <iostream> -#include <cstdlib> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -/** - * @ingroup PlatformPositionDataRecord - * @brief This class is able to read a position vector record - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarPositionVectorRecord -{ -public: - /** - * @brief Constructor - */ - ErsSarPositionVectorRecord(); - - /** - * @brief Destructor - */ - ~ErsSarPositionVectorRecord(); - - /** - * @brief Copy constructor - */ - ErsSarPositionVectorRecord(const ErsSarPositionVectorRecord& rhs); - - /** - * @brief Copy operator - */ - ErsSarPositionVectorRecord& operator=(const ErsSarPositionVectorRecord& rhs); - /** - * @brief This function write the ErsSar PositionVectorRecord in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarPositionVectorRecord& data); - - /** - * @brief This function read a ErsSar PositionVectorRecord from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarPositionVectorRecord& data); - - /** - * @brief Data point position (m) - */ - double* get_pos() - { - return _pos; - }; - - /** - * @brief Data point velocity (mm/s) - */ - double* get_vel() - { - return _vel; - }; - -protected: - /** - * @brief Data point position (m) - */ - double _pos[3]; - /** - * @brief Data point velocity (mm/s) - */ - double _vel[3]; -private: - - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecord.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecord.h deleted file mode 100644 index eb6e632097..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecord.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef ErsSarRecord_h -#define ErsSarRecord_h - - -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <iostream> -/** - * @ingroup ErsSar - * @brief This class is the base class of all the record classes - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarRecord -{ -public: - /** - * @brief Constructor - * @param mnemonic Name of the record - */ - ErsSarRecord(std::string mnemonic); - /** - * @brief Destructor - */ - ~ErsSarRecord(); - - /** - * @brief Copy constructor - */ - ErsSarRecord(const ErsSarRecord& rhs); - - /** - * @brief This function is able to create a new instance of the class - */ - virtual ErsSarRecord* Instanciate() =0; - - /** - * @brief This function is able to create a new instance of the class initialised with the data of the calling instance - */ - virtual ErsSarRecord* Clone()=0; - - /** - * @brief Read the class data from a stream - */ - virtual void Read(std::istream& is) =0; - - /** - * @brief Write the class to a stream - */ - virtual void Write(std::ostream& os)=0; - - std::string get_mnemonic() - { - return _mnemonic; - }; - -protected: - - std::string _mnemonic; - -private: -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordFactory.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordFactory.h deleted file mode 100644 index ba821ca351..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordFactory.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef ErsSarRecordFactory_h -#define ErsSarRecordFactory_h - - -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -#include <map> -/** - * @ingroup ErsSar - * @brief This class is a facory able to construct Record base classes given the id of the record wanted - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarRecordFactory -{ -public: - /** - * @brief Constructor - */ - ErsSarRecordFactory(); - /** - * @brief Destructor - */ - ~ErsSarRecordFactory(); - - /** - * @brief Add a new Record type available in this factory - * @param record Record to add in the factory - * @param id Id of the new avalaible Record - */ - void RegisterRecord(int id, ErsSarRecord * record); - - /** - * @brief Instanciate a new Record - * @param id Id of the Record we want to instanciate - */ - ErsSarRecord* Instanciate(int id) ; -protected: - - /** - * @brief Contain all the available Records for the factory - */ - std::map<int, ErsSarRecord*> _availableRecords; - -private: -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordHeader.h b/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordHeader.h deleted file mode 100644 index 7bb4a32423..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ErsSar/ErsSarRecordHeader.h +++ /dev/null @@ -1,129 +0,0 @@ -#ifndef ErsSarRecordHeader_h -#define ErsSarRecordHeader_h - -#include<iostream> -#include<cstring> - -/** - * @ingroup ErsSar - * @brief This class is able to read a record header - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 23-11-07 - */ -class ErsSarRecordHeader -{ -public: - /** - * @brief Constructor - */ - ErsSarRecordHeader(); - - /** - * @brief Destructor - */ - ~ErsSarRecordHeader(); - - /** - * @brief Copy constructor - */ - ErsSarRecordHeader(const ErsSarRecordHeader& rhs); - - /** - * @brief Copy operator - */ - ErsSarRecordHeader& operator=(const ErsSarRecordHeader& rhs); - /** - * @brief This function write the RecordHeader in a stream - */ - friend std::ostream& operator<<(std::ostream& os, const ErsSarRecordHeader& data); - - /** - * @brief This function read a RecordHeader from a stream - */ - friend std::istream& operator>>(std::istream& is, ErsSarRecordHeader& data); - - /** - * @brief Record sequence number - */ - unsigned int get_rec_seq() - { - return _rec_seq; - }; - - /** - * @brief First record sub-type code - */ - unsigned char get_rec_sub1() - { - return _rec_sub1; - }; - - /** - * @brief Record type code - */ - unsigned char get_rec_type() - { - return _rec_type; - }; - - /** - * @brief Second record sub-type code - */ - unsigned char get_rec_sub2() - { - return _rec_sub2; - }; - - /** - * @brief Third record sub-type code - */ - unsigned char get_rec_sub3() - { - return _rec_sub3; - }; - - /** - * @brief Length of this record (in bytes) - */ - unsigned int get_length() - { - return _length; - }; -protected: - - /** - * @brief This function switch the LSB value and the MSB value of the parameter - */ - void SwitchEndian(unsigned int& value); - - /** - * @brief Record sequence number - */ - unsigned int _rec_seq; - /** - * @brief First record sub-type code - */ - unsigned char _rec_sub1; - /** - * @brief Record type code - */ - unsigned char _rec_type; - /** - * @brief Second record sub-type code - */ - unsigned char _rec_sub2; - /** - * @brief Third record sub-type code - */ - unsigned char _rec_sub3; - /** - * @brief Length of this record (in bytes) - */ - unsigned int _length; -private: - - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/RadarSat2/Rds2Annotation.h b/Utilities/otbossim/include/ossim/imaging/RadarSat2/Rds2Annotation.h deleted file mode 100644 index 23d2120fc1..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/RadarSat2/Rds2Annotation.h +++ /dev/null @@ -1,392 +0,0 @@ -#ifndef Rds2Annotation_h -#define Rds2Annotation_h - -#include <string> -#include <map> -#include <vector> - -class ossimXmlDocument ; - -/** - * @brief This class is able to parse the XML annotation file of a RadarSat2 product - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 03-20-08 - */ -class Rds2Annotation -{ -public: - /** - * @brief Constructor - */ - Rds2Annotation(); - - /** - * @brief Destructor - */ - ~Rds2Annotation(); - - /** - * @brief Reads a RadarSat2 XML annotation file - * - * @param docXML : the XML annotation file to parse - */ - bool Parse(ossimXmlDocument docXML); - - /** - * @brief Pixel order - */ - std::string get_lineTimeOrdering() { - return _lineTimeOrdering ; - } ; - std::string get_pixelTimeOrdering() { - return _pixelTimeOrdering ; - } ; - - /** - * @brief Orbit direction - */ - std::string get_orbitDirection() { - return _orbitDirection ; - } - /** - * @brief Look direction - */ - std::string get_lookDirection() { - return _lookDirection ; - } - - /** - * @brief Ellipsoid semi-major axis, km - */ - double get_ellip_maj() - { - return _ellip_maj; - }; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double get_ellip_min() - { - return _ellip_min; - }; - - /** - * @brief Average terrain height, km - */ - double get_terrain_h() - { - return _terrain_h; - }; - - /** - * @brief Radar central frequency - */ - double get_central_freq() - { - return _central_freq; - }; - - /** - * @brief Range sampling rate - */ - double get_fr() - { - return _fr; - }; - - /** - * @brief Nominal PRF, Hz - */ - double get_fa() - { - return _fa; - }; - - /** - * @brief Number of azimuth looks - */ - double get_n_azilok() - { - return _n_azilok; - }; - - /** - * @brief Number of range looks - */ - double get_n_rnglok() - { - return _n_rnglok; - }; - - /** - * @brief Slant range near edge - */ - double get_slantRangeNearEdge() - { - return _slantRangeNearEdge; - }; - - /** - * @brief Zero Doppler Time First Line - */ - std::string get_zeroDopplerTimeFirstLine() - { - return _zeroDopplerTimeFirstLine; - }; - - - /** - * @brief ProductType (SLC,SGF,SGX,SGC,SSG,SPG) - */ - std::string get_productType() { - return _productType; - }; - - /** - * @brief Number of state vector data points - */ - int get_ndata() - { - return _ndata; - }; - - /** - * @brief State vector data point date, position, velocity - */ - std::vector<std::string> get_eph_date() - { - return _eph_date; - }; - - std::vector<double> get_posX() - { - return _posX; - }; - std::vector<double> get_posY() - { - return _posY; - }; - std::vector<double> get_posZ() - { - return _posZ; - }; - std::vector<double> get_velX() - { - return _velX; - }; - std::vector<double> get_velY() - { - return _velY; - }; - std::vector<double> get_velZ() - { - return _velZ; - }; - /** - * @brief Number of columns - */ - double get_nbCol() { - return _nbCol; - } - /** - * @brief Number of lines - */ - double get_nbLin() { - return _nbLin; - } - /** - * @brief Mean Pixel spacing - */ - double get_pixel_spacing_mean() { - return _pixel_spacing_mean; - } - - /** - * @brief Slant Range FOR EACH Ground Range Projection reference points - */ - std::vector<double> get_SrGr_R0(){ - return _SrGr_R0; - }; - - /** - * @brief Slant Range FOR EACH Ground Range Projection update times - */ - std::vector<std::string> get_SrGr_update(){ - return _SrGr_update; - }; - - /** - * @brief Slant Range FOR EACH Ground Range Projection coefficients - */ - std::vector< std::vector<double> > get_SrGr_coeffs() { - return _SrGr_coeffs; - }; - - /** - * @brief Tie points longitudes - */ - std::vector<double> get_cornersLon() { - return _cornersLon; - } - /** - * @brief Tie points latitudes - */ - std::vector<double> get_cornersLat(){ - return _cornersLat; - } - /** - * @brief Tie points heights - */ - std::vector<double> get_cornersHeight(){ - return _cornersHeight; - } - /** - * @brief Tie points columns - */ - std::vector<double> get_cornersCol(){ - return _cornersCol; - } - /** - * @brief Tie points lines - */ - std::vector<double> get_cornersLin(){ - return _cornersLin; - } - -protected: - - /** - * @brief Pixel order - */ - std::string _lineTimeOrdering; - std::string _pixelTimeOrdering; - /** - * @brief Orbit direction - */ - std::string _orbitDirection; - /** - * @brief Look direction - */ - std::string _lookDirection; - /** - * @brief Ellipsoid semi-major axis, km - */ - double _ellip_maj; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double _ellip_min; - /** - * @brief Scene centre line number - */ - int _sc_lin; - /** - * @brief Scene centre pixel number - */ - int _sc_pix; - /** - * @brief Radar central frequency - */ - double _central_freq; - /** - * @brief Range sampling rate - */ - double _fr; - /** - * @brief Nominal PRF, Hz - */ - double _fa; - /** - * @brief Slant range near edge - */ - double _slantRangeNearEdge; - /** - * @brief Zero Doppler Time First Line - */ - std::string _zeroDopplerTimeFirstLine; - /** - * @brief Number of azimuth looks - */ - double _n_azilok; - - /** - * @brief Number of range looks - */ - double _n_rnglok; - - /** - * @brief Average terrain height, km - */ - double _terrain_h; - /** - * @brief ProductType (SLC,SGF,SGX,SGC,SSG,SPG) - */ - std::string _productType; - /** - * @brief Number of columns - */ - double _nbCol; - /** - * @brief Number of lines - */ - double _nbLin; - /** - * @brief Mean Pixel spacing - */ - double _pixel_spacing_mean; - /** - * @brief Slant Range FOR EACH Ground Range Projection reference point - */ - std::vector<double> _SrGr_R0; - /** - * @brief Slant Range FOR EACH Ground Range Projection update times - */ - std::vector<std::string> _SrGr_update; - /** - * @brief Slant Range FOR EACH Ground Range Projection coefficients - */ - std::vector< std::vector<double> > _SrGr_coeffs; - - /** - * @brief Number of data points - */ - int _ndata; - - /** - * @brief Data point position/velocity - */ - std::vector<std::string> _eph_date; - std::vector<double> _posX; - std::vector<double> _posY; - std::vector<double> _posZ; - std::vector<double> _velX; - std::vector<double> _velY; - std::vector<double> _velZ; - - /** - * @brief Tie points longitudes - */ - std::vector<double> _cornersLon; - /** - * @brief Tie points latitudes - */ - std::vector<double> _cornersLat; - /** - * @brief Tie points heights - */ - std::vector<double> _cornersHeight; - /** - * @brief Tie points columns - */ - std::vector<double> _cornersCol; - /** - * @brief Tie points lines - */ - std::vector<double> _cornersLin; - -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/TerraSar/TsxAnnotation.h b/Utilities/otbossim/include/ossim/imaging/TerraSar/TsxAnnotation.h deleted file mode 100644 index 5fbdff2395..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/TerraSar/TsxAnnotation.h +++ /dev/null @@ -1,519 +0,0 @@ -#ifndef TsxAnnotation_h -#define TsxAnnotation_h - -#include <string> -#include <map> -#include <vector> - -class ossimXmlDocument ; - -/** - * @brief This class is able to parse the XML annotation file of a TerraSar level1B product - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 02-19-08 - */ -class TsxAnnotation -{ -public: - /** - * @brief Constructor - */ - TsxAnnotation(); - - /** - * @brief Destructor - */ - ~TsxAnnotation(); - - /** - * @brief Reads a TerraSar XML annotation file - * - * @param docXML : the XML annotation file to parse - */ - bool Parse(ossimXmlDocument docXML); - - /** - * @brief Pixel order - */ - std::string get_imageDataStartWith() { - return _imageDataStartWith ; - } ; - - /** - * @brief Input scene centre time - */ - std::string get_inp_sctim() - { - return _inp_sctim; - }; - /** - * @brief Orbit direction - */ - std::string get_orbitDirection() { - return _orbitDirection ; - } - /** - * @brief Look direction - */ - std::string get_lookDirection() { - return _lookDirection ; - } - /** - * @brief Processed scene centre latitude - */ - double get_pro_lat() - { - return _pro_lat; - }; - /** - * @brief Processed scene centre longitude - */ - double get_pro_long() - { - return _pro_long; - }; - /** - * @brief Processed scene centre headng - */ - double get_pro_head() - { - return _pro_head; - }; - - /** - * @brief Ellipsoid semi-major axis, km - */ - double get_ellip_maj() - { - return _ellip_maj; - }; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double get_ellip_min() - { - return _ellip_min; - }; - - /** - * @brief Average terrain height, km - */ - double get_terrain_h() - { - return _terrain_h; - }; - /** - * @brief Scene centre line number - */ - int get_sc_lin() - { - return _sc_lin; - }; - /** - * @brief Scene centre pixel number - */ - int get_sc_pix() - { - return _sc_pix; - }; - - - /** - * @brief Radar central frequency - */ - double get_central_freq() - { - return _central_freq; - }; - - /** - * @brief Range sampling rate - */ - double get_fr() - { - return _fr; - }; - /** - * @brief Range gate start time - */ - double get_rng_gate() - { - return _rng_gate; - }; - /** - * @brief Range gate end time - */ - double get_rng_gate_end() - { - return _rng_gate_end; - }; - - /** - * @brief Azimuth start time - */ - std::string get_azimuthStartTime() - { - return _azimuthStartTime; - }; - /** - * @brief Azimuth end time - */ - std::string get_azimuthStopTime() - { - return _azimuthStopTime; - }; - - /** - * @brief Scene center range time - */ - double get_sceneCenterRangeTime() - { - return _sceneCenterRangeTime; - }; - - /** - * @brief Nominal PRF, Hz - */ - double get_fa() - { - return _fa; - }; - - /** - * @brief Number of azimuth looks - */ - double get_n_azilok() - { - return _n_azilok; - }; - - /** - * @brief Number of range looks - */ - double get_n_rnglok() - { - return _n_rnglok; - }; - - /** - * @brief Along track Doppler frequency terms - */ - double* get_alt_dopcen() - { - return _alt_dopcen; - }; - - /** - * @brief Cross track Doppler frequency terms - */ - double* get_crt_dopcen() - { - return _crt_dopcen; - }; - - /** - * @brief Type of range data (GROUNDRANGE, SLANTRANGE, MAP, UNDEFINED) - */ - std::string get_rangeProjectionType() { - return _rangeProjectionType; - }; - - /** - * @brief Number of state vector data points - */ - int get_ndata() - { - return _ndata; - }; - - /** - * @brief State vector data point date, position, velocity - */ - std::vector<std::string> get_eph_date() - { - return _eph_date; - }; - - std::vector<double> get_posX() - { - return _posX; - }; - std::vector<double> get_posY() - { - return _posY; - }; - std::vector<double> get_posZ() - { - return _posZ; - }; - std::vector<double> get_velX() - { - return _velX; - }; - std::vector<double> get_velY() - { - return _velY; - }; - std::vector<double> get_velZ() - { - return _velZ; - }; - /** - * @brief Number of columns - */ - double get_nbCol() { - return _nbCol; - } - /** - * @brief Number of lines - */ - double get_nbLin() { - return _nbLin; - } - /** - * @brief Mean Pixel spacing - */ - double get_pixel_spacing_mean() { - return _pixel_spacing_mean; - } - /** - * @brief Pixel spacing at Near range - */ - double get_pixel_spacing_near() { - return _pixel_spacing_near; - } - - /** - * @brief Pixel spacing at far range - */ - double get_pixel_spacing_far() { - return _pixel_spacing_far; - } - - /** - * @brief Slant Range TO Ground Range Projection reference point - */ - double get_SrToGr_R0(){ - return _SrToGr_R0; - }; - - /** - * @brief Slant Range TO Ground Range Projection coefficients - */ - std::vector<double> get_SrToGr_coeffs() { - return _SrToGr_coeffs; - }; - - /** - * @brief Slant Range TO Ground Range Projection exponents - */ - std::vector<int> get_SrToGr_exps() { - return _SrToGr_exps; - }; - - /** - * @brief Scene corners + scene center longitudes - */ - double* get_cornersLon() { - return _cornersLon; - } - /** - * @brief Scene corners + scene center latitudes - */ - double* get_cornersLat(){ - return _cornersLat; - } - /** - * @brief Scene corners + scene center columns - */ - int* get_cornersCol(){ - return _cornersCol; - } - /** - * @brief Scene corners + scene center lines - */ - int* get_cornersLin(){ - return _cornersLin; - } - -protected: - - /** - * @brief Pixel order - */ - std::string _imageDataStartWith; - /** - * @brief Orbit direction - */ - std::string _orbitDirection; - /** - * @brief Look direction - */ - std::string _lookDirection; - /** - * @brief Input scene centre time - */ - std::string _inp_sctim; - /** - * @brief Processed scene centre latitude - */ - double _pro_lat; - /** - * @brief Processed scene centre longitude - */ - double _pro_long; - /** - * @brief Processed scene centre headng - */ - double _pro_head; - /** - * @brief Ellipsoid semi-major axis, km - */ - double _ellip_maj; - /** - * @brief Ellipsoid semi_minor axis, km - */ - double _ellip_min; - /** - * @brief Scene centre line number - */ - int _sc_lin; - /** - * @brief Scene centre pixel number - */ - int _sc_pix; - /** - * @brief Radar central frequency - */ - double _central_freq; - /** - * @brief Range sampling rate - */ - double _fr; - /** - * @brief Range gate start time - */ - double _rng_gate; - /** - * @brief Range gate end time - */ - double _rng_gate_end; - /** - * @brief Azimuth start time - */ - std::string _azimuthStartTime; - /** - * @brief Azimuth end time - */ - std::string _azimuthStopTime; - - /** - * @brief Scene center range time - */ - double _sceneCenterRangeTime; - - /** - * @brief Nominal PRF, Hz - */ - double _fa; - /** - * @brief Number of azimuth looks - */ - double _n_azilok; - - /** - * @brief Number of range looks - */ - double _n_rnglok; - - /** - * @brief Average terrain height, km - */ - double _terrain_h; - - /** - * @brief Along track Doppler frequency terms - */ - double _alt_dopcen[3]; - /** - * @brief Cross track Doppler frequency terms - */ - double _crt_dopcen[3]; - - /** - * @brief Type of range data (GROUNDRANGE, SLANTRANGE, MAP, UNDEFINED) - */ - std::string _rangeProjectionType; - /** - * @brief Number of columns - */ - double _nbCol; - /** - * @brief Number of lines - */ - double _nbLin; - /** - * @brief Mean Pixel spacing - */ - double _pixel_spacing_mean; - /** - * @brief Pixel spacing at near range - */ - double _pixel_spacing_near; - /** - * @brief Pixel spacing at far range - */ - double _pixel_spacing_far; - /** - * @brief Slant Range TO Ground Range Projection reference point - */ - double _SrToGr_R0; - /** - * @brief Slant Range TO Ground Range Projection coefficients - */ - std::vector<double> _SrToGr_coeffs; - - /** - * @brief Slant Range TO Ground Range Projection exponents - */ - std::vector<int> _SrToGr_exps; - - /** - * @brief Number of data points - */ - int _ndata; - - /** - * @brief Data point position/velocity - */ - std::vector<std::string> _eph_date; - std::vector<double> _posX; - std::vector<double> _posY; - std::vector<double> _posZ; - std::vector<double> _velX; - std::vector<double> _velY; - std::vector<double> _velZ; - - /** - * @brief Scene corners + scene center longitudes - */ - double _cornersLon[5]; - /** - * @brief Scene corners + scene center latitudes - */ - double _cornersLat[5]; - /** - * @brief Scene corners + scene center columns - */ - int _cornersCol[5]; - /** - * @brief Scene corners + scene center lines - */ - int _cornersLin[5]; - -private: - -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ossimErsSarTileSource.h b/Utilities/otbossim/include/ossim/imaging/ossimErsSarTileSource.h deleted file mode 100644 index 1c636b608f..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ossimErsSarTileSource.h +++ /dev/null @@ -1,114 +0,0 @@ -#ifndef ossimErsSarTileSource_H -#define ossimErsSarTileSource_H - - -#include <ossim/imaging/ossimImageHandler.h> -#include <ossim/base/ossimIrect.h> -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h> - -class ossimImageData; - -/** - * @brief This class is able to read an ErsSar file structure - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 10-12-07 - */ -class OSSIMDLLEXPORT ossimErsSarTileSource : public ossimImageHandler -{ -public: - ossimErsSarTileSource(); - - virtual ~ossimErsSarTileSource(); - - virtual ossimString getLongName() const; - virtual ossimString getShortName() const; - - /*! - * Method to save the state of an object to a keyword list. - * Return true if ok or false on error. - */ - virtual bool saveState(ossimKeywordlist& kwl, - const char* prefix=0)const; - - /*! - * Method to the load (recreate) the state of an object from a keyword - * list. Return true if ok or false on error. - */ - virtual bool loadState(const ossimKeywordlist& kwl, - const char* prefix=0); - - /*! - * Returns true if the image_file can be opened and is a valid tiff file. - */ - virtual bool open(); - virtual void close(); - virtual bool isOpen()const; - /*! - * Returns the number of lines in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - - /*! - * Returns the number of samples in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - /*! - * Returns the width of the output tile. - */ - virtual ossim_uint32 getImageTileWidth() const - { - return 0; - }; - - /*! - * Returns the height of the output tile. - */ - virtual ossim_uint32 getImageTileHeight() const - { - return 0; - }; - /*! - * Returns the number of bands in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfInputBands() const - { - return 0; - }; - - /** - * @brief Populates the keyword list with image geometry information - * - * This method is used to relay projection/model information to users. - * @param kwl Keyword list that will be initialized with geometry info. Returns true if geometry info is present, false if not. - * @param prefix The prefix is added to the resulting keyword list keywords. So is you if you pass in a prefix of "image01.", the keyword ul_lat will be like: "image01.ul_lat: -40.00000" - */ - bool getImageGeometry(ossimKeywordlist& kwl,const char* prefix = 0); - -protected: - /** - * @brief List of metadata contained in the Data file - */ - ErsSarData * _ErsSardata; - - /** - * @brief List of metadata contained in the Leader file - */ - ErsSarLeader * _ErsSarleader; - -private: - - TYPE_DATA -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ossimImageHandlerSarFactory.h b/Utilities/otbossim/include/ossim/imaging/ossimImageHandlerSarFactory.h deleted file mode 100644 index ff88deb30f..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ossimImageHandlerSarFactory.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef ossimImageHandlerSarFactory_HEADER -#define ossimImageHandlerSarFactory_HEADER -#include <ossim/imaging/ossimImageHandlerFactoryBase.h> - -#include <ossim/base/ossimString.h> - -class ossimImageHandler; -class ossimFilename; -class ossimKeywordlist; - -/** - * @ingroup ProcessingParametersRecord - * @brief This class handle all the SAR file reader classes - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 18-01-08 - */ -class OSSIMDLLEXPORT ossimImageHandlerSarFactory : public ossimImageHandlerFactoryBase -{ -public: - virtual ~ossimImageHandlerSarFactory(); - static ossimImageHandlerSarFactory* instance(); - - virtual ossimImageHandler* open(const ossimFilename& fileName)const; - virtual ossimImageHandler* open(const ossimKeywordlist& kwl, - const char* prefix=0)const; - - - virtual ossimObject* createObject(const ossimString& typeName)const; - - /*! - * Creates and object given a keyword list. - */ - virtual ossimObject* createObject(const ossimKeywordlist& kwl, - const char* prefix=0)const; - - /*! - * This should return the type name of all objects in all factories. - * This is the name used to construct the objects dynamially and this - * name must be unique. - */ - virtual void getTypeNameList(std::vector<ossimString>& typeList)const; - virtual void getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const; - -protected: - ossimImageHandlerSarFactory(){} - ossimImageHandlerSarFactory(const ossimImageHandlerSarFactory&){} - void operator = (const ossimImageHandlerSarFactory&){} - - static ossimImageHandlerSarFactory* theInstance; - -TYPE_DATA -}; - -#endif diff --git a/Utilities/otbossim/include/ossim/imaging/ossimRadarSat2TileSource.h b/Utilities/otbossim/include/ossim/imaging/ossimRadarSat2TileSource.h deleted file mode 100644 index 7ca73da932..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ossimRadarSat2TileSource.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef ossimRadarSat2TileSource_H -#define ossimRadarSat2TileSource_H - - -#include <ossim/imaging/ossimImageHandler.h> -#include <ossim/base/ossimIrect.h> -#include <ossim/imaging/RadarSat2/Rds2Annotation.h> - -class ossimImageData; - -/** - * @brief This class is able to read a RadarSat2 file structure - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 03-20-08 - */ -class OSSIMDLLEXPORT ossimRadarSat2TileSource : public ossimImageHandler -{ -public: - ossimRadarSat2TileSource(); - - virtual ~ossimRadarSat2TileSource(); - - virtual ossimString getLongName() const; - virtual ossimString getShortName() const; - - /*! - * Method to save the state of an object to a keyword list. - * Return true if ok or false on error. - */ - virtual bool saveState(ossimKeywordlist& kwl, - const char* prefix=0)const; - - /*! - * Method to the load (recreate) the state of an object from a keyword - * list. Return true if ok or false on error. - */ - virtual bool loadState(const ossimKeywordlist& kwl, - const char* prefix=0); - - /*! - * Returns true if the image_file can be opened and is a valid tiff file. - */ - virtual bool open(); - virtual void close(); - virtual bool isOpen()const; - /*! - * Returns the number of lines in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - - /*! - * Returns the number of samples in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - /*! - * Returns the width of the output tile. - */ - virtual ossim_uint32 getImageTileWidth() const - { - return 0; - }; - - /*! - * Returns the height of the output tile. - */ - virtual ossim_uint32 getImageTileHeight() const - { - return 0; - }; - /*! - * Returns the number of bands in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfInputBands() const - { - return 0; - }; - - /** - * @brief Populates the keyword list with image geometry information - * - * This method is used to relay projection/model information to users. - * @param kwl Keyword list that will be initialized with geometry info. Returns true if geometry info is present, false if not. - * @param prefix The prefix is added to the resulting keyword list keywords. So is you if you pass in a prefix of "image01.", the keyword ul_lat will be like: "image01.ul_lat: -40.00000" - */ - bool getImageGeometry(ossimKeywordlist& kwl,const char* prefix = 0); -protected: - /** - * @brief List of metadata contained in the XML Annotation file - */ - Rds2Annotation * _annotation; - -private: - - TYPE_DATA -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/imaging/ossimTerraSarTileSource.h b/Utilities/otbossim/include/ossim/imaging/ossimTerraSarTileSource.h deleted file mode 100644 index 8969eb76ce..0000000000 --- a/Utilities/otbossim/include/ossim/imaging/ossimTerraSarTileSource.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef ossimTerraSarTileSource_H -#define ossimTerraSarTileSource_H - - -#include <ossim/imaging/ossimImageHandler.h> -#include <ossim/base/ossimIrect.h> -#include <ossim/imaging/TerraSar/TsxAnnotation.h> - -class ossimImageData; - -/** - * @brief This class is able to read a TerraSar file structure - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 02-19-08 - */ -class OSSIMDLLEXPORT ossimTerraSarTileSource : public ossimImageHandler -{ -public: - ossimTerraSarTileSource(); - - virtual ~ossimTerraSarTileSource(); - - virtual ossimString getLongName() const; - virtual ossimString getShortName() const; - - /*! - * Method to save the state of an object to a keyword list. - * Return true if ok or false on error. - */ - virtual bool saveState(ossimKeywordlist& kwl, - const char* prefix=0)const; - - /*! - * Method to the load (recreate) the state of an object from a keyword - * list. Return true if ok or false on error. - */ - virtual bool loadState(const ossimKeywordlist& kwl, - const char* prefix=0); - - /*! - * Returns true if the image_file can be opened and is a valid tiff file. - */ - virtual bool open(); - virtual void close(); - virtual bool isOpen()const; - /*! - * Returns the number of lines in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - - /*! - * Returns the number of samples in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const - { - return 0; - }; - /*! - * Returns the width of the output tile. - */ - virtual ossim_uint32 getImageTileWidth() const - { - return 0; - }; - - /*! - * Returns the height of the output tile. - */ - virtual ossim_uint32 getImageTileHeight() const - { - return 0; - }; - /*! - * Returns the number of bands in the image. - * Satisfies pure virtual from ImageHandler class. - */ - virtual ossim_uint32 getNumberOfInputBands() const - { - return 0; - }; - - /** - * @brief Populates the keyword list with image geometry information - * - * This method is used to relay projection/model information to users. - * @param kwl Keyword list that will be initialized with geometry info. Returns true if geometry info is present, false if not. - * @param prefix The prefix is added to the resulting keyword list keywords. So is you if you pass in a prefix of "image01.", the keyword ul_lat will be like: "image01.ul_lat: -40.00000" - */ - bool getImageGeometry(ossimKeywordlist& kwl,const char* prefix = 0); -protected: - /** - * @brief List of metadata contained in the XML Annotation file - */ - TsxAnnotation * _annotation; - -private: - - TYPE_DATA -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/projection/ossimErsSarModel.h b/Utilities/otbossim/include/ossim/projection/ossimErsSarModel.h deleted file mode 100644 index a25a6358ab..0000000000 --- a/Utilities/otbossim/include/ossim/projection/ossimErsSarModel.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef ossimErsSarModel_H -#define ossimErsSarModel_H - -#include <ossim/projection/SARModel/DateTime/JSDDateTime.h> - -#include <ossim/projection/ossimGeometricSarSensorModel.h> -#include <ossim/projection/ossimMapProjection.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimGpt.h> -#include <ossim/base/ossimDpt.h> - -#include <iostream> - -class PlatformPosition; -class SensorParams; -class RefPoint; -/** - * @brief This class is able to direct localisation and indirect localisation using the ErsSar sensor model - * @author Magellium, Pacome Dentraygues - * @version 1.0 - * @date 04-01-08 - */ -class OSSIMDLLEXPORT ossimErsSarModel : public ossimGeometricSarSensorModel -{ -public: - /** - * @brief Constructor - */ - ossimErsSarModel(); - - /** - * @brief Destructor - */ - ~ossimErsSarModel(); - - /** - * @brief This function associates an image column number to a slant range when the image is georeferenced (ground projected) - * @param col Column coordinate of the image point - */ - virtual double getSlantRangeFromGeoreferenced(double col) const; - -protected: - /** - * @brief Slant Range for each Ground Range (SRGR) number of coefficients sets - */ - int _n_srgr; - /** - * @brief SRGR coefficient sets - */ - double _srgr_coefset[1][3]; - /** - * @brief Pixel spacing - */ - double _pixel_spacing; - -private: - virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix); - /** - * @brief Initializes the Slant Range for each Ground Range data sets : _n_srgr,_srgr_coefset,_srgr_update,_pixel_spacing,_isProductGeoreferenced - */ - virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix); - - TYPE_DATA - -}; - -#endif diff --git a/Utilities/otbossim/include/ossim/projection/ossimGeometricSarSensorModel.h b/Utilities/otbossim/include/ossim/projection/ossimGeometricSarSensorModel.h deleted file mode 100644 index acb58fa46f..0000000000 --- a/Utilities/otbossim/include/ossim/projection/ossimGeometricSarSensorModel.h +++ /dev/null @@ -1,175 +0,0 @@ -#ifndef ossimGeometricSarSensorModel_H -#define ossimGeometricSarSensorModel_H - -#include <ossim/projection/ossimSensorModel.h> -#include <ossim/projection/ossimMapProjection.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimGpt.h> -#include <ossim/base/ossimDpt.h> -#include <ossim/base/ossimEcefRay.h> -#include <ossim/base/ossimEcefPoint.h> -#include <ossim/base/ossimMatrix3x3.h> -#include <iostream> -#include <list> -#include <cstdlib> - -#include <ossim/projection/SARModel/DateTime/CivilDateTime.h> - -class PlatformPosition; -class SensorParams; -class RefPoint; -/** - * @brief This class allows for direct localisation and indirect localisation using the geometric model of SAR sensors. - * This class must be specified for each sensor. - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 03-18-08 - */ -class OSSIMDLLEXPORT ossimGeometricSarSensorModel : public ossimSensorModel -{ -public: - /** - * @brief Constructor - */ - ossimGeometricSarSensorModel(); - - /** - * @brief Destructor - */ - ~ossimGeometricSarSensorModel(); - - /** - * @brief This function associates an image column number to a slant range when the image is georeferenced (ground projected) - * @param col Column coordinate of the image point - */ - virtual double getSlantRangeFromGeoreferenced(double col) const=0; - - /** - * @brief This function associates an image column number to a slant range - * @param col Column coordinate of the image point - */ - virtual double getSlantRange(double col) const; - - /** - * @brief This function associates an image line number to an azimuth time - * @param line Line coordinate of the image point - */ - virtual JSDDateTime getTime(double line) const; - - /** - * @brief This function is able to convert image coordinates into world coordinates the geometric model of SAR sensors. - * @param image_point Coordinates of the image point - * @param heightEllipsoid Altitude of the world point - * @param worldPoint Coordinates of the world point (OUT) - */ - virtual void lineSampleHeightToWorld(const ossimDpt& image_point, - const double& heightEllipsoid, - ossimGpt& worldPoint) const; - - - /** - * @brief This function optimizes the model according to a list of Ground Control Points. - * The input list of GCPs is appended to the one present in memory. - * An inverse localization of each ground GCP is performed. - * The error between localized GCPs and actual image coordinates is then computed and - * modeled by a linear model on each dimension. - * The time and range estimations are updated accordingly. - * - * @param groundCoordinates : input GCP ground coordinates - * @param imageCoordinates : actual image coordinates corresponding to input groundCoordinates - * - */ - virtual bool optimizeModel(const std::list<ossimGpt> & groundCoordinates, const std::list<ossimDpt> & imageCoordinates) ; - - /** - * @brief Clears _optimizationGCPsGroundCoordinates and _optimizationGCPsImageCoordinates attributes - * Updates the optimisation factors and bias - */ - virtual void clearGCPlist() ; - - /** - * @brief Returns _optimizationGCPsGroundCoordinates and _optimizationGCPsImageCoordinates attributes - * - * @retval groundCoordinates : GCP ground coordinates - * @retval imageCoordinates : actual image coordinates corresponding to groundCoordinates - */ - virtual void getGCPlist(std::list<ossimGpt> &groundCoordinates, std::list<ossimDpt> & imageCoordinates) ; - - /** - * @brief Returns pointer to a new instance, copy of this. - * @remark This function always return NULL; - */ - virtual ossimObject* dup() const { return 0; }; - - /** - * @brief - * @return true when it's better (more accurate / fast) to use forward (from ground to image) than inverse(from image to ground) - * @remark This function always return false - */ - inline virtual bool useForward()const {return false;}; - - /** - * @brief Method to the load (recreate) the state of the object from a keyword list. Return true if ok or false on error. - * @return true if load OK, false on error - */ - virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0); - - /** - * @brief Accessors to the optimization parameters. - */ - double get_optimizationFactorX() { return _optimizationFactorX; }; - double get_optimizationFactorY() { return _optimizationFactorY; } ; - double get_optimizationBiasX() { return _optimizationBiasX; } ; - double get_optimizationBiasY() { return _optimizationBiasY; } ; - -protected: - - /** - * @brief Handle the position of the platform - */ - PlatformPosition *_platformPosition; - SensorParams * _sensor; - RefPoint * _refPoint; - - /** - * @brief True iff the product is ground range - */ - bool _isProductGeoreferenced ; - - /** - * @brief List Ground Control Points used by the optimization - */ - std::list<ossimGpt> _optimizationGCPsGroundCoordinates ; - std::list<ossimDpt> _optimizationGCPsImageCoordinates ; - - /** - * @brief Optimization result : linear error correction in both dimensions - */ - double _optimizationFactorX ; - double _optimizationFactorY ; - double _optimizationBiasX ; - double _optimizationBiasY ; - -private: - /** - * @brief Initializes the Platform Position from a projection keywordlist - */ - virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix)=0; - /** - * @brief Initializes the Sensor Params from a projection keywordlist - */ - virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix)=0; - /** - * @brief Initializes the Reference Point from a projection keywordlist - */ - virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix)=0; - /** - * @brief Initializes the Slant Range to/for each Ground Range data sets from a projection keywordlist - */ - virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix)=0; - - TYPE_DATA -}; - -#endif diff --git a/Utilities/otbossim/include/ossim/projection/ossimRadarSat2Model.h b/Utilities/otbossim/include/ossim/projection/ossimRadarSat2Model.h deleted file mode 100644 index 6eef8d247c..0000000000 --- a/Utilities/otbossim/include/ossim/projection/ossimRadarSat2Model.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef ossimRadarSat2Model_H -#define ossimRadarSat2Model_H - -#include <ossim/projection/ossimGeometricSarSensorModel.h> -#include <ossim/projection/ossimMapProjection.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimGpt.h> -#include <ossim/base/ossimDpt.h> -#include <iostream> -#include <list> - -#include <ossim/projection/SARModel/DateTime/CivilDateTime.h> - -class PlatformPosition; -class SensorParams; -class RefPoint; -/** - * @brief This class allows for direct localisation and indirect localisation using the RadarSat2 sensor model - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 03-20-08 - */ -class OSSIMDLLEXPORT ossimRadarSat2Model : public ossimGeometricSarSensorModel -{ -public: - /** - * @brief Constructor - */ - ossimRadarSat2Model(); - - /** - * @brief Destructor - */ - ~ossimRadarSat2Model(); - - /** - * @brief This function associates an image column number to a slant range when the image is georeferenced (ground projected) - * @param col Column coordinate of the image point - */ - virtual double getSlantRangeFromGeoreferenced(double col) const; - -protected: - - /** - * @brief Number of columns - */ - double _nbCol; - /** - * @brief Pixel spacing - */ - double _pixel_spacing; - /** - * @brief Slant Range FOR EACH Ground Range (SRGR) number of coefficients sets - */ - int _n_srgr; - /** - * @brief Slant Range FOR EACH Ground Range coefficient sets update times - */ - std::vector<double> _srgr_update; - /** - * @brief Slant Range FOR EACH Ground Range Projection reference point - */ - std::vector<double> _SrGr_R0 ; - /** - * @brief Slant Range FOR EACH Ground Range Projection coefficients - */ - std::vector< std::vector<double> > _SrGr_coeffs ; - -private: - virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix); - /** - * @brief Initializes the Slant Range to Ground Range data sets : - * _srgr_update,_SrGr_R0,_SrGr_coeffs_number,_SrGr_coeffs,_nbCol,_pixel_spacing - */ - virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix); - - bool UtcDateTimeStringToCivilDate(const std::string &utcString, CivilDateTime &outputDate); - /** - * @brief Finds the SRGR data set which update time is the closest to the center scene time - */ - int FindSRGRSetNumber(JSDDateTime date) const; - - TYPE_DATA -}; - -#endif \ No newline at end of file diff --git a/Utilities/otbossim/include/ossim/projection/ossimTerraSarModel.h b/Utilities/otbossim/include/ossim/projection/ossimTerraSarModel.h deleted file mode 100644 index d8df6ccd3e..0000000000 --- a/Utilities/otbossim/include/ossim/projection/ossimTerraSarModel.h +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef ossimTerraSarModel_H -#define ossimTerraSarModel_H - -#include <ossim/projection/ossimGeometricSarSensorModel.h> -#include <ossim/projection/ossimMapProjection.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimGpt.h> -#include <ossim/base/ossimDpt.h> -#include <iostream> -#include <list> - -#include <ossim/projection/SARModel/DateTime/CivilDateTime.h> - -class PlatformPosition; -class SensorParams; -class RefPoint; -/** - * @brief This class allows for direct localisation and indirect localisation using the TerraSar sensor model - * @author Magellium, Vincent Martin - * @version 1.0 - * @date 02-20-08 - */ -class OSSIMDLLEXPORT ossimTerraSarModel : public ossimGeometricSarSensorModel -{ -public: - /** - * @brief Constructor - */ - ossimTerraSarModel(); - - /** - * @brief Destructor - */ - ~ossimTerraSarModel(); - - /** - * @brief This function associates an image column number to a slant range when the image is georeferenced (ground projected) - * @param col Column coordinate of the image point - */ - virtual double getSlantRangeFromGeoreferenced(double col) const; - -protected: - - /** - * @brief Number of columns - */ - double _nbCol; - /** - * @brief Slant Range TO Ground Range Projection reference point - */ - double _SrToGr_R0 ; - /** - * @brief Slant Range TO Ground Range Projection exponents - */ - std::vector<int> _SrToGr_exponent ; - /** - * @brief Slant Range TO Ground Range Projection coefficients - */ - std::vector<double> _SrToGr_coeffs ; - /** - * @brief Scene Center range time - */ - double _sceneCenterRangeTime; - /** - * @brief Slant Range TO Ground Range scaling factor at scene center - */ - double _SrToGr_scaling_factor ; - - /** - * @brief alternative SRGR computation coefficients - */ - double _alt_srgr_coefset[3]; - -private: - virtual bool InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitSensorParams(const ossimKeywordlist &kwl, const char *prefix); - virtual bool InitRefPoint(const ossimKeywordlist &kwl, const char *prefix); - /** - * @brief Initializes the Slant Range to Ground Range data sets : - * _SrToGr_R0,_SrToGr_coeffs_number,_SrToGr_exponent,_SrToGr_coeffs,_nbCol - */ - virtual bool InitSRGR(const ossimKeywordlist &kwl, const char *prefix); - - bool UtcDateTimeStringToCivilDate(const std::string &utcString, CivilDateTime &outputDate); - - TYPE_DATA -}; - -#endif diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarData.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarData.cpp deleted file mode 100644 index b8384d9bf0..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarData.cpp +++ /dev/null @@ -1,118 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarData.h> -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - -const int ErsSarData::ErsSarImageOptionsFileDescriptorID = 1; - -ErsSarData::ErsSarData() -{ -} - -ErsSarData::~ErsSarData() -{ - ClearRecords(); -} - -std::ostream& operator<<(std::ostream& os, const ErsSarData& data) -{ - std::map<int, ErsSarRecord*>::const_iterator it = data._records.begin(); - while(it != data._records.end()) - { - (*it).second->Write(os); - ++it; - } - return os; - -} - -std::istream& operator>>(std::istream& is, ErsSarData& data) -{ - ErsSarDataFactory factory; - - data.ClearRecords(); - - if (sizeof(int)!=4) std::cout << "ErsSarData WARNING : (int) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ; - if (sizeof(float)!=4) std::cout << "ErsSarData WARNING : (float) not coded over 32 bits, metadata might not be byte swapped correctly"<< std::endl ; - if (sizeof(double)!=8) std::cout << "ErsSarData WARNING : (double) not coded over 64 bits, metadata might not be byte swapped correctly"<< std::endl ; - - /* - ErsSarRecordHeader header; - bool eof = false; - //while(!eof) - { - is>>header; - if(is.eof()) - { - eof = true; - } - else - { - ErsSarRecord* record = factory.Instanciate(header.get_rec_seq()); - if (record != NULL) - { - record->Read(is); - data._records[header.get_rec_seq()] = record; - } - else - { - char* buff = new char[header.get_length()]; - is.read(buff, header.get_length()); - delete buff; - } - } - } - */ - return is; -} - - -ErsSarData::ErsSarData(const ErsSarData& rhs) -{ - std::map<int, ErsSarRecord*>::const_iterator it = rhs._records.begin(); - while(it != rhs._records.end()) - { - _records[(*it).first] = (*it).second->Clone(); - ++it; - } -} - -ErsSarData& ErsSarData::operator=(const ErsSarData& rhs) -{ - std::map<int, ErsSarRecord*>::const_iterator it = _records.begin(); - while(it != _records.end()) - { - delete (*it).second; - ++it; - } - _records.clear(); - - it = rhs._records.begin(); - while(it != rhs._records.end()) - { - _records[(*it).first] = (*it).second->Clone(); - ++it; - } - - return *this; -} - -void ErsSarData::ClearRecords() -{ - std::map<int, ErsSarRecord*>::const_iterator it = _records.begin(); - while(it != _records.end()) - { - delete (*it).second; - ++it; - } - _records.clear(); -} - -void ErsSarData::InsertRecord(int id, ErsSarRecord* record) -{ - _records[id] = record; -} - -ErsSarImageOptionsFileDescriptor* ErsSarData::get_ErsSarImageOptionsFileDescriptor() -{ - return (ErsSarImageOptionsFileDescriptor*)_records[ErsSarImageOptionsFileDescriptorID]; -} diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.cpp deleted file mode 100644 index f2cea3306d..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h> - -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h> - - -ErsSarDataFactory::ErsSarDataFactory() -{ - RegisterRecord(0, new ErsSarImageOptionsFileDescriptor()); - RegisterRecord(1, new ErsSarImageOptionsFileDescriptor()); -} - -ErsSarDataFactory::~ErsSarDataFactory() -{ - -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.cpp deleted file mode 100644 index b9a08c49f9..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.cpp +++ /dev/null @@ -1,353 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h> - - -ErsSarImageOptionsFileDescriptor::ErsSarImageOptionsFileDescriptor() : ErsSarRecord("imop_desc_rec") -{ -} - -ErsSarImageOptionsFileDescriptor::~ErsSarImageOptionsFileDescriptor() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarImageOptionsFileDescriptor& data) -{ - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; - - os<<"format_doc:"<<data._format_doc.c_str()<<std::endl; - - os<<"format_rev:"<<data._format_rev.c_str()<<std::endl; - - os<<"design_rev:"<<data._design_rev.c_str()<<std::endl; - - os<<"software_id:"<<data._software_id.c_str()<<std::endl; - - os<<"file_num:"<<data._file_num<<std::endl; - - os<<"file_name:"<<data._file_name.c_str()<<std::endl; - - os<<"rec_seq:"<<data._rec_seq.c_str()<<std::endl; - - os<<"seq_loc:"<<data._seq_loc<<std::endl; - - os<<"seq_len:"<<data._seq_len<<std::endl; - - os<<"rec_code:"<<data._rec_code.c_str()<<std::endl; - - os<<"code_loc:"<<data._code_loc<<std::endl; - - os<<"code_len:"<<data._code_len<<std::endl; - - os<<"rec_len:"<<data._rec_len.c_str()<<std::endl; - - os<<"rlen_loc:"<<data._rlen_loc<<std::endl; - - os<<"rlen_len:"<<data._rlen_len<<std::endl; - - os<<"n_dataset:"<<data._n_dataset<<std::endl; - - os<<"l_dataset:"<<data._l_dataset<<std::endl; - - os<<"nbit:"<<data._nbit<<std::endl; - - os<<"nsamp:"<<data._nsamp<<std::endl; - - os<<"nbyte:"<<data._nbyte<<std::endl; - - os<<"justify:"<<data._justify.c_str()<<std::endl; - - os<<"nchn:"<<data._nchn<<std::endl; - - os<<"nlin:"<<data._nlin<<std::endl; - - os<<"nleft:"<<data._nleft<<std::endl; - - os<<"ngrp:"<<data._ngrp<<std::endl; - - os<<"nright:"<<data._nright<<std::endl; - - os<<"ntop:"<<data._ntop<<std::endl; - - os<<"nbott:"<<data._nbott<<std::endl; - - os<<"intleav:"<<data._intleav.c_str()<<std::endl; - - os<<"nrec_lin:"<<data._nrec_lin<<std::endl; - - os<<"nrec_chn:"<<data._nrec_chn<<std::endl; - - os<<"n_prefix:"<<data._n_prefix<<std::endl; - - os<<"n_sar:"<<data._n_sar<<std::endl; - - os<<"n_suffix:"<<data._n_suffix<<std::endl; - - os<<"lin_loc:"<<data._lin_loc.c_str()<<std::endl; - - os<<"chn_loc:"<<data._chn_loc.c_str()<<std::endl; - - os<<"tim_loc:"<<data._tim_loc.c_str()<<std::endl; - - os<<"left_loc:"<<data._left_loc.c_str()<<std::endl; - - os<<"right_loc:"<<data._right_loc.c_str()<<std::endl; - - os<<"pad_ind:"<<data._pad_ind.c_str()<<std::endl; - - os<<"qual_loc:"<<data._qual_loc.c_str()<<std::endl; - - os<<"cali_loc:"<<data._cali_loc.c_str()<<std::endl; - - os<<"gain_loc:"<<data._gain_loc.c_str()<<std::endl; - - os<<"bias_loc:"<<data._bias_loc.c_str()<<std::endl; - - os<<"type_id:"<<data._type_id.c_str()<<std::endl; - - os<<"type_code:"<<data._type_code.c_str()<<std::endl; - - os<<"left_fill:"<<data._left_fill<<std::endl; - - os<<"right_fill:"<<data._right_fill<<std::endl; - - os<<"pix_rng:"<<data._pix_rng<<std::endl; - - return os; -} - -std::istream& operator>>(std::istream& is, ErsSarImageOptionsFileDescriptor& data) -{ - char buf[15805]; - buf[15804] = '\0'; - - is.read(buf,2); - buf[2] = '\0'; - data._ascii_flag = buf; - - is.read(buf,2); - - is.read(buf,12); - buf[12] = '\0'; - data._format_doc = buf; - - is.read(buf,2); - buf[2] = '\0'; - data._format_rev = buf; - - is.read(buf,2); - buf[2] = '\0'; - data._design_rev = buf; - - is.read(buf,12); - buf[12] = '\0'; - data._software_id = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._file_num = atoi(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._file_name = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._rec_seq = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._seq_loc = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._seq_len = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._rec_code = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._code_loc = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._code_len = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._rec_len = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._rlen_loc = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._rlen_len = atoi(buf); - - for (int i=0;i<4;i++) - { - is.read(buf,1); - } - - is.read(buf,64); - - is.read(buf,6); - buf[6] = '\0'; - data._n_dataset = atoi(buf); - - is.read(buf,6); - buf[6] = '\0'; - data._l_dataset = atoi(buf); - - is.read(buf,24); - - is.read(buf,4); - buf[4] = '\0'; - data._nbit = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._nsamp = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._nbyte = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._justify = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._nchn = atoi(buf); - - is.read(buf,8); - buf[8] = '\0'; - data._nlin = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._nleft = atoi(buf); - - is.read(buf,8); - buf[8] = '\0'; - data._ngrp = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._nright = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._ntop = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._nbott = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._intleav = buf; - - is.read(buf,2); - buf[2] = '\0'; - data._nrec_lin = atoi(buf); - - is.read(buf,2); - buf[2] = '\0'; - data._nrec_chn = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._n_prefix = atoi(buf); - - is.read(buf,8); - buf[8] = '\0'; - data._n_sar = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._n_suffix = atoi(buf); - - is.read(buf,4); - - is.read(buf,8); - buf[8] = '\0'; - data._lin_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._chn_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._tim_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._left_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._right_loc = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._pad_ind = buf; - - is.read(buf,28); - - is.read(buf,8); - buf[8] = '\0'; - data._qual_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._cali_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._gain_loc = buf; - - is.read(buf,8); - buf[8] = '\0'; - data._bias_loc = buf; - - is.read(buf,28); - buf[28] = '\0'; - data._type_id = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._type_code = buf; - - is.read(buf,4); - buf[4] = '\0'; - data._left_fill = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._right_fill = atoi(buf); - - is.read(buf,8); - buf[8] = '\0'; - data._pix_rng = atoi(buf); - - is.read(buf,15564); - - return is; -} - -ErsSarImageOptionsFileDescriptor::ErsSarImageOptionsFileDescriptor(const ErsSarImageOptionsFileDescriptor& rhs): - ErsSarRecord(rhs) -{ - - -} - -ErsSarImageOptionsFileDescriptor& ErsSarImageOptionsFileDescriptor::operator=(const ErsSarImageOptionsFileDescriptor& rhs) -{ - - return *this; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.cpp deleted file mode 100644 index 26d3c00756..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.cpp +++ /dev/null @@ -1,760 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h> - -ErsSarDataSetSummary::ErsSarDataSetSummary() : ErsSarRecord("dataset_sum_rec") -{ -} - -ErsSarDataSetSummary::~ErsSarDataSetSummary() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarDataSetSummary& data) -{ - os<<"seq_num:"<<data._seq_num<<std::endl; - - os<<"sar_chn:"<<data._sar_chn<<std::endl; - - os<<"scene_id:"<<data._scene_id.c_str()<<std::endl; - - os<<"scene_des:"<<data._scene_des.c_str()<<std::endl; - - os<<"inp_sctim:"<<data._inp_sctim.c_str()<<std::endl; - - os<<"asc_des:"<<data._asc_des.c_str()<<std::endl; - - os<<"pro_lat:"<<data._pro_lat<<std::endl; - - os<<"pro_long:"<<data._pro_long<<std::endl; - - os<<"pro_head:"<<data._pro_head<<std::endl; - - os<<"ellip_des:"<<data._ellip_des.c_str()<<std::endl; - - os<<"ellip_maj:"<<data._ellip_maj<<std::endl; - - os<<"ellip_min:"<<data._ellip_min<<std::endl; - os<<"earth_mass:"<<data._earth_mass<<std::endl; - os<<"grav_const:"<<data._grav_const<<std::endl; - os<<"ellip_j[0]:"<<data._ellip_j[0]<<std::endl; - os<<"ellip_j[1]:"<<data._ellip_j[1]<<std::endl; - os<<"ellip_j[2]:"<<data._ellip_j[2]<<std::endl; - os<<"terrain_h:"<<data._terrain_h<<std::endl; - os<<"sc_lin:"<<data._sc_lin<<std::endl; - os<<"sc_pix:"<<data._sc_pix<<std::endl; - os<<"scene_len:"<<data._scene_len<<std::endl; - os<<"scene_wid:"<<data._scene_wid<<std::endl; - os<<"nchn:"<<data._nchn<<std::endl; - os<<"mission_id:"<<data._mission_id.c_str()<<std::endl; - os<<"sensor_id:"<<data._sensor_id.c_str()<<std::endl; - os<<"orbit_num:"<<data._orbit_num.c_str()<<std::endl; - - os<<"plat_lat:"<<data._plat_lat<<std::endl; - - os<<"plat_long:"<<data._plat_long<<std::endl; - - os<<"plat_head:"<<data._plat_head<<std::endl; - - os<<"clock_ang:"<<data._clock_ang<<std::endl; - - os<<"incident_ang:"<<data._incident_ang<<std::endl; - - - os<<"wave_length:"<<data._wave_length<<std::endl; - - os<<"motion_comp:"<<data._motion_comp.c_str()<<std::endl; - - os<<"pulse_code:"<<data._pulse_code.c_str()<<std::endl; - - for (int i=0;i<5;i++) - { - os<<"ampl_coef["<<i<<"]:"<<data._ampl_coef[i]<<std::endl; - } - - for (int i=0;i<5;i++) - { - os<<"phas_coef["<<i<<"]:"<<data._phas_coef[i]<<std::endl; - } - - os<<"chirp_ext_ind:"<<data._chirp_ext_ind<<std::endl; - - os<<"fr:"<<data._fr<<std::endl; - - os<<"rng_gate:"<<data._rng_gate<<std::endl; - - os<<"rng_length:"<<data._rng_length<<std::endl; - - os<<"baseband_f:"<<data._baseband_f.c_str()<<std::endl; - - os<<"rngcmp_f:"<<data._rngcmp_f.c_str()<<std::endl; - - os<<"gn_polar:"<<data._gn_polar <<std::endl; - - os<<"gn_cross:"<<data._gn_cross <<std::endl; - - os<<"chn_bits:"<<data._chn_bits<<std::endl; - - os<<"quant_desc:"<<data._quant_desc.c_str()<<std::endl; - - os<<"i_bias:"<<data._i_bias<<std::endl; - - os<<"q_bias:"<<data._q_bias<<std::endl; - - os<<"iq_ratio:"<<data._iq_ratio<<std::endl; - - os<<"mech_sight:"<<data._mech_sight<<std::endl; - - os<<"fa:"<<data._fa<<std::endl; - - os<<"sat_bintim:"<<data._sat_bintim.c_str()<<std::endl; - - os<<"sat_clktim:"<<data._sat_clktim.c_str()<<std::endl; - - os<<"sat_clkinc:"<<data._sat_clkinc.c_str()<<std::endl; - - os<<"fac_id:"<<data._fac_id.c_str()<<std::endl; - - os<<"sys_id:"<<data._sys_id.c_str()<<std::endl; - - os<<"ver_id:"<<data._ver_id.c_str()<<std::endl; - - os<<"prod_type:"<<data._prod_type.c_str()<<std::endl; - - os<<"algor_id:"<<data._algor_id.c_str()<<std::endl; - - os<<"n_azilok:"<<data._n_azilok<<std::endl; - - os<<"n_rnglok:"<<data._n_rnglok<<std::endl; - - os<<"bnd_azilok:"<<data._bnd_azilok<<std::endl; - - os<<"bnd_rnglok:"<<data._bnd_rnglok<<std::endl; - - os<<"bnd_azi:"<<data._bnd_azi<<std::endl; - - os<<"bnd_rng:"<<data._bnd_rng<<std::endl; - - os<<"azi_weight:"<<data._azi_weight.c_str()<<std::endl; - - os<<"rng_weight:"<<data._rng_weight.c_str()<<std::endl; - - os<<"data_inpsrc:"<<data._data_inpsrc.c_str()<<std::endl; - - os<<"rng_res:" << data._rng_res << std::endl; - - os<<"azi_res:" << data._azi_res << std::endl; - - os<<"alt_dopcen[0]:"<<data._alt_dopcen[0]<<std::endl; - os<<"alt_dopcen[1]:"<<data._alt_dopcen[1]<<std::endl; - os<<"alt_dopcen[2]:"<<data._alt_dopcen[2]<<std::endl; - - os<<"crt_dopcen[0]:"<<data._crt_dopcen[0]<<std::endl; - os<<"crt_dopcen[1]:"<<data._crt_dopcen[1]<<std::endl; - os<<"crt_dopcen[2]:"<<data._crt_dopcen[2]<<std::endl; - - os<<"time_dir_pix:"<<data._time_dir_pix.c_str()<<std::endl; - - os<<"time_dir_lin:"<<data._time_dir_lin.c_str()<<std::endl; - - os<<"alt_rate[0]:"<<data._alt_rate[0]<<std::endl; - os<<"alt_rate[1]:"<<data._alt_rate[1]<<std::endl; - os<<"alt_rate[2]:"<<data._alt_rate[2]<<std::endl; - - os<<"crt_rate[0]:"<<data._crt_rate[0]<<std::endl; - os<<"crt_rate[1]:"<<data._crt_rate[1]<<std::endl; - os<<"crt_rate[2]:"<<data._crt_rate[2]<<std::endl; - - os<<"clutter_lock:"<<data._line_cont.c_str()<<std::endl; - - os<<"clutter_lock:"<<data._clutter_lock.c_str()<<std::endl; - - os<<"auto_focus:"<<data._auto_focus.c_str()<<std::endl; - - os<<"line_spacing:"<<data._line_spacing<<std::endl; - - os<<"pix_spacing:"<<data._pix_spacing<<std::endl; - - os<<"rngcmp_desg:"<<data._rngcmp_desg.c_str()<<std::endl; - - os<<"zero_dop_range_time_f_pixel:"<<data._zero_dop_range_time_f_pixel<<std::endl; - - os<<"zero_dop_range_time_c_pixel:"<<data._zero_dop_range_time_c_pixel<<std::endl; - - os<<"zero_dop_range_time_l_pixel:"<<data._zero_dop_range_time_l_pixel<<std::endl; - - os<<"zero_dop_az_time_f_pixel :"<<data._zero_dop_az_time_f_pixel.c_str()<<std::endl; - - os<<" zero_dop_az_time_c_pixel:"<<data._zero_dop_az_time_c_pixel.c_str()<<std::endl; - - os<<" zero_dop_az_time_l_pixel:"<<data._zero_dop_az_time_l_pixel.c_str()<<std::endl; - - return os; - -} - -std::istream& operator>>(std::istream& is, ErsSarDataSetSummary& data) -{ - char buf16[17]; - buf16[16]='\0'; - char buf32[33]; - buf32[32] = '\0'; - char buf8[9]; - buf8[8] = '\0'; - char buf4[5]; - buf4[4] = '\0'; - - is.read(buf4,4); - data._seq_num = atoi(buf4); - - is.read(buf4,4); - data._sar_chn = atoi(buf4); - - is.read(buf16,16); - data._scene_id = buf16; - - is.read(buf32,32); - data._scene_des = buf32; - - is.read(buf32,32); - data._inp_sctim = buf32; - - is.read(buf16,16); - data._asc_des = buf16; - - is.read(buf16,16); - data._pro_lat = atof(buf16); - - is.read(buf16,16); - data._pro_long = atof(buf16); - - is.read(buf16,16); - data._pro_head = atof(buf16); - - is.read(buf16,16); - data._ellip_des = buf16; - - is.read(buf16,16); - data._ellip_maj = atof(buf16); - - is.read(buf16,16); - data._ellip_min = atof(buf16); - - is.read(buf16,16); - data._earth_mass = atof(buf16); - - is.read(buf16,16); - data._grav_const = atof(buf16); - - is.read(buf16,16); - data._ellip_j[0] = atof(buf16); - is.read(buf16,16); - data._ellip_j[1] = atof(buf16); - is.read(buf16,16); - data._ellip_j[2] = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - data._terrain_h = atof(buf16); - - is.read(buf8,8); - data._sc_lin = atoi(buf8); - - is.read(buf8,8); - data._sc_pix = atoi(buf8); - - is.read(buf16,16); - data._scene_len = atof(buf16); - - is.read(buf16,16); - data._scene_wid = atof(buf16); - - is.read(buf16,16); - - is.read(buf4,4); - data._nchn = atoi(buf4); - - is.read(buf4,4); - - is.read(buf16,16); - data._mission_id = buf16; - - is.read(buf32,32); - data._sensor_id = buf32; - - is.read(buf8,8); - data._orbit_num = buf8; - - is.read(buf8,8); - data._plat_lat = atof(buf8); - - is.read(buf8,8); - data._plat_long = atof(buf8); - - is.read(buf8,8); - data._plat_head = atof(buf8); - - is.read(buf8,8); - data._clock_ang = atof(buf8); - - is.read(buf8,8); - data._incident_ang = atof(buf8); - - is.read(buf8,8); - - is.read(buf16,16); - data._wave_length = atof(buf16); - - is.read(buf8,2); - buf8[2] = '\0'; - data._motion_comp = buf8; - - is.read(buf16,16); - data._pulse_code = buf16; - - for (int i=0;i<5;i++) - { - is.read(buf16,16); - data._ampl_coef[i] = atof(buf16); - } - - for (int i=0;i<5;i++) - { - is.read(buf16,16); - data._phas_coef[i] = atof(buf16); - } - - is.read(buf8,8); - data._chirp_ext_ind = atoi(buf8); - - is.read(buf8,8); - - is.read(buf16,16); - data._fr = atof(buf16); - - is.read(buf16,16); - data._rng_gate = atof(buf16); - - is.read(buf16,16); - data._rng_length = atof(buf16); - - is.read(buf8,4); - buf8[4] = '\0'; - data._baseband_f = buf8; - - is.read(buf8,4); - buf8[4] = '\0'; - data._rngcmp_f = buf8; - - is.read(buf16,16); - data._gn_polar = atof(buf16); - - is.read(buf16,16); - data._gn_cross = atof(buf16); - - is.read(buf8,8); - data._chn_bits = atoi(buf8); - - is.read(buf16,12); - buf16[12] = '\0'; - data._quant_desc = buf16; - - is.read(buf16,16); - data._i_bias = atof(buf16); - - is.read(buf16,16); - data._q_bias = atof(buf16); - - is.read(buf16,16); - data._iq_ratio = atof(buf16); - - is.read(buf32,32); - - is.read(buf16,16); - - is.read(buf16,16); - data._mech_sight = atof(buf16); - - is.read(buf4,4); - - is.read(buf16,16); - data._fa = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - - is.read(buf16,16); - data._sat_bintim = buf16; - - is.read(buf32,32); - data._sat_clktim = buf32; - - is.read(buf8,8); - data._sat_clkinc = buf8; - - is.read(buf8,8); - - is.read(buf16,16); - data._fac_id = buf16; - - is.read(buf8,8); - data._sys_id = buf8; - - is.read(buf8,8); - data._ver_id = buf8; - - is.read(buf32,32); - - is.read(buf32,32); - data._prod_type = buf32; - - is.read(buf32,32); - data._algor_id = buf32; - - is.read(buf16,16); - data._n_azilok = atof(buf16); - - is.read(buf16,16); - data._n_rnglok = atof(buf16); - - is.read(buf16,16); - data._bnd_azilok = atof(buf16); - - is.read(buf16,16); - data._bnd_rnglok = atof(buf16); - - is.read(buf16,16); - data._bnd_azi = atof(buf16); - - is.read(buf16,16); - data._bnd_rng = atof(buf16); - - is.read(buf32,32); - data._azi_weight = buf32; - - is.read(buf32,32); - data._rng_weight = buf32; - - is.read(buf16,16); - data._data_inpsrc = buf16; - - is.read(buf16,16); - data._rng_res = atof(buf16); - - is.read(buf16,16); - data._azi_res = atof(buf16); - - is.read(buf32,32); - - is.read(buf16,16); - data._alt_dopcen[0] = atof(buf16); - is.read(buf16,16); - data._alt_dopcen[1] = atof(buf16); - is.read(buf16,16); - data._alt_dopcen[2] = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - data._crt_dopcen[0] = atof(buf16); - is.read(buf16,16); - data._crt_dopcen[1] = atof(buf16); - is.read(buf16,16); - data._crt_dopcen[2] = atof(buf16); - - is.read(buf8,8); - data._time_dir_pix = buf8; - - is.read(buf8,8); - data._time_dir_lin = buf8; - - is.read(buf16,16); - data._alt_rate[0] = atof(buf16); - is.read(buf16,16); - data._alt_rate[1] = atof(buf16); - is.read(buf16,16); - data._alt_rate[2] = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - data._crt_rate[0] = atof(buf16); - is.read(buf16,16); - data._crt_rate[1] = atof(buf16); - is.read(buf16,16); - data._crt_rate[2] = atof(buf16); - - is.read(buf16,16); - - is.read(buf8,8); - data._line_cont = buf8; - - is.read(buf4,4); - data._clutter_lock = buf4; - - is.read(buf4,4); - data._auto_focus = buf4; - - is.read(buf16,16); - data._line_spacing = atof(buf16); - - is.read(buf16,16); - data._pix_spacing = atof(buf16); - - is.read(buf16,16); - data._rngcmp_desg = buf16; - - is.read(buf32,32); - - is.read(buf16,16); - data._zero_dop_range_time_f_pixel = atof(buf16); - - is.read(buf16,16); - data._zero_dop_range_time_c_pixel = atof(buf16); - - is.read(buf16,16); - data._zero_dop_range_time_l_pixel = atof(buf16); - - is.read(buf32,24); - buf32[24] = '\0'; - data._zero_dop_az_time_f_pixel = buf32; - - is.read(buf32,24); - buf32[24] = '\0'; - data._zero_dop_az_time_c_pixel = buf32; - - is.read(buf32,24); - buf32[24] = '\0'; - data._zero_dop_az_time_l_pixel = buf32; - - return is; -} - - -ErsSarDataSetSummary::ErsSarDataSetSummary(const ErsSarDataSetSummary& rhs): - ErsSarRecord(rhs), - _seq_num(rhs._seq_num), - _sar_chn(rhs._sar_chn), - _scene_id(rhs._scene_id), - _scene_des(rhs._scene_des), - _inp_sctim(rhs._inp_sctim), - _asc_des(rhs._asc_des), - _pro_lat(rhs._pro_lat), - _pro_long(rhs._pro_long), - _pro_head(rhs._pro_head), - _ellip_des(rhs._ellip_des), - _ellip_maj(rhs._ellip_maj), - _ellip_min(rhs._ellip_min), - _earth_mass(rhs._earth_mass), - _grav_const(rhs._grav_const), - _terrain_h(rhs._terrain_h), - _sc_lin(rhs._sc_lin), - _sc_pix(rhs._sc_pix), - _scene_len(rhs._scene_len), - _scene_wid(rhs._scene_wid), - _nchn(rhs._nchn), - _mission_id(rhs._mission_id), - _sensor_id(rhs._sensor_id), - _orbit_num(rhs._orbit_num), - _plat_lat(rhs._plat_lat), - _plat_long(rhs._plat_long), - _plat_head(rhs._plat_head), - _clock_ang(rhs._clock_ang), - _incident_ang(rhs._incident_ang), - _wave_length(rhs._wave_length), - _motion_comp(rhs._motion_comp), - _pulse_code(rhs._pulse_code), - _chirp_ext_ind(rhs._chirp_ext_ind), - _fr(rhs._fr), - _rng_gate(rhs._rng_gate), - _rng_length(rhs._rng_length), - _baseband_f(rhs._baseband_f), - _rngcmp_f(rhs._rngcmp_f), - _gn_polar(rhs._gn_polar), - _gn_cross(rhs._gn_cross), - _chn_bits(rhs._chn_bits), - _quant_desc(rhs._quant_desc), - _i_bias(rhs._i_bias), - _q_bias(rhs._q_bias), - _iq_ratio(rhs._iq_ratio), - _mech_sight(rhs._mech_sight), - _fa(rhs._fa), - _sat_bintim(rhs._sat_bintim), - _sat_clktim(rhs._sat_clktim), - _sat_clkinc(rhs._sat_clkinc), - _fac_id(rhs._fac_id), - _sys_id(rhs._sys_id), - _ver_id(rhs._ver_id), - _prod_type(rhs._prod_type), - _algor_id(rhs._algor_id), - _n_azilok(rhs._n_azilok), - _n_rnglok(rhs._n_rnglok), - _bnd_azilok(rhs._bnd_azilok), - _bnd_rnglok(rhs._bnd_rnglok), - _bnd_azi(rhs._bnd_azi), - _bnd_rng(rhs._bnd_rng), - _azi_weight(rhs._azi_weight), - _rng_weight(rhs._rng_weight), - _data_inpsrc(rhs._data_inpsrc), - _rng_res(rhs._rng_res), - _azi_res(rhs._azi_res), - _time_dir_pix(rhs._time_dir_pix), - _time_dir_lin(rhs._time_dir_lin), - _line_cont(rhs._line_cont), - _clutter_lock(rhs._clutter_lock), - _auto_focus(rhs._auto_focus), - _line_spacing(rhs._line_spacing), - _pix_spacing(rhs._pix_spacing), - _rngcmp_desg(rhs._rngcmp_desg), - _zero_dop_range_time_f_pixel(rhs._zero_dop_range_time_f_pixel), - _zero_dop_range_time_c_pixel(rhs._zero_dop_range_time_c_pixel), - _zero_dop_range_time_l_pixel(rhs._zero_dop_range_time_l_pixel), - _zero_dop_az_time_f_pixel(rhs._zero_dop_az_time_f_pixel), - _zero_dop_az_time_c_pixel(rhs._zero_dop_az_time_c_pixel), - _zero_dop_az_time_l_pixel(rhs._zero_dop_az_time_l_pixel) -{ - _ellip_j[0] = rhs._ellip_j[0]; - _ellip_j[1] = rhs._ellip_j[1]; - _ellip_j[2] = rhs._ellip_j[2]; - _ampl_coef[0] = rhs._ampl_coef[0]; - _ampl_coef[1] = rhs._ampl_coef[1]; - _ampl_coef[2] = rhs._ampl_coef[2]; - _ampl_coef[3] = rhs._ampl_coef[3]; - _ampl_coef[4] = rhs._ampl_coef[4]; - _phas_coef[0] = rhs._phas_coef[0]; - _phas_coef[1] = rhs._phas_coef[1]; - _phas_coef[2] = rhs._phas_coef[2]; - _phas_coef[3] = rhs._phas_coef[3]; - _phas_coef[4] = rhs._phas_coef[4]; - - _alt_dopcen[0] = rhs._alt_dopcen[0]; - _alt_dopcen[1] = rhs._alt_dopcen[1]; - _alt_dopcen[2] = rhs._alt_dopcen[2]; - - _crt_dopcen[0] = rhs._crt_dopcen[0]; - _crt_dopcen[1] = rhs._crt_dopcen[1]; - _crt_dopcen[2] = rhs._crt_dopcen[2]; - - _alt_rate[0] = rhs._alt_rate[0]; - _alt_rate[1] = rhs._alt_rate[1]; - _alt_rate[2] = rhs._alt_rate[2]; - _crt_rate[0] = rhs._crt_rate[0]; - _crt_rate[1] = rhs._crt_rate[1]; - _crt_rate[2] = rhs._crt_rate[2]; -} - -ErsSarDataSetSummary& ErsSarDataSetSummary::operator=(const ErsSarDataSetSummary& rhs) -{ - _seq_num = rhs._seq_num; - _sar_chn = rhs._sar_chn; - _scene_id = rhs._scene_id; - _scene_des = rhs._scene_des; - _inp_sctim = rhs._inp_sctim; - _asc_des = rhs._asc_des; - _pro_lat = rhs._pro_lat; - _pro_long = rhs._pro_long; - _pro_head = rhs._pro_head; - _ellip_des = rhs._ellip_des; - _ellip_maj = rhs._ellip_maj; - _ellip_min = rhs._ellip_min; - _earth_mass = rhs._earth_mass; - _grav_const = rhs._grav_const; - _terrain_h = rhs._terrain_h; - _sc_lin = rhs._sc_lin; - _sc_pix = rhs._sc_pix; - _scene_len = rhs._scene_len; - _scene_wid = rhs._scene_wid; - _nchn = rhs._nchn; - _mission_id = rhs._mission_id; - _sensor_id = rhs._sensor_id; - _orbit_num = rhs._orbit_num; - _plat_lat = rhs._plat_lat; - _plat_long = rhs._plat_long; - _plat_head = rhs._plat_head; - _clock_ang = rhs._clock_ang; - _incident_ang = rhs._incident_ang; - _wave_length = rhs._wave_length; - _motion_comp = rhs._motion_comp; - _pulse_code = rhs._pulse_code; - _chirp_ext_ind = rhs._chirp_ext_ind; - _fr = rhs._fr; - _rng_gate = rhs._rng_gate; - _rng_length = rhs._rng_length; - _baseband_f = rhs._baseband_f; - _rngcmp_f = rhs._rngcmp_f; - _gn_polar = rhs._gn_polar; - _gn_cross = rhs._gn_cross; - _chn_bits = rhs._chn_bits; - _quant_desc = rhs._quant_desc; - _i_bias = rhs._i_bias; - _q_bias = rhs._q_bias; - _iq_ratio = rhs._iq_ratio; - _mech_sight = rhs._mech_sight; - _fa = rhs._fa; - _sat_bintim = rhs._sat_bintim; - _sat_clktim = rhs._sat_clktim; - _sat_clkinc = rhs._sat_clkinc; - _fac_id = rhs._fac_id; - _sys_id = rhs._sys_id; - _ver_id = rhs._ver_id; - _prod_type = rhs._prod_type; - _algor_id = rhs._algor_id; - _n_azilok = rhs._n_azilok; - _n_rnglok = rhs._n_rnglok; - _bnd_azilok = rhs._bnd_azilok; - _bnd_rnglok = rhs._bnd_rnglok; - _bnd_azi = rhs._bnd_azi; - _bnd_rng = rhs._bnd_rng; - _azi_weight = rhs._azi_weight; - _rng_weight = rhs._rng_weight; - _data_inpsrc = rhs._data_inpsrc; - _rng_res = rhs._rng_res; - _azi_res = rhs._azi_res; - _time_dir_pix = rhs._time_dir_pix; - _time_dir_lin = rhs._time_dir_lin; - _line_cont = rhs._line_cont; - _clutter_lock = rhs._clutter_lock; - _auto_focus = rhs._auto_focus; - _line_spacing = rhs._line_spacing; - _pix_spacing = rhs._pix_spacing; - _rngcmp_desg = rhs._rngcmp_desg; - - _ellip_j[0] = rhs._ellip_j[0]; - _ellip_j[1] = rhs._ellip_j[1]; - _ellip_j[2] = rhs._ellip_j[2]; - _ampl_coef[0] = rhs._ampl_coef[0]; - _ampl_coef[1] = rhs._ampl_coef[1]; - _ampl_coef[2] = rhs._ampl_coef[2]; - _ampl_coef[3] = rhs._ampl_coef[3]; - _ampl_coef[4] = rhs._ampl_coef[4]; - _phas_coef[0] = rhs._phas_coef[0]; - _phas_coef[1] = rhs._phas_coef[1]; - _phas_coef[2] = rhs._phas_coef[2]; - _phas_coef[3] = rhs._phas_coef[3]; - _phas_coef[4] = rhs._phas_coef[4]; - - _alt_dopcen[0] = rhs._alt_dopcen[0]; - _alt_dopcen[1] = rhs._alt_dopcen[1]; - _alt_dopcen[2] = rhs._alt_dopcen[2]; - - _crt_dopcen[0] = rhs._crt_dopcen[0]; - _crt_dopcen[1] = rhs._crt_dopcen[1]; - _crt_dopcen[2] = rhs._crt_dopcen[2]; - - _alt_rate[0] = rhs._alt_rate[0]; - _alt_rate[1] = rhs._alt_rate[1]; - _alt_rate[2] = rhs._alt_rate[2]; - _crt_rate[0] = rhs._crt_rate[0]; - _crt_rate[1] = rhs._crt_rate[1]; - _crt_rate[2] = rhs._crt_rate[2]; - - _zero_dop_range_time_f_pixel = rhs._zero_dop_range_time_f_pixel; - _zero_dop_range_time_c_pixel = rhs._zero_dop_range_time_c_pixel; - _zero_dop_range_time_l_pixel = rhs._zero_dop_range_time_l_pixel; - _zero_dop_az_time_f_pixel = rhs._zero_dop_az_time_f_pixel; - _zero_dop_az_time_c_pixel = rhs._zero_dop_az_time_c_pixel; - _zero_dop_az_time_l_pixel = rhs._zero_dop_az_time_l_pixel; - - - return *this; -} diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.cpp deleted file mode 100644 index bfc496b5e4..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.cpp +++ /dev/null @@ -1,1151 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h> - -ErsSarFacilityData::ErsSarFacilityData() : ErsSarRecord("facility_data_rec") -{ -} - -ErsSarFacilityData::~ErsSarFacilityData() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarFacilityData& data) -{ - os<<"last_release_qc_date:"<<data._last_release_qc_date.c_str()<<std::endl; - - os<<"last_release_cal_date:"<<data._last_release_cal_date.c_str()<<std::endl; - - os<<"qa_summary_flag:"<<data._qa_summary_flag<<std::endl; - - os<<"prf_code_change_flag:"<<data._prf_code_change_flag<<std::endl; - - os<<"sampling_win_change_flag:"<<data._sampling_win_change_flag<<std::endl; - - os<<"cal_gain_change_flag:"<<data._cal_gain_change_flag<<std::endl; - - os<<"quirp_qu_flag:"<<data._quirp_qu_flag<<std::endl; - - os<<"inp_data_stat_flag:"<<data._inp_data_stat_flag<<std::endl; - - os<<"dopp_cent_conf_meas_flag:"<<data._dopp_cent_conf_meas_flag<<std::endl; - - os<<"dopp_cent_val_flag:"<<data._dopp_cent_val_flag<<std::endl; - - os<<"dopp_ambig_conf_meas_flag:"<<data._dopp_ambig_conf_meas_flag<<std::endl; - - os<<"outp_data_mean_flag:"<<data._outp_data_mean_flag<<std::endl; - - os<<"OGOB_flag:"<<data._OGOB_flag<<std::endl; - - os<<"PRF_changes:"<<data._PRF_changes<<std::endl; - - os<<"sampling_win_changes:"<<data._sampling_win_changes<<std::endl; - - os<<"cal_gain_changes:"<<data._cal_gain_changes<<std::endl; - - os<<"missing_lines:"<<data._missing_lines<<std::endl; - - os<<"rec_gain_changes:"<<data._rec_gain_changes<<std::endl; - - os<<"pulse_width_of_ACF_3db:"<<data._pulse_width_of_ACF_3db<<std::endl; - - os<<"first_side_lobe_lev_of_ACF:"<<data._first_side_lobe_lev_of_ACF<<std::endl; - - os<<"ISLR_of_ACF:"<<data._ISLR_of_ACF<<std::endl; - - os<<"dopp_cent_conf_meas:"<<data._dopp_cent_conf_meas<<std::endl; - - os<<"dopp_ambig_conf_meas:"<<data._dopp_ambig_conf_meas<<std::endl; - - os<<"inp_data_I_mean:"<<data._inp_data_I_mean<<std::endl; - - os<<"inp_data_Q_mean:"<<data._inp_data_Q_mean<<std::endl; - - os<<"inp_data_I_stddev:"<<data._inp_data_I_stddev<<std::endl; - - os<<"inp_data_Q_stddev:"<<data._inp_data_Q_stddev<<std::endl; - - os<<"cal_sys_gain:"<<data._cal_sys_gain<<std::endl; - - os<<"first_rec_gain_read:"<<data._first_rec_gain_read<<std::endl; - - os<<"dopp_ambig_num:"<<data._dopp_ambig_num<<std::endl; - - os<<"I_channel_bias_correction:"<<data._I_channel_bias_correction<<std::endl; - - os<<"Q_channel_bias_correction:"<<data._Q_channel_bias_correction<<std::endl; - - os<<"I_channel_gain_correction:"<<data._I_channel_gain_correction<<std::endl; - - os<<"Q_channel_gain_correction:"<<data._Q_channel_gain_correction<<std::endl; - - os<<"Q_channel_I_Q_correction:"<<data._Q_channel_I_Q_correction<<std::endl; - - os<<"noise_power:"<<data._noise_power<<std::endl; - - os<<"int_cal_utc:"<<data._int_cal_utc<<std::endl; - - os<<"num_valid_cal_pulses:"<<data._num_valid_cal_pulses<<std::endl; - - os<<"num_valid_noise_pulses:"<<data._num_valid_noise_pulses<<std::endl; - - os<<"num_valid_replicas:"<<data._num_valid_replicas<<std::endl; - - os<<"first_replica_sample:"<<data._first_replica_sample<<std::endl; - - os<<"mean_cal_pulse_power:"<<data._mean_cal_pulse_power<<std::endl; - - os<<"mean_noise_power:"<<data._mean_noise_power<<std::endl; - - os<<"range_comp_norm_fact:"<<data._range_comp_norm_fact<<std::endl; - - os<<"replica_power:"<<data._replica_power<<std::endl; - - os<<"first_range_pixel_mid_az_inc:"<<data._first_range_pixel_mid_az_inc<<std::endl; - - os<<"center_range_pix_mid_az_inc:"<<data._center_range_pix_mid_az_inc<<std::endl; - - os<<"last_range_pix_mid_az_inc:"<<data._last_range_pix_mid_az_inc<<std::endl; - - os<<"norm_ref_range_ro:"<<data._norm_ref_range_ro<<std::endl; - - os<<"antenna_elev_flag:"<<data._antenna_elev_flag<<std::endl; - - os<<"abs_cal_const_K:"<<data._abs_cal_const_K<<std::endl; - - os<<"upp_bound_K:"<<data._upp_bound_K<<std::endl; - - os<<"low_bound_K:"<<data._low_bound_K<<std::endl; - - os<<"proc_noise_scale_fact:"<<data._proc_noise_scale_fact<<std::endl; - - os<<"K_gen_date:"<<data._K_gen_date.c_str()<<std::endl; - - os<<"K_vers_num:"<<data._K_vers_num.c_str()<<std::endl; - - os<<"num_duplic_input_lines:"<<data._num_duplic_input_lines<<std::endl; - - os<<"estim_bit_error_rate:"<<data._estim_bit_error_rate<<std::endl; - - os<<"out_image_mean:"<<data._out_image_mean<<std::endl; - - os<<"out_image_std_dev:"<<data._out_image_std_dev<<std::endl; - - os<<"out_image_max_value:"<<data._out_image_max_value<<std::endl; - - os<<"time_raw_data_first_input:"<<data._time_raw_data_first_input.c_str()<<std::endl; - - os<<"time_asc_node_state_vectors:"<<data._time_asc_node_state_vectors.c_str()<<std::endl; - - os<<"asc_node_pos_X_comp:"<<data._asc_node_pos_X_comp.c_str()<<std::endl; - - os<<"asc_node_pos_Y_comp:"<<data._asc_node_pos_Y_comp.c_str()<<std::endl; - - os<<"asc_node_pos_Z_comp:"<<data._asc_node_pos_Z_comp.c_str()<<std::endl; - - os<<"asc_node_vel_X_comp:"<<data._asc_node_vel_X_comp.c_str()<<std::endl; - - os<<"asc_node_vel_Y_comp:"<<data._asc_node_vel_Y_comp.c_str()<<std::endl; - - os<<"asc_node_vel_Z_comp:"<<data._asc_node_vel_Z_comp.c_str()<<std::endl; - - os<<"out_pixel_bit_length:"<<data._out_pixel_bit_length<<std::endl; - - os<<"proc_gain_param_1:"<<data._proc_gain_param_1<<std::endl; - - os<<"proc_gain_param_2:"<<data._proc_gain_param_2<<std::endl; - - os<<"proc_gain_param_3:"<<data._proc_gain_param_3<<std::endl; - - os<<"peak_loc_cross_correl_fun:"<<data._peak_loc_cross_correl_fun<<std::endl; - - os<<"3_dB_width_CCF:"<<data._3_dB_width_CCF<<std::endl; - - os<<"first_side_lobe_level:"<<data._first_side_lobe_level<<std::endl; - - os<<"ISLR_CCF_between_last:"<<data._ISLR_CCF_between_last<<std::endl; - - os<<"peak_loc_CCF_betw_last:"<<data._peak_loc_CCF_betw_last<<std::endl; - - os<<"Roll_Tilt_Mode_flag:"<<data._Roll_Tilt_Mode_flag<<std::endl; - - os<<"raw_data_correction_flag:"<<data._raw_data_correction_flag<<std::endl; - - os<<"look_detecion_flag:"<<data._look_detecion_flag<<std::endl; - - os<<"doppler_ambiguity_estimat_flag:"<<data._doppler_ambiguity_estimat_flag<<std::endl; - - os<<"azimuth_baseband_convers_flag:"<<data._azimuth_baseband_convers_flag<<std::endl; - - os<<"samples_per_line_used:"<<data._samples_per_line_used<<std::endl; - - os<<"range_lines_skip_factor:"<<data._range_lines_skip_factor<<std::endl; - - os<<"time_of_inp_state_vectors:"<<data._time_of_inp_state_vectors.c_str()<<std::endl; - - os<<"inp_state_vect_pos_X_comp:"<<data._inp_state_vect_pos_X_comp.c_str()<<std::endl; - - os<<"inp_state_vect_pos_Y_comp:"<<data._inp_state_vect_pos_Y_comp.c_str()<<std::endl; - - os<<"inp_state_vect_pos_Z_comp:"<<data._inp_state_vect_pos_Z_comp.c_str()<<std::endl; - - os<<"inp_state_vect_vel_Vx_comp:"<<data._inp_state_vect_vel_Vx_comp.c_str()<<std::endl; - - os<<"inp_state_vect_vel_Vy_comp:"<<data._inp_state_vect_vel_Vy_comp.c_str()<<std::endl; - - os<<"inp_state_vect_vel_Vz_comp:"<<data._inp_state_vect_vel_Vz_comp.c_str()<<std::endl; - - os<<"inp_state_vector_type_flag:"<<data._inp_state_vector_type_flag<<std::endl; - - os<<"win_coeff_for_range_match:"<<data._win_coeff_for_range_match<<std::endl; - - os<<"win_coeff_for_azi_match:"<<data._win_coeff_for_azi_match<<std::endl; - - os<<"update_period_range_match:"<<data._update_period_range_match<<std::endl; - - os<<"look_scalar_gain_1:"<<data._look_scalar_gain_1<<std::endl; - - os<<"look_scalar_gain_2:"<<data._look_scalar_gain_2<<std::endl; - - os<<"look_scalar_gain_3:"<<data._look_scalar_gain_3<<std::endl; - - os<<"look_scalar_gain_4:"<<data._look_scalar_gain_4<<std::endl; - - os<<"look_scalar_gain_5:"<<data._look_scalar_gain_5<<std::endl; - - os<<"look_scalar_gain_6:"<<data._look_scalar_gain_6<<std::endl; - - os<<"look_scalar_gain_7:"<<data._look_scalar_gain_7<<std::endl; - - os<<"look_scalar_gain_8:"<<data._look_scalar_gain_8<<std::endl; - - os<<"samp_window_start_time_bias:"<<data._samp_window_start_time_bias<<std::endl; - - os<<"doppler_centroid_cubic_coeff:"<<data._doppler_centroid_cubic_coeff<<std::endl; - - os<<"PRF_code_first_range_line:"<<data._PRF_code_first_range_line<<std::endl; - - os<<"PRF_code_last_range_line:"<<data._PRF_code_last_range_line<<std::endl; - - os<<"samp_win_start_first:"<<data._samp_win_start_first<<std::endl; - - os<<"samp_win_start_last:"<<data._samp_win_start_last<<std::endl; - - os<<"cal_syst_gain_last_proc:"<<data._cal_syst_gain_last_proc<<std::endl; - - os<<"receiver_gain_last_proc:"<<data._receiver_gain_last_proc<<std::endl; - - os<<"first_processed_range_sample:"<<data._first_processed_range_sample<<std::endl; - - os<<"azimuth_FFT_IFFT_ratio:"<<data._azimuth_FFT_IFFT_ratio<<std::endl; - - os<<"num_azimuth_blocks_proc:"<<data._num_azimuth_blocks_proc<<std::endl; - - os<<"num_input_raw_data_lines:"<<data._num_input_raw_data_lines<<std::endl; - - os<<"initial_doppler_ambiguity_num:"<<data._initial_doppler_ambiguity_num<<std::endl; - - os<<"thresh_no_1_flag:"<<data._thresh_no_1_flag<<std::endl; - - os<<"thresh_no_2_flag:"<<data._thresh_no_2_flag<<std::endl; - - os<<"thresh_no_3_flag:"<<data._thresh_no_3_flag<<std::endl; - - os<<"thresh_no_4_flag:"<<data._thresh_no_4_flag<<std::endl; - - os<<"thresh_no_5_flag:"<<data._thresh_no_5_flag<<std::endl; - - os<<"thresh_no_6_flag:"<<data._thresh_no_6_flag<<std::endl; - - os<<"thresh_no_7_flag:"<<data._thresh_no_7_flag<<std::endl; - - os<<"thresh_no_8_flag:"<<data._thresh_no_8_flag<<std::endl; - - os<<"thresh_no_9_flag:"<<data._thresh_no_9_flag<<std::endl; - - os<<"thresh_no_10_flag:"<<data._thresh_no_10_flag<<std::endl; - - os<<"thresh_no_11_flag:"<<data._thresh_no_11_flag<<std::endl; - - os<<"sat_binary_time_of_first:"<<data._sat_binary_time_of_first<<std::endl; - - os<<"num_valid_pixels_per_range:"<<data._num_valid_pixels_per_range<<std::endl; - - os<<"num_range_samp_discarded:"<<data._num_range_samp_discarded<<std::endl; - - os<<"I_gain_imb_lower_bound:"<<data._I_gain_imb_lower_bound<<std::endl; - - os<<"I_gain_imb_upper_bound:"<<data._I_gain_imb_upper_bound<<std::endl; - - os<<"I_Q_quad_depar_lower_bound:"<<data._I_Q_quad_depar_lower_bound<<std::endl; - - os<<"I_Q_quad_depar_upper_bound:"<<data._I_Q_quad_depar_upper_bound<<std::endl; - - os<<"3_dB_look_bandwidth:"<<data._3_dB_look_bandwidth<<std::endl; - - os<<"3_dB_look_proc_dopp_bandw:"<<data._3_dB_look_proc_dopp_bandw<<std::endl; - - os<<"range_spread_loss_comp_flag:"<<data._range_spread_loss_comp_flag<<std::endl; - - os<<"datation_flag:"<<data._datation_flag<<std::endl; - - os<<"max_error_range_line_timing:"<<data._max_error_range_line_timing<<std::endl; - - os<<"form_num_range_line_used:"<<data._form_num_range_line_used<<std::endl; - - os<<"autom_look_scal_gain_flag:"<<data._autom_look_scal_gain_flag<<std::endl; - - os<<"max_value_look_scalar_gain:"<<data._max_value_look_scalar_gain<<std::endl; - - os<<"replica_norm_method_flag:"<<data._replica_norm_method_flag<<std::endl; - - os<<"coef_ground_range_1:"<<data._coef_ground_range_1<<std::endl; - - os<<"coef_ground_range_2:"<<data._coef_ground_range_2<<std::endl; - - os<<"coef_ground_range_3:"<<data._coef_ground_range_3<<std::endl; - - os<<"coef_ground_range_4:"<<data._coef_ground_range_4<<std::endl; - - os<<"coef_ant_elev_1:"<<data._coef_ant_elev_1<<std::endl; - - os<<"coef_ant_elev_2:"<<data._coef_ant_elev_2<<std::endl; - - os<<"coef_ant_elev_3:"<<data._coef_ant_elev_3<<std::endl; - - os<<"coef_ant_elev_4:"<<data._coef_ant_elev_4<<std::endl; - - os<<"coef_ant_elev_5:"<<data._coef_ant_elev_5<<std::endl; - - os<<"range_time_origin_ant:"<<data._range_time_origin_ant<<std::endl; - - return os; - -} - -std::istream& operator>>(std::istream& is, ErsSarFacilityData& data) -{ - char buf64[65]; - buf64[64] = '\0'; - char buf32[33]; - buf32[32] = '\0'; - char buf24[25]; - buf24[24]='\0'; - char buf22[23]; - buf22[22]='\0'; - char buf20[21]; - buf20[20]='\0'; - char buf16[17]; - buf16[16]='\0'; - char buf12[13]; - buf12[12] = '\0'; - char buf7[8]; - buf7[7] = '\0'; - char buf8[9]; - buf8[8] = '\0'; - char buf6[7]; - buf6[6] = '\0'; - char buf4[5]; - buf4[4] = '\0'; - char buf2[3]; - buf2[2] = '\0'; - char buf1[2]; - buf1[1] = '\0'; - - is.read(buf64,64); - data._name_of_facil_rec = buf64; - - is.read(buf6,6); - data._last_release_qc_date = buf6; - - is.read(buf2,2); - - is.read(buf6,6); - data._last_release_cal_date = buf6; - - is.read(buf4,4); - data._qa_summary_flag = atoi(buf4); - - is.read(buf4,4); - data._prf_code_change_flag = atoi(buf4); - - is.read(buf4,4); - data._sampling_win_change_flag = atoi(buf4); - - is.read(buf4,4); - data._cal_gain_change_flag = atoi(buf4); - - is.read(buf4,4); - data._quirp_qu_flag = atoi(buf4); - - is.read(buf4,4); - data._inp_data_stat_flag = atoi(buf4); - - is.read(buf4,4); - data._dopp_cent_conf_meas_flag = atoi(buf4); - - is.read(buf4,4); - data._dopp_cent_val_flag = atoi(buf4); - - is.read(buf4,4); - data._dopp_ambig_conf_meas_flag = atoi(buf4); - - is.read(buf4,4); - data._outp_data_mean_flag = atoi(buf4); - - is.read(buf4,4); - data._OGOB_flag = atoi(buf4); - - is.read(buf4,4); - data._PRF_changes = atoi(buf4); - - is.read(buf4,4); - data._sampling_win_changes = atoi(buf4); - - is.read(buf4,4); - data._cal_gain_changes = atoi(buf4); - - is.read(buf4,4); - data._missing_lines = atoi(buf4); - - is.read(buf4,4); - data._rec_gain_changes = atoi(buf4); - - is.read(buf16,16); - data._pulse_width_of_ACF_3db = atof(buf16); - - is.read(buf16,16); - data._first_side_lobe_lev_of_ACF = atof(buf16); - - is.read(buf16,16); - data._ISLR_of_ACF = atof(buf16); - - is.read(buf16,16); - data._dopp_cent_conf_meas = atof(buf16); - - is.read(buf16,16); - data._dopp_ambig_conf_meas = atof(buf16); - - is.read(buf16,16); - data._inp_data_I_mean = atof(buf16); - - is.read(buf16,16); - data._inp_data_Q_mean = atof(buf16); - - is.read(buf16,16); - data._inp_data_I_stddev = atof(buf16); - - is.read(buf16,16); - data._inp_data_Q_stddev = atof(buf16); - - is.read(buf16,16); - data._cal_sys_gain = atof(buf16); - - is.read(buf16,16); - data._first_rec_gain_read = atof(buf16); - - is.read(buf16,16); - data._dopp_ambig_num = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - data._I_channel_bias_correction = atof(buf16); - - is.read(buf16,16); - data._Q_channel_bias_correction = atof(buf16); - - is.read(buf16,16); - data._I_channel_gain_correction = atof(buf16); - - is.read(buf16,16); - data._Q_channel_gain_correction = atof(buf16); - - is.read(buf16,16); - data._Q_channel_I_Q_correction = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - data._noise_power = atof(buf16); - - is.read(buf16,16); - data._int_cal_utc = atoi(buf16); - - is.read(buf4,4); - data._num_valid_cal_pulses = atoi(buf4); - - is.read(buf4,4); - data._num_valid_noise_pulses = atoi(buf4); - - is.read(buf4,4); - data._num_valid_replicas = atoi(buf4); - - is.read(buf16,16); - data._first_replica_sample = atof(buf16); - - is.read(buf16,16); - data._mean_cal_pulse_power = atof(buf16); - - is.read(buf16,16); - data._mean_noise_power = atof(buf16); - - is.read(buf16,16); - data._range_comp_norm_fact = atof(buf16); - - is.read(buf16,16); - data._replica_power = atof(buf16); - - is.read(buf16,16); - data._first_range_pixel_mid_az_inc = atof(buf16); - - is.read(buf16,16); - data._center_range_pix_mid_az_inc = atof(buf16); - - is.read(buf16,16); - data._last_range_pix_mid_az_inc = atof(buf16); - - is.read(buf16,16); - data._norm_ref_range_ro = atof(buf16); - - is.read(buf12,12); - - is.read(buf4,4); - data._antenna_elev_flag = atoi(buf4); - - is.read(buf16,16); - data._abs_cal_const_K = atof(buf16); - - is.read(buf16,16); - data._upp_bound_K = atof(buf16); - - is.read(buf16,16); - data._low_bound_K = atof(buf16); - - is.read(buf16,16); - data._proc_noise_scale_fact = atof(buf16); - - is.read(buf6,6); - data._K_gen_date = buf6; - - is.read(buf4,4); - data._K_vers_num = buf4; - - is.read(buf4,4); - data._num_duplic_input_lines = atoi(buf4); - - is.read(buf16,16); - data._estim_bit_error_rate = atof(buf16); - - is.read(buf12,12); - - is.read(buf16,16); - data._out_image_mean = atof(buf16); - - is.read(buf16,16); - data._out_image_std_dev = atof(buf16); - - is.read(buf16,16); - data._out_image_max_value = atof(buf16); - - is.read(buf24,24); - data._time_raw_data_first_input = buf24; - - is.read(buf24,24); - data._time_asc_node_state_vectors = buf24; - - is.read(buf22,22); - data._asc_node_pos_X_comp = buf22; - - is.read(buf22,22); - data._asc_node_pos_Y_comp = buf22; - - is.read(buf22,22); - data._asc_node_pos_Z_comp = buf22; - - is.read(buf22,22); - data._asc_node_vel_X_comp = buf22; - - is.read(buf22,22); - data._asc_node_vel_Y_comp = buf22; - - is.read(buf22,22); - data._asc_node_vel_Z_comp = buf22; - - is.read(buf4,4); - data._out_pixel_bit_length = atoi(buf4); - - is.read(buf16,16); - data._proc_gain_param_1 = atof(buf16); - - is.read(buf16,16); - data._proc_gain_param_2 = atof(buf16); - - is.read(buf16,16); - data._proc_gain_param_3 = atof(buf16); - - is.read(buf4,4); - data._peak_loc_cross_correl_fun = atoi(buf4); - - is.read(buf16,16); - data._3_dB_width_CCF = atof(buf16); - - is.read(buf16,16); - data._first_side_lobe_level = atof(buf16); - - is.read(buf16,16); - data._ISLR_CCF_between_last = atof(buf16); - - is.read(buf4,4); - data._peak_loc_CCF_betw_last = atoi(buf4); - - is.read(buf4,4); - data._Roll_Tilt_Mode_flag = atoi(buf4); - - is.read(buf4,4); - data._raw_data_correction_flag = atoi(buf4); - - is.read(buf4,4); - data._look_detecion_flag = atoi(buf4); - - is.read(buf4,4); - data._doppler_ambiguity_estimat_flag = atoi(buf4); - - is.read(buf4,4); - data._azimuth_baseband_convers_flag = atoi(buf4); - - is.read(buf4,4); - data._samples_per_line_used = atoi(buf4); - - is.read(buf4,4); - data._range_lines_skip_factor = atoi(buf4); - - is.read(buf24,24); - data._time_of_inp_state_vectors = buf24; - - is.read(buf22,22); - data._inp_state_vect_pos_X_comp = buf22; - - is.read(buf22,22); - data._inp_state_vect_pos_Y_comp = buf22; - - is.read(buf22,22); - data._inp_state_vect_pos_Z_comp = buf22; - - is.read(buf22,22); - data._inp_state_vect_vel_Vx_comp = buf22; - - is.read(buf22,22); - data._inp_state_vect_vel_Vy_comp = buf22; - - is.read(buf22,22); - data._inp_state_vect_vel_Vz_comp = buf22; - - is.read(buf4,4); - data._inp_state_vector_type_flag = atoi(buf4); - - is.read(buf16,16); - data._win_coeff_for_range_match = atof(buf16); - - is.read(buf16,16); - data._win_coeff_for_azi_match = atof(buf16); - - is.read(buf4,4); - data._update_period_range_match = atoi(buf4); - - is.read(buf16,16); - data._look_scalar_gain_1 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_2 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_3 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_4 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_5 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_6 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_7 = atof(buf16); - - is.read(buf16,16); - data._look_scalar_gain_8 = atof(buf16); - - is.read(buf4,4); - data._samp_window_start_time_bias = atoi(buf4); - - is.read(buf22,22); - data._doppler_centroid_cubic_coeff = atof(buf22); - - is.read(buf4,4); - data._PRF_code_first_range_line = atoi(buf4); - - is.read(buf4,4); - data._PRF_code_last_range_line = atoi(buf4); - - is.read(buf4,4); - data._samp_win_start_first = atoi(buf4); - - is.read(buf4,4); - data._samp_win_start_last = atoi(buf4); - - is.read(buf4,4); - data._cal_syst_gain_last_proc = atoi(buf4); - - is.read(buf4,4); - data._receiver_gain_last_proc = atoi(buf4); - - is.read(buf4,4); - data._first_processed_range_sample = atoi(buf4); - - is.read(buf4,4); - data._azimuth_FFT_IFFT_ratio = atoi(buf4); - - is.read(buf4,4); - data._num_azimuth_blocks_proc = atoi(buf4); - - is.read(buf8,8); - data._num_input_raw_data_lines = atol(buf8); - - is.read(buf4,4); - data._initial_doppler_ambiguity_num = atoi(buf4); - - is.read(buf16,16); - data._thresh_no_1_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_2_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_3_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_4_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_5_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_6_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_7_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_8_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_9_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_10_flag = atof(buf16); - - is.read(buf16,16); - data._thresh_no_11_flag = atof(buf16); - - is.read(buf16,16); - data._sat_binary_time_of_first = atol(buf16); - - is.read(buf4,4); - data._num_valid_pixels_per_range = atoi(buf4); - - is.read(buf4,4); - data._num_range_samp_discarded = atoi(buf4); - - is.read(buf16,16); - data._I_gain_imb_lower_bound = atof(buf16); - - is.read(buf16,16); - data._I_gain_imb_upper_bound = atof(buf16); - - is.read(buf16,16); - data._I_Q_quad_depar_lower_bound = atof(buf16); - - is.read(buf16,16); - data._I_Q_quad_depar_upper_bound = atof(buf16); - - is.read(buf16,16); - data._3_dB_look_bandwidth = atof(buf16); - - is.read(buf16,16); - data._3_dB_look_proc_dopp_bandw = atof(buf16); - - is.read(buf4,4); - data._range_spread_loss_comp_flag = atoi(buf4); - - is.read(buf1,1); - data._datation_flag = atoi(buf1); - - is.read(buf7,7); - data._max_error_range_line_timing = atoi(buf7); - - is.read(buf7,7); - data._form_num_range_line_used = atoi(buf7); - - is.read(buf1,1); - data._autom_look_scal_gain_flag = atoi(buf1); - - is.read(buf4,4); - data._max_value_look_scalar_gain = atoi(buf4); - - is.read(buf4,4); - data._replica_norm_method_flag = atoi(buf4); - - is.read(buf20,20); - data._coef_ground_range_1 = atof(buf20); - - is.read(buf20,20); - data._coef_ground_range_2 = atof(buf20); - - is.read(buf20,20); - data._coef_ground_range_3 = atof(buf20); - - is.read(buf20,20); - data._coef_ground_range_4 = atof(buf20); - - is.read(buf20,20); - data._coef_ant_elev_1 = atof(buf20); - - is.read(buf20,20); - data._coef_ant_elev_2 = atof(buf20); - - is.read(buf20,20); - data._coef_ant_elev_3 = atof(buf20); - - is.read(buf20,20); - data._coef_ant_elev_4 = atof(buf20); - - is.read(buf20,20); - data._coef_ant_elev_5 = atof(buf20); - - is.read(buf16,16); - data._range_time_origin_ant = atof(buf16); - - char buf10238[10238]; - is.read(buf10238,10238); - return is; -} - - -ErsSarFacilityData::ErsSarFacilityData(const ErsSarFacilityData& rhs): - ErsSarRecord(rhs), - _last_release_qc_date(rhs._last_release_qc_date), - _last_release_cal_date(rhs._last_release_cal_date), - _qa_summary_flag(rhs._qa_summary_flag), - _prf_code_change_flag(rhs._prf_code_change_flag), - _sampling_win_change_flag(rhs._sampling_win_change_flag), - _cal_gain_change_flag(rhs._cal_gain_change_flag), - _quirp_qu_flag(rhs._quirp_qu_flag), - _inp_data_stat_flag(rhs._inp_data_stat_flag), - _dopp_cent_conf_meas_flag(rhs._dopp_cent_conf_meas_flag), - _dopp_cent_val_flag(rhs._dopp_cent_val_flag), - _dopp_ambig_conf_meas_flag(rhs._dopp_ambig_conf_meas_flag), - _outp_data_mean_flag(rhs._outp_data_mean_flag), - _OGOB_flag(rhs._OGOB_flag), - _PRF_changes(rhs._PRF_changes), - _sampling_win_changes(rhs._sampling_win_changes), - _cal_gain_changes(rhs._cal_gain_changes), - _missing_lines(rhs._missing_lines), - _rec_gain_changes(rhs._rec_gain_changes), - _pulse_width_of_ACF_3db(rhs._pulse_width_of_ACF_3db), - _first_side_lobe_lev_of_ACF(rhs._first_side_lobe_lev_of_ACF), - _ISLR_of_ACF(rhs._ISLR_of_ACF), - _dopp_cent_conf_meas(rhs._dopp_cent_conf_meas), - _dopp_ambig_conf_meas(rhs._dopp_ambig_conf_meas), - _inp_data_I_mean(rhs._inp_data_I_mean), - _inp_data_Q_mean(rhs._inp_data_Q_mean), - _inp_data_I_stddev(rhs._inp_data_I_stddev), - _inp_data_Q_stddev(rhs._inp_data_Q_stddev), - _cal_sys_gain(rhs._cal_sys_gain), - _first_rec_gain_read(rhs._first_rec_gain_read), - _dopp_ambig_num(rhs._dopp_ambig_num), - _I_channel_bias_correction(rhs._I_channel_bias_correction), - _Q_channel_bias_correction(rhs._Q_channel_bias_correction), - _I_channel_gain_correction(rhs._I_channel_gain_correction), - _Q_channel_gain_correction(rhs._Q_channel_gain_correction), - _Q_channel_I_Q_correction(rhs._Q_channel_I_Q_correction), - _noise_power(rhs._noise_power), - _int_cal_utc(rhs._int_cal_utc), - _num_valid_cal_pulses(rhs._num_valid_cal_pulses), - _num_valid_noise_pulses(rhs._num_valid_noise_pulses), - _num_valid_replicas(rhs._num_valid_replicas), - _first_replica_sample(rhs._first_replica_sample), - _mean_cal_pulse_power(rhs._mean_cal_pulse_power), - _mean_noise_power(rhs._mean_noise_power), - _range_comp_norm_fact(rhs._range_comp_norm_fact), - _replica_power(rhs._replica_power), - _first_range_pixel_mid_az_inc(rhs._first_range_pixel_mid_az_inc), - _center_range_pix_mid_az_inc(rhs._center_range_pix_mid_az_inc), - _last_range_pix_mid_az_inc(rhs._last_range_pix_mid_az_inc), - _norm_ref_range_ro(rhs._norm_ref_range_ro), - _antenna_elev_flag(rhs._antenna_elev_flag), - _abs_cal_const_K(rhs._abs_cal_const_K), - _upp_bound_K(rhs._upp_bound_K), - _low_bound_K(rhs._low_bound_K), - _proc_noise_scale_fact(rhs._proc_noise_scale_fact), - _K_gen_date(rhs._K_gen_date), - _K_vers_num(rhs._K_vers_num), - _num_duplic_input_lines(rhs._num_duplic_input_lines), - _estim_bit_error_rate(rhs._estim_bit_error_rate), - _out_image_mean(rhs._out_image_mean), - _out_image_std_dev(rhs._out_image_std_dev), - _out_image_max_value(rhs._out_image_max_value), - _time_raw_data_first_input(rhs._time_raw_data_first_input), - _time_asc_node_state_vectors(rhs._time_asc_node_state_vectors), - _asc_node_pos_X_comp(rhs._asc_node_pos_X_comp), - _asc_node_pos_Y_comp(rhs._asc_node_pos_Y_comp), - _asc_node_pos_Z_comp(rhs._asc_node_pos_Z_comp), - _asc_node_vel_X_comp(rhs._asc_node_vel_X_comp), - _asc_node_vel_Y_comp(rhs._asc_node_vel_Y_comp), - _asc_node_vel_Z_comp(rhs._asc_node_vel_Z_comp), - _out_pixel_bit_length(rhs._out_pixel_bit_length), - _proc_gain_param_1(rhs._proc_gain_param_1), - _proc_gain_param_2(rhs._proc_gain_param_2), - _proc_gain_param_3(rhs._proc_gain_param_3), - _peak_loc_cross_correl_fun(rhs._peak_loc_cross_correl_fun), - _3_dB_width_CCF(rhs._3_dB_width_CCF), - _first_side_lobe_level(rhs._first_side_lobe_level), - _ISLR_CCF_between_last(rhs._ISLR_CCF_between_last), - _peak_loc_CCF_betw_last(rhs._peak_loc_CCF_betw_last), - _Roll_Tilt_Mode_flag(rhs._Roll_Tilt_Mode_flag), - _raw_data_correction_flag(rhs._raw_data_correction_flag), - _look_detecion_flag(rhs._look_detecion_flag), - _doppler_ambiguity_estimat_flag(rhs._doppler_ambiguity_estimat_flag), - _azimuth_baseband_convers_flag(rhs._azimuth_baseband_convers_flag), - _samples_per_line_used(rhs._samples_per_line_used), - _range_lines_skip_factor(rhs._range_lines_skip_factor), - _time_of_inp_state_vectors(rhs._time_of_inp_state_vectors), - _inp_state_vect_pos_X_comp(rhs._inp_state_vect_pos_X_comp), - _inp_state_vect_pos_Y_comp(rhs._inp_state_vect_pos_Y_comp), - _inp_state_vect_pos_Z_comp(rhs._inp_state_vect_pos_Z_comp), - _inp_state_vect_vel_Vx_comp(rhs._inp_state_vect_vel_Vx_comp), - _inp_state_vect_vel_Vy_comp(rhs._inp_state_vect_vel_Vy_comp), - _inp_state_vect_vel_Vz_comp(rhs._inp_state_vect_vel_Vz_comp), - _inp_state_vector_type_flag(rhs._inp_state_vector_type_flag), - _win_coeff_for_range_match(rhs._win_coeff_for_range_match), - _win_coeff_for_azi_match(rhs._win_coeff_for_azi_match), - _update_period_range_match(rhs._update_period_range_match), - _look_scalar_gain_1(rhs._look_scalar_gain_1), - _look_scalar_gain_2(rhs._look_scalar_gain_2), - _look_scalar_gain_3(rhs._look_scalar_gain_3), - _look_scalar_gain_4(rhs._look_scalar_gain_4), - _look_scalar_gain_5(rhs._look_scalar_gain_5), - _look_scalar_gain_6(rhs._look_scalar_gain_6), - _look_scalar_gain_7(rhs._look_scalar_gain_7), - _look_scalar_gain_8(rhs._look_scalar_gain_8), - _samp_window_start_time_bias(rhs._samp_window_start_time_bias), - _doppler_centroid_cubic_coeff(rhs._doppler_centroid_cubic_coeff), - _PRF_code_first_range_line(rhs._PRF_code_first_range_line), - _PRF_code_last_range_line(rhs._PRF_code_last_range_line), - _samp_win_start_first(rhs._samp_win_start_first), - _samp_win_start_last(rhs._samp_win_start_last), - _cal_syst_gain_last_proc(rhs._cal_syst_gain_last_proc), - _receiver_gain_last_proc(rhs._receiver_gain_last_proc), - _first_processed_range_sample(rhs._first_processed_range_sample), - _azimuth_FFT_IFFT_ratio(rhs._azimuth_FFT_IFFT_ratio), - _num_azimuth_blocks_proc(rhs._num_azimuth_blocks_proc), - _num_input_raw_data_lines(rhs._num_input_raw_data_lines), - _initial_doppler_ambiguity_num(rhs._initial_doppler_ambiguity_num), - _thresh_no_1_flag(rhs._thresh_no_1_flag), - _thresh_no_2_flag(rhs._thresh_no_2_flag), - _thresh_no_3_flag(rhs._thresh_no_3_flag), - _thresh_no_4_flag(rhs._thresh_no_4_flag), - _thresh_no_5_flag(rhs._thresh_no_5_flag), - _thresh_no_6_flag(rhs._thresh_no_6_flag), - _thresh_no_7_flag(rhs._thresh_no_7_flag), - _thresh_no_8_flag(rhs._thresh_no_8_flag), - _thresh_no_9_flag(rhs._thresh_no_9_flag), - _thresh_no_10_flag(rhs._thresh_no_10_flag), - _thresh_no_11_flag(rhs._thresh_no_11_flag), - _sat_binary_time_of_first(rhs._sat_binary_time_of_first), - _num_valid_pixels_per_range(rhs._num_valid_pixels_per_range), - _num_range_samp_discarded(rhs._num_range_samp_discarded), - _I_gain_imb_lower_bound(rhs._I_gain_imb_lower_bound), - _I_gain_imb_upper_bound(rhs._I_gain_imb_upper_bound), - _I_Q_quad_depar_lower_bound(rhs._I_Q_quad_depar_lower_bound), - _I_Q_quad_depar_upper_bound(rhs._I_Q_quad_depar_upper_bound), - _3_dB_look_bandwidth(rhs._3_dB_look_bandwidth), - _3_dB_look_proc_dopp_bandw(rhs._3_dB_look_proc_dopp_bandw), - _range_spread_loss_comp_flag(rhs._range_spread_loss_comp_flag), - _datation_flag(rhs._datation_flag), - _max_error_range_line_timing(rhs._max_error_range_line_timing), - _form_num_range_line_used(rhs._form_num_range_line_used), - _autom_look_scal_gain_flag(rhs._autom_look_scal_gain_flag), - _max_value_look_scalar_gain(rhs._max_value_look_scalar_gain), - _replica_norm_method_flag(rhs._replica_norm_method_flag), - _coef_ground_range_1(rhs._coef_ground_range_1), - _coef_ground_range_2(rhs._coef_ground_range_2), - _coef_ground_range_3(rhs._coef_ground_range_3), - _coef_ground_range_4(rhs._coef_ground_range_4), - _coef_ant_elev_1(rhs._coef_ant_elev_1), - _coef_ant_elev_2(rhs._coef_ant_elev_2), - _coef_ant_elev_3(rhs._coef_ant_elev_3), - _coef_ant_elev_4(rhs._coef_ant_elev_4), - _coef_ant_elev_5(rhs._coef_ant_elev_5), - _range_time_origin_ant(rhs._range_time_origin_ant) -{} - -ErsSarFacilityData& ErsSarFacilityData::operator=(const ErsSarFacilityData& rhs) -{ - _last_release_qc_date = rhs._last_release_qc_date; - _last_release_cal_date = rhs._last_release_cal_date; - _qa_summary_flag = rhs._qa_summary_flag; - _prf_code_change_flag = rhs._prf_code_change_flag; - _sampling_win_change_flag = rhs._sampling_win_change_flag; - _cal_gain_change_flag = rhs._cal_gain_change_flag; - _quirp_qu_flag = rhs._quirp_qu_flag; - _inp_data_stat_flag = rhs._inp_data_stat_flag; - _dopp_cent_conf_meas_flag = rhs._dopp_cent_conf_meas_flag; - _dopp_cent_val_flag = rhs._dopp_cent_val_flag; - _dopp_ambig_conf_meas_flag = rhs._dopp_ambig_conf_meas_flag; - _outp_data_mean_flag = rhs._outp_data_mean_flag; - _OGOB_flag = rhs._OGOB_flag; - _PRF_changes = rhs._PRF_changes; - _sampling_win_changes = rhs._sampling_win_changes; - _cal_gain_changes = rhs._cal_gain_changes; - _missing_lines = rhs._missing_lines; - _rec_gain_changes = rhs._rec_gain_changes; - _pulse_width_of_ACF_3db = rhs._pulse_width_of_ACF_3db; - _first_side_lobe_lev_of_ACF = rhs._first_side_lobe_lev_of_ACF; - _ISLR_of_ACF = rhs._ISLR_of_ACF; - _dopp_cent_conf_meas = rhs._dopp_cent_conf_meas; - _dopp_ambig_conf_meas = rhs._dopp_ambig_conf_meas; - _inp_data_I_mean = rhs._inp_data_I_mean; - _inp_data_Q_mean = rhs._inp_data_Q_mean; - _inp_data_I_stddev = rhs._inp_data_I_stddev; - _inp_data_Q_stddev = rhs._inp_data_Q_stddev; - _cal_sys_gain = rhs._cal_sys_gain; - _first_rec_gain_read = rhs._first_rec_gain_read; - _dopp_ambig_num = rhs._dopp_ambig_num; - _I_channel_bias_correction = rhs._I_channel_bias_correction; - _Q_channel_bias_correction = rhs._Q_channel_bias_correction; - _I_channel_gain_correction = rhs._I_channel_gain_correction; - _Q_channel_gain_correction = rhs._Q_channel_gain_correction; - _Q_channel_I_Q_correction = rhs._Q_channel_I_Q_correction; - _noise_power = rhs._noise_power; - _int_cal_utc = rhs._int_cal_utc; - _num_valid_cal_pulses = rhs._num_valid_cal_pulses; - _num_valid_noise_pulses = rhs._num_valid_noise_pulses; - _num_valid_replicas = rhs._num_valid_replicas; - _first_replica_sample = rhs._first_replica_sample; - _mean_cal_pulse_power = rhs._mean_cal_pulse_power; - _mean_noise_power = rhs._mean_noise_power; - _range_comp_norm_fact = rhs._range_comp_norm_fact; - _replica_power = rhs._replica_power; - _first_range_pixel_mid_az_inc = rhs._first_range_pixel_mid_az_inc; - _center_range_pix_mid_az_inc = rhs._center_range_pix_mid_az_inc; - _last_range_pix_mid_az_inc = rhs._last_range_pix_mid_az_inc; - _norm_ref_range_ro = rhs._norm_ref_range_ro; - _antenna_elev_flag = rhs._antenna_elev_flag; - _abs_cal_const_K = rhs._abs_cal_const_K; - _upp_bound_K = rhs._upp_bound_K; - _low_bound_K = rhs._low_bound_K; - _proc_noise_scale_fact = rhs._proc_noise_scale_fact; - _K_gen_date = rhs._K_gen_date; - _K_vers_num = rhs._K_vers_num; - _num_duplic_input_lines = rhs._num_duplic_input_lines; - _estim_bit_error_rate = rhs._estim_bit_error_rate; - _out_image_mean = rhs._out_image_mean; - _out_image_std_dev = rhs._out_image_std_dev; - _out_image_max_value = rhs._out_image_max_value; - _time_raw_data_first_input = rhs._time_raw_data_first_input; - _time_asc_node_state_vectors = rhs._time_asc_node_state_vectors; - _asc_node_pos_X_comp = rhs._asc_node_pos_X_comp; - _asc_node_pos_Y_comp = rhs._asc_node_pos_Y_comp; - _asc_node_pos_Z_comp = rhs._asc_node_pos_Z_comp; - _asc_node_vel_X_comp = rhs._asc_node_vel_X_comp; - _asc_node_vel_Y_comp = rhs._asc_node_vel_Y_comp; - _asc_node_vel_Z_comp = rhs._asc_node_vel_Z_comp; - _out_pixel_bit_length = rhs._out_pixel_bit_length; - _proc_gain_param_1 = rhs._proc_gain_param_1; - _proc_gain_param_2 = rhs._proc_gain_param_2; - _proc_gain_param_3 = rhs._proc_gain_param_3; - _peak_loc_cross_correl_fun = rhs._peak_loc_cross_correl_fun; - _3_dB_width_CCF = rhs._3_dB_width_CCF; - _first_side_lobe_level = rhs._first_side_lobe_level; - _ISLR_CCF_between_last = rhs._ISLR_CCF_between_last; - _peak_loc_CCF_betw_last = rhs._peak_loc_CCF_betw_last; - _Roll_Tilt_Mode_flag = rhs._Roll_Tilt_Mode_flag; - _raw_data_correction_flag = rhs._raw_data_correction_flag; - _look_detecion_flag = rhs._look_detecion_flag; - _doppler_ambiguity_estimat_flag = rhs._doppler_ambiguity_estimat_flag; - _azimuth_baseband_convers_flag = rhs._azimuth_baseband_convers_flag; - _samples_per_line_used = rhs._samples_per_line_used; - _range_lines_skip_factor = rhs._range_lines_skip_factor; - _time_of_inp_state_vectors = rhs._time_of_inp_state_vectors; - _inp_state_vect_pos_X_comp = rhs._inp_state_vect_pos_X_comp; - _inp_state_vect_pos_Y_comp = rhs._inp_state_vect_pos_Y_comp; - _inp_state_vect_pos_Z_comp = rhs._inp_state_vect_pos_Z_comp; - _inp_state_vect_vel_Vx_comp = rhs._inp_state_vect_vel_Vx_comp; - _inp_state_vect_vel_Vy_comp = rhs._inp_state_vect_vel_Vy_comp; - _inp_state_vect_vel_Vz_comp = rhs._inp_state_vect_vel_Vz_comp; - _inp_state_vector_type_flag = rhs._inp_state_vector_type_flag; - _win_coeff_for_range_match = rhs._win_coeff_for_range_match; - _win_coeff_for_azi_match = rhs._win_coeff_for_azi_match; - _update_period_range_match = rhs._update_period_range_match; - _look_scalar_gain_1 = rhs._look_scalar_gain_1; - _look_scalar_gain_2 = rhs._look_scalar_gain_2; - _look_scalar_gain_3 = rhs._look_scalar_gain_3; - _look_scalar_gain_4 = rhs._look_scalar_gain_4; - _look_scalar_gain_5 = rhs._look_scalar_gain_5; - _look_scalar_gain_6 = rhs._look_scalar_gain_6; - _look_scalar_gain_7 = rhs._look_scalar_gain_7; - _look_scalar_gain_8 = rhs._look_scalar_gain_8; - _samp_window_start_time_bias = rhs._samp_window_start_time_bias; - _doppler_centroid_cubic_coeff = rhs._doppler_centroid_cubic_coeff; - _PRF_code_first_range_line = rhs._PRF_code_first_range_line; - _PRF_code_last_range_line = rhs._PRF_code_last_range_line; - _samp_win_start_first = rhs._samp_win_start_first; - _samp_win_start_last = rhs._samp_win_start_last; - _cal_syst_gain_last_proc = rhs._cal_syst_gain_last_proc; - _receiver_gain_last_proc = rhs._receiver_gain_last_proc; - _first_processed_range_sample = rhs._first_processed_range_sample; - _azimuth_FFT_IFFT_ratio = rhs._azimuth_FFT_IFFT_ratio; - _num_azimuth_blocks_proc = rhs._num_azimuth_blocks_proc; - _num_input_raw_data_lines = rhs._num_input_raw_data_lines; - _initial_doppler_ambiguity_num = rhs._initial_doppler_ambiguity_num; - _thresh_no_1_flag = rhs._thresh_no_1_flag; - _thresh_no_2_flag = rhs._thresh_no_2_flag; - _thresh_no_3_flag = rhs._thresh_no_3_flag; - _thresh_no_4_flag = rhs._thresh_no_4_flag; - _thresh_no_5_flag = rhs._thresh_no_5_flag; - _thresh_no_6_flag = rhs._thresh_no_6_flag; - _thresh_no_7_flag = rhs._thresh_no_7_flag; - _thresh_no_8_flag = rhs._thresh_no_8_flag; - _thresh_no_9_flag = rhs._thresh_no_9_flag; - _thresh_no_10_flag = rhs._thresh_no_10_flag; - _thresh_no_11_flag = rhs._thresh_no_11_flag; - _sat_binary_time_of_first = rhs._sat_binary_time_of_first; - _num_valid_pixels_per_range = rhs._num_valid_pixels_per_range; - _num_range_samp_discarded = rhs._num_range_samp_discarded; - _I_gain_imb_lower_bound = rhs._I_gain_imb_lower_bound; - _I_gain_imb_upper_bound = rhs._I_gain_imb_upper_bound; - _I_Q_quad_depar_lower_bound = rhs._I_Q_quad_depar_lower_bound; - _I_Q_quad_depar_upper_bound = rhs._I_Q_quad_depar_upper_bound; - _3_dB_look_bandwidth = rhs._3_dB_look_bandwidth; - _3_dB_look_proc_dopp_bandw = rhs._3_dB_look_proc_dopp_bandw; - _range_spread_loss_comp_flag = rhs._range_spread_loss_comp_flag; - _datation_flag = rhs._datation_flag; - _max_error_range_line_timing = rhs._max_error_range_line_timing; - _form_num_range_line_used = rhs._form_num_range_line_used; - _autom_look_scal_gain_flag = rhs._autom_look_scal_gain_flag; - _max_value_look_scalar_gain = rhs._max_value_look_scalar_gain; - _replica_norm_method_flag = rhs._replica_norm_method_flag; - _coef_ground_range_1 = rhs._coef_ground_range_1; - _coef_ground_range_2 = rhs._coef_ground_range_2; - _coef_ground_range_3 = rhs._coef_ground_range_3; - _coef_ground_range_4 = rhs._coef_ground_range_4; - _coef_ant_elev_1 = rhs._coef_ant_elev_1; - _coef_ant_elev_2 = rhs._coef_ant_elev_2; - _coef_ant_elev_3 = rhs._coef_ant_elev_3; - _coef_ant_elev_4 = rhs._coef_ant_elev_4; - _coef_ant_elev_5 = rhs._coef_ant_elev_5; - _range_time_origin_ant = rhs._range_time_origin_ant; - - return *this; -} diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.cpp deleted file mode 100644 index b69f0b2733..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.cpp +++ /dev/null @@ -1,322 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h> - - -ErsSarFileDescriptor::ErsSarFileDescriptor() : ErsSarRecord("sar_desc_rec") -{ -} - -ErsSarFileDescriptor::~ErsSarFileDescriptor() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarFileDescriptor& data) -{ - os<<"ascii_flag:"<<data._ascii_flag.c_str()<<std::endl; - os<<"format_doc:"<<data._format_doc.c_str()<<std::endl; - os<<"format_ver:"<<data._format_ver.c_str()<<std::endl; - os<<"design_rev:"<<data._design_rev.c_str()<<std::endl; - os<<"software_id:"<<data._software_id.c_str()<<std::endl; - os<<"file_num:"<<data._file_num<<std::endl; - os<<"file_name:"<<data._file_name.c_str()<<std::endl; - os<<"rec_seq:"<<data._rec_seq.c_str()<<std::endl; - os<<"seq_loc:"<<data._seq_loc<<std::endl; - os<<"seq_len:"<<data._seq_len<<std::endl; - os<<"rec_code:"<<data._rec_code.c_str()<<std::endl; - os<<"code_loc:"<<data._code_loc<<std::endl; - os<<"code_len:"<<data._code_len<<std::endl; - os<<"rec_len:"<<data._rec_len.c_str()<<std::endl; - os<<"rlen_loc:"<<data._rlen_loc<<std::endl; - os<<"rlen_len:"<<data._rlen_len<<std::endl; - os<<"n_dataset:"<<data._n_dataset<<std::endl; - os<<"l_dataset:"<<data._l_dataset<<std::endl; - os<<"n_map_proj:"<<data._n_map_proj<<std::endl; - os<<"l_map_proj:"<<data._l_map_proj<<std::endl; - os<<"n_plat_pos:"<<data._n_plat_pos<<std::endl; - os<<"l_plat_pos:"<<data._l_plat_pos<<std::endl; - os<<"n_att_data:"<<data._n_att_data<<std::endl; - os<<"l_att_data:"<<data._l_att_data<<std::endl; - os<<"n_radi_data:"<<data._n_radi_data<<std::endl; - os<<"l_radi_data:"<<data._l_radi_data<<std::endl; - os<<"n_radi_comp:"<<data._n_radi_comp<<std::endl; - os<<"l_radi_comp:"<<data._l_radi_comp<<std::endl; - os<<"n_qual_sum:"<<data._n_qual_sum<<std::endl; - os<<"l_qual_sum:"<<data._l_qual_sum<<std::endl; - os<<"n_data_his:"<<data._n_data_his<<std::endl; - os<<"l_data_his:"<<data._l_data_his<<std::endl; - os<<"n_rang_spec:"<<data._n_rang_spec<<std::endl; - os<<"l_rang_spec:"<<data._l_rang_spec<<std::endl; - os<<"n_dem_desc:"<<data._n_dem_desc<<std::endl; - os<<"l_dem_desc:"<<data._l_dem_desc<<std::endl; - os<<"n_radar_par:"<<data._n_radar_par<<std::endl; - os<<"l_radar_par:"<<data._l_radar_par<<std::endl; - os<<"n_anno_data:"<<data._n_anno_data<<std::endl; - os<<"l_anno_data:"<<data._l_anno_data<<std::endl; - os<<"n_det_proc:"<<data._n_det_proc<<std::endl; - os<<"l_det_proc:"<<data._l_det_proc<<std::endl; - os<<"n_cal:"<<data._n_cal<<std::endl; - os<<"l_cal:"<<data._l_cal<<std::endl; - os<<"n_gcp:"<<data._n_gcp<<std::endl; - os<<"l_gcp:"<<data._l_gcp<<std::endl; - os<<"n_fac_data:"<<data._n_fac_data<<std::endl; - os<<"l_fac_data:"<<data._l_fac_data<<std::endl; - return os; -} - -std::istream& operator>>(std::istream& is, ErsSarFileDescriptor& data) -{ - char buf2[3]; - buf2[2] = '\0'; - char buf12[13]; - buf12[12] = '\0'; - char buf16[17]; - buf16[16] = '\0'; - char buf4[5]; - buf4[4] = '\0'; - char buf6[7]; - buf6[6] = '\0'; - char buf8[9]; - buf8[8] = '\0'; - char buf64[65]; - buf64[64] = '\0'; - - char buf60[61]; - buf60[60] = '\0'; - - char buf288[289]; - buf288[288] = '\0'; - - is.read(buf2,2); - data._ascii_flag = buf2; - - is.read(buf2,2); - - is.read(buf12,12); - data._format_doc = buf12; - - is.read(buf2,2); - data._format_ver = buf2; - - is.read(buf2,2); - data._design_rev = buf2; - - is.read(buf12,12); - data._software_id = buf12; - - is.read(buf4,4); - data._file_num = atoi(buf4); - - is.read(buf16,16); - data._file_name = buf16; - - is.read(buf4,4); - data._rec_seq = buf4; - - is.read(buf8,8); - data._seq_loc = atoi(buf8); - - is.read(buf4,4); - data._seq_len = atoi(buf4); - - is.read(buf4,4); - data._rec_code = buf4; - - is.read(buf8,8); - data._code_loc = atoi(buf8); - - is.read(buf4,4); - data._code_len = atoi(buf4); - - is.read(buf4,4); - data._rec_len = buf4; - - is.read(buf8,8); - data._rlen_loc = atoi(buf8); - - is.read(buf4,4); - data._rlen_len = atoi(buf4); - - is.read(buf4,4); - - is.read(buf64,64); - - is.read(buf6,6); - data._n_dataset = atoi(buf6); - - is.read(buf6,6); - data._l_dataset = atoi(buf6); - - is.read(buf6,6); - data._n_map_proj = atoi(buf6); - - is.read(buf6,6); - data._l_map_proj = atoi(buf6); - - is.read(buf6,6); - data._n_plat_pos = atoi(buf6); - is.read(buf6,6); - data._l_plat_pos = atoi(buf6); - is.read(buf6,6); - data._n_att_data = atoi(buf6); - is.read(buf6,6); - data._l_att_data = atoi(buf6); - is.read(buf6,6); - data._n_radi_data = atoi(buf6); - is.read(buf6,6); - data._l_radi_data = atoi(buf6); - is.read(buf6,6); - data._n_radi_comp = atoi(buf6); - is.read(buf6,6); - data._l_radi_comp = atoi(buf6); - is.read(buf6,6); - data._n_qual_sum = atoi(buf6); - is.read(buf6,6); - data._l_qual_sum = atoi(buf6); - is.read(buf6,6); - data._n_data_his = atoi(buf6); - is.read(buf6,6); - data._l_data_his = atoi(buf6); - - - - is.read(buf6,6); - data._n_rang_spec = atoi(buf6); - is.read(buf6,6); - data._l_rang_spec = atoi(buf6); - is.read(buf6,6); - data._n_dem_desc = atoi(buf6); - is.read(buf6,6); - data._l_dem_desc = atoi(buf6); - is.read(buf6,6); - data._n_radar_par = atoi(buf6); - is.read(buf6,6); - data._l_radar_par = atoi(buf6); - is.read(buf6,6); - data._n_anno_data = atoi(buf6); - is.read(buf6,6); - data._l_anno_data = atoi(buf6); - is.read(buf6,6); - data._n_det_proc = atoi(buf6); - is.read(buf6,6); - data._l_det_proc = atoi(buf6); - is.read(buf6,6); - data._n_cal = atoi(buf6); - is.read(buf6,6); - data._l_cal = atoi(buf6); - is.read(buf6,6); - data._n_gcp = atoi(buf6); - is.read(buf6,6); - data._l_gcp = atoi(buf6); - is.read(buf60,60); - is.read(buf6,6); - data._n_fac_data = atoi(buf6); - is.read(buf6,6); - data._l_fac_data = atoi(buf6); - is.read(buf288,288); - return is; -} - -ErsSarFileDescriptor::ErsSarFileDescriptor(const ErsSarFileDescriptor& rhs): - ErsSarRecord(rhs), - _ascii_flag(rhs._ascii_flag), - _format_doc(rhs._format_doc), - _format_ver(rhs._format_ver), - _design_rev(rhs._design_rev), - _software_id(rhs._software_id), - _file_num(rhs._file_num), - _file_name(rhs._file_name), - _rec_seq(rhs._rec_seq), - _seq_loc(rhs._seq_loc), - _seq_len(rhs._seq_len), - _rec_code(rhs._rec_code), - _code_loc(rhs._code_loc), - _code_len(rhs._code_len), - _rec_len(rhs._rec_len), - _rlen_loc(rhs._rlen_loc), - _rlen_len(rhs._rlen_len), - _n_dataset(rhs._n_dataset), - _l_dataset(rhs._l_dataset), - _n_map_proj(rhs._n_map_proj), - _l_map_proj(rhs._l_map_proj), - _n_plat_pos(rhs._n_plat_pos), - _l_plat_pos(rhs._l_plat_pos), - _n_att_data(rhs._n_att_data), - _l_att_data(rhs._l_att_data), - _n_radi_data(rhs._n_radi_data), - _l_radi_data(rhs._l_radi_data), - _n_radi_comp(rhs._n_radi_comp), - _l_radi_comp(rhs._l_radi_comp), - _n_qual_sum(rhs._n_qual_sum), - _l_qual_sum(rhs._l_qual_sum), - _n_data_his(rhs._n_data_his), - _l_data_his(rhs._l_data_his), - _n_rang_spec(rhs._n_rang_spec), - _l_rang_spec(rhs._l_rang_spec), - _n_dem_desc(rhs._n_dem_desc), - _l_dem_desc(rhs._l_dem_desc), - _n_radar_par(rhs._n_radar_par), - _l_radar_par(rhs._l_radar_par), - _n_anno_data(rhs._n_anno_data), - _l_anno_data(rhs._l_anno_data), - _n_det_proc(rhs._n_det_proc), - _l_det_proc(rhs._l_det_proc), - _n_cal(rhs._n_cal), - _l_cal(rhs._l_cal), - _n_gcp(rhs._n_gcp), - _l_gcp(rhs._l_gcp), - _n_fac_data(rhs._n_fac_data), - _l_fac_data(rhs._l_fac_data) -{ -} - -ErsSarFileDescriptor& ErsSarFileDescriptor::operator=(const ErsSarFileDescriptor& rhs) -{ - _ascii_flag = rhs._ascii_flag; - _format_doc = rhs._format_doc; - _format_ver = rhs._format_ver; - _design_rev = rhs._design_rev; - _software_id = rhs._software_id; - _file_num = rhs._file_num; - _file_name = rhs._file_name; - _rec_seq = rhs._rec_seq; - _seq_loc = rhs._seq_loc; - _seq_len = rhs._seq_len; - _rec_code = rhs._rec_code; - _code_loc = rhs._code_loc; - _code_len = rhs._code_len; - _rec_len = rhs._rec_len; - _rlen_loc = rhs._rlen_loc; - _rlen_len = rhs._rlen_len; - _n_dataset = rhs._n_dataset; - _l_dataset = rhs._l_dataset; - _n_map_proj = rhs._n_map_proj; - _l_map_proj = rhs._l_map_proj; - _n_plat_pos = rhs._n_plat_pos; - _l_plat_pos = rhs._l_plat_pos; - _n_att_data = rhs._n_att_data; - _l_att_data = rhs._l_att_data; - _n_radi_data = rhs._n_radi_data; - _l_radi_data = rhs._l_radi_data; - _n_radi_comp = rhs._n_radi_comp; - _l_radi_comp = rhs._l_radi_comp; - _n_qual_sum = rhs._n_qual_sum ; - _l_qual_sum = rhs._l_qual_sum; - _n_data_his = rhs._n_data_his; - _l_data_his = rhs._l_data_his; - _n_rang_spec = rhs._n_rang_spec; - _l_rang_spec = rhs._l_rang_spec; - _n_dem_desc = rhs._n_dem_desc; - _l_dem_desc = rhs._l_dem_desc; - _n_radar_par = rhs._n_radar_par; - _l_radar_par = rhs._l_radar_par; - _n_anno_data = rhs._n_anno_data; - _l_anno_data = rhs._l_anno_data; - _n_det_proc = rhs._n_det_proc; - _l_det_proc = rhs._l_det_proc; - _n_cal = rhs._n_cal; - _l_cal = rhs._l_cal; - _n_gcp = rhs._n_gcp; - _l_gcp = rhs._l_gcp; - _n_fac_data = rhs._n_fac_data; - _l_fac_data = rhs._l_fac_data; - return *this; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.cpp deleted file mode 100644 index 1399638554..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeader.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h> -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h> - -const int ErsSarLeader::ErsSarFacilityDataID = 5; -const int ErsSarLeader::ErsSarPlatformPositionDataID = 4; -const int ErsSarLeader::ErsSarMapProjectionDataID = 3; -const int ErsSarLeader::ErsSarDataSetSummaryID = 2; -const int ErsSarLeader::ErsSarFileDescriptorID = 1; - -ErsSarLeader::ErsSarLeader() -{ -} - -ErsSarLeader::~ErsSarLeader() -{ - ClearRecords(); -} - -std::ostream& operator<<(std::ostream& os, const ErsSarLeader& data) -{ - std::map<int, ErsSarRecord*>::const_iterator it = data._records.begin(); - while(it != data._records.end()) - { - (*it).second->Write(os); - ++it; - } - return os; - -} - -std::istream& operator>>(std::istream& is, ErsSarLeader& data) -{ - ErsSarLeaderFactory factory; - - data.ClearRecords(); - - ErsSarRecordHeader header; - bool eof = false; - while(!eof) - { - is>>header; - if(is.eof()) - { - eof = true; - } - else - { - ErsSarRecord* record = factory.Instanciate(header.get_rec_seq()); - if (record != NULL) - { - record->Read(is); - data._records[header.get_rec_seq()] = record; - } - else - { - char* buff = new char[header.get_length()-12]; - is.read(buff, header.get_length()-12); - delete buff; - } - } - } - return is; -} - - -ErsSarLeader::ErsSarLeader(const ErsSarLeader& rhs) -{ - std::map<int, ErsSarRecord*>::const_iterator it = rhs._records.begin(); - while(it != rhs._records.end()) - { - _records[(*it).first] = (*it).second->Clone(); - ++it; - } -} - -ErsSarLeader& ErsSarLeader::operator=(const ErsSarLeader& rhs) -{ - ClearRecords(); - std::map<int, ErsSarRecord*>::const_iterator it = rhs._records.begin(); - while(it != rhs._records.end()) - { - _records[(*it).first] = (*it).second->Clone(); - ++it; - } - - return *this; -} - -void ErsSarLeader::ClearRecords() -{ - std::map<int, ErsSarRecord*>::const_iterator it = _records.begin(); - while(it != _records.end()) - { - delete (*it).second; - ++it; - } - _records.clear(); -} - - - -ErsSarFacilityData * ErsSarLeader::get_ErsSarFacilityData() -{ - return (ErsSarFacilityData*)_records[ErsSarFacilityDataID]; -} -ErsSarPlatformPositionData * ErsSarLeader::get_ErsSarPlatformPositionData() -{ - return (ErsSarPlatformPositionData*)_records[ErsSarPlatformPositionDataID]; -} -ErsSarMapProjectionData * ErsSarLeader::get_ErsSarMapProjectionData() -{ - return (ErsSarMapProjectionData*)_records[ErsSarMapProjectionDataID]; -} - -ErsSarDataSetSummary * ErsSarLeader::get_ErsSarDataSetSummary() -{ - return (ErsSarDataSetSummary*)_records[ErsSarDataSetSummaryID]; -} - -ErsSarFileDescriptor * ErsSarLeader::get_ErsSarFileDescriptor() -{ - return (ErsSarFileDescriptor*)_records[ErsSarFileDescriptorID]; -} diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.cpp deleted file mode 100644 index 1df2f1f83f..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarLeaderFactory.h> - -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h> - -ErsSarLeaderFactory::ErsSarLeaderFactory() -{ - RegisterRecord(5, new ErsSarFacilityData()); - RegisterRecord(4, new ErsSarPlatformPositionData()); - RegisterRecord(3, new ErsSarMapProjectionData()); - RegisterRecord(2, new ErsSarDataSetSummary()); - RegisterRecord(1, new ErsSarFileDescriptor()); -} - -ErsSarLeaderFactory::~ErsSarLeaderFactory() -{ - -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.cpp deleted file mode 100644 index f816f01b4e..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.cpp +++ /dev/null @@ -1,194 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h> - -ErsSarMapProjectionData::ErsSarMapProjectionData() : ErsSarRecord("map_proj_data_rec") -{ -} - -ErsSarMapProjectionData::~ErsSarMapProjectionData() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarMapProjectionData& data) -{ - os<<"map_proj_des:"<<data._map_proj_des.c_str()<<std::endl; - - os<<"num_pix_in_line:"<<data._num_pix_in_line<<std::endl; - - os<<"num_lines:"<<data._num_lines<<std::endl; - - os<<"nom_interpixel_dist:"<<data._nom_interpixel_dist<<std::endl; - - os<<"nom_interline_dist:"<<data._nom_interline_dist<<std::endl; - - os<<"orientation_at_center:"<<data._orientation_at_center<<std::endl; - - os<<"orbit_incl:"<<data._orbit_incl<<std::endl; - - os<<"asc_node_long:"<<data._asc_node_long<<std::endl; - - os<<"platform_heading:"<<data._platform_heading<<std::endl; - - os<<"name_of_ref_ellipsoid:"<<data._name_of_ref_ellipsoid.c_str()<<std::endl; - - os<<"semi_maj_axis:"<<data._semi_maj_axis<<std::endl; - - os<<"semi_min_axis:"<<data._semi_min_axis<<std::endl; - - os<<"first_line_first_pixel_lat:"<<data._first_line_first_pixel_lat<<std::endl; - - os<<"first_line_first_pixel_lon:"<<data._first_line_first_pixel_lon<<std::endl; - - os<<"first_line_last_pixel_lat:"<<data._first_line_last_pixel_lat<<std::endl; - - os<<"first_line_last_pixel_lon:"<<data._first_line_last_pixel_lon<<std::endl; - - os<<"last_line_last_pixel_lat:"<<data._last_line_last_pixel_lat<<std::endl; - - os<<"last_line_last_pixel_lon:"<<data._last_line_last_pixel_lon<<std::endl; - - os<<"last_line_first_pixel_lat:"<<data._last_line_first_pixel_lat<<std::endl; - - os<<"last_line_first_pixel_lon:"<<data._last_line_first_pixel_lon<<std::endl; - - return os; - -} - -std::istream& operator>>(std::istream& is, ErsSarMapProjectionData& data) -{ - char buf16[17]; - buf16[16]='\0'; - char buf32[33]; - buf32[32] = '\0'; - char buf8[9]; - buf8[8] = '\0'; - char buf4[5]; - buf4[4] = '\0'; - - is.read(buf16,16); - - is.read(buf32,32); - data._map_proj_des = buf32; - - is.read(buf16,16); - data._num_pix_in_line = atoi(buf16); - - is.read(buf16,16 ); - data._num_lines = atoi(buf16); - - is.read(buf16,16); - data._nom_interpixel_dist = atof(buf16); - - is.read(buf16,16); - data._nom_interline_dist = atof(buf16); - - is.read(buf16,16); - data._orientation_at_center = atof(buf16); - - is.read(buf16,16); - data._orbit_incl = atof(buf16); - - is.read(buf16,16); - data._asc_node_long = atof(buf16); - - is.read(buf16,16); - - is.read(buf16,16); - - is.read(buf16,16); - - is.read(buf16,16); - data._platform_heading = atof(buf16); - - is.read(buf32,32); - data._name_of_ref_ellipsoid = buf32; - - is.read(buf16,16); - data._semi_maj_axis = atof(buf16); - - is.read(buf16,16); - data._semi_min_axis = atof(buf16); - - char buf772[772]; - is.read(buf772,772); - - is.read(buf16,16); - data._first_line_first_pixel_lat = atof(buf16); - - is.read(buf16,16); - data._first_line_first_pixel_lon = atof(buf16); - - is.read(buf16,16); - data._first_line_last_pixel_lat = atof(buf16); - - is.read(buf16,16); - data._first_line_last_pixel_lon = atof(buf16); - - is.read(buf16,16); - data._last_line_last_pixel_lat = atof(buf16); - - is.read(buf16,16); - data._last_line_last_pixel_lon = atof(buf16); - - is.read(buf16,16); - data._last_line_first_pixel_lat = atof(buf16); - - is.read(buf16,16); - data._last_line_first_pixel_lon = atof(buf16); - - char buf420[420]; - is.read(buf420,420); - - return is; -} - - -ErsSarMapProjectionData::ErsSarMapProjectionData(const ErsSarMapProjectionData& rhs): - ErsSarRecord(rhs), - _map_proj_des(rhs._map_proj_des), - _num_pix_in_line(rhs._num_pix_in_line), - _num_lines(rhs._num_lines), - _nom_interpixel_dist(rhs._nom_interpixel_dist), - _nom_interline_dist(rhs._nom_interline_dist), - _orientation_at_center(rhs._orientation_at_center), - _orbit_incl(rhs._orbit_incl), - _asc_node_long(rhs._asc_node_long), - _platform_heading(rhs._platform_heading), - _name_of_ref_ellipsoid(rhs._name_of_ref_ellipsoid), - _semi_maj_axis(rhs._semi_maj_axis), - _semi_min_axis(rhs._semi_min_axis), - _first_line_first_pixel_lat(rhs._first_line_first_pixel_lat), - _first_line_first_pixel_lon(rhs._first_line_first_pixel_lon), - _first_line_last_pixel_lat(rhs._first_line_last_pixel_lat), - _first_line_last_pixel_lon(rhs._first_line_last_pixel_lon), - _last_line_last_pixel_lat(rhs._last_line_last_pixel_lat), - _last_line_last_pixel_lon(rhs._last_line_last_pixel_lon), - _last_line_first_pixel_lat(rhs._last_line_first_pixel_lat), - _last_line_first_pixel_lon(rhs._last_line_first_pixel_lon) - {} - -ErsSarMapProjectionData& ErsSarMapProjectionData::operator=(const ErsSarMapProjectionData& rhs) -{ - _map_proj_des = rhs._map_proj_des; - _num_pix_in_line = rhs._num_pix_in_line; - _num_lines = rhs._num_lines; - _nom_interpixel_dist = rhs._nom_interpixel_dist; - _nom_interline_dist = rhs._nom_interline_dist; - _orientation_at_center = rhs._orientation_at_center; - _orbit_incl = rhs._orbit_incl; - _asc_node_long = rhs._asc_node_long; - _platform_heading = rhs._platform_heading; - _name_of_ref_ellipsoid = rhs._name_of_ref_ellipsoid; - _semi_maj_axis = rhs._semi_maj_axis; - _semi_min_axis = rhs._semi_min_axis; - _first_line_first_pixel_lat = rhs._first_line_first_pixel_lat; - _first_line_first_pixel_lon = rhs._first_line_first_pixel_lon; - _first_line_last_pixel_lat = rhs._first_line_last_pixel_lat; - _first_line_last_pixel_lon = rhs._first_line_last_pixel_lon; - _last_line_last_pixel_lat = rhs._last_line_last_pixel_lat; - _last_line_last_pixel_lon = rhs._last_line_last_pixel_lon; - _last_line_first_pixel_lat = rhs._last_line_first_pixel_lat; - _last_line_first_pixel_lon = rhs._last_line_first_pixel_lon; - - return *this; -} diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.cpp deleted file mode 100644 index 8e85ddf4f6..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.cpp +++ /dev/null @@ -1,235 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h> - - -ErsSarPlatformPositionData::ErsSarPlatformPositionData() : ErsSarRecord("pos_data_rec") -{ -} - -ErsSarPlatformPositionData::~ErsSarPlatformPositionData() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarPlatformPositionData& data) -{ - os<<"orbit_ele_desg:"<<data._orbit_ele_desg.c_str()<<std::endl; - - for(int i=0;i<6;i++) - { - os<<"orbit_ele["<<i<<"]:"<<data._orbit_ele[i]<<std::endl; - } - - os<<"ndata:"<<data._ndata<<std::endl; - - os<<"year:"<<data._year<<std::endl; - - os<<"month:"<<data._month<<std::endl; - - os<<"day:"<<data._day<<std::endl; - - os<<"gmt_day:"<<data._gmt_day<<std::endl; - - os<<"gmt_sec:"<<data._gmt_sec<<std::endl; - - os<<"data_int:"<<data._data_int<<std::endl; - - os<<"ref_coord:"<<data._ref_coord.c_str()<<std::endl; - - os<<"hr_angle:"<<data._hr_angle<<std::endl; - - os<<"alt_poserr:"<<data._alt_poserr<<std::endl; - - os<<"crt_poserr:"<<data._crt_poserr<<std::endl; - - os<<"rad_poserr:"<<data._rad_poserr<<std::endl; - - os<<"alt_velerr:"<<data._alt_velerr<<std::endl; - - os<<"crt_velerr:"<<data._crt_velerr<<std::endl; - - os<<"rad_velerr:"<<data._rad_velerr<<std::endl; - - for (int i=0;i<64;i++) - { - os<<"pos_vect["<<i<<"]:"<<data._pos_vect[i]<<std::endl; - } - - return os; -} - -std::istream& operator>>(std::istream& is, ErsSarPlatformPositionData& data) -{ - char buf[1207]; - buf[1206] = '\0'; - - is.read(buf,32); - buf[32] = '\0'; - data._orbit_ele_desg = buf; - - for(int i=0;i<6;i++) - { - is.read(buf,16); - buf[16] = '\0'; - data._orbit_ele[i] = atof(buf); - } - - is.read(buf,4); - buf[4] = '\0'; - data._ndata = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._year = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._month = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._day = atoi(buf); - - is.read(buf,4); - buf[4] = '\0'; - data._gmt_day = atoi(buf); - - is.read(buf,22); - buf[22] = '\0'; - data._gmt_sec = atof(buf); - - is.read(buf,22); - buf[22] = '\0'; - data._data_int = atof(buf); - - is.read(buf,64); - buf[64] = '\0'; - data._ref_coord = buf; - - is.read(buf,22); - buf[22] = '\0'; - data._hr_angle = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._alt_poserr = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._crt_poserr = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._rad_poserr = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._alt_velerr = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._crt_velerr = atof(buf); - - is.read(buf,16); - buf[16] = '\0'; - data._rad_velerr = atof(buf); - - for (int i=0;i<data._ndata;i++) - { - is>>data._pos_vect[i]; - } - - return is; -} - -ErsSarPlatformPositionData::ErsSarPlatformPositionData(const ErsSarPlatformPositionData& rhs): - ErsSarRecord(rhs) -{ - _orbit_ele_desg = rhs._orbit_ele_desg; - - for(int i=0;i<6;i++) - { - _orbit_ele[i] = rhs._orbit_ele[i]; - } - - _ndata = rhs._ndata; - - _year = rhs._year; - - _month = rhs._month; - - _day = rhs._day; - - _gmt_day = rhs._gmt_day; - - _gmt_sec = rhs._gmt_sec; - - _data_int = rhs._data_int; - - _ref_coord = rhs._ref_coord; - - _hr_angle = rhs._hr_angle; - - _alt_poserr = rhs._alt_poserr; - - _crt_poserr = rhs._crt_poserr; - - _rad_poserr = rhs._rad_poserr; - - _alt_velerr = rhs._alt_velerr; - - _crt_velerr = rhs._crt_velerr; - - _rad_velerr = rhs._rad_velerr; - - for (int i=0;i<64;i++) - { - _pos_vect[i] = rhs._pos_vect[i]; - } - -} - -ErsSarPlatformPositionData& ErsSarPlatformPositionData::operator=(const ErsSarPlatformPositionData& rhs) -{ - _orbit_ele_desg = rhs._orbit_ele_desg; - - for(int i=0;i<6;i++) - { - _orbit_ele[i] = rhs._orbit_ele[i]; - } - - _ndata = rhs._ndata; - - _year = rhs._year; - - _month = rhs._month; - - _day = rhs._day; - - _gmt_day = rhs._gmt_day; - - _gmt_sec = rhs._gmt_sec; - - _data_int = rhs._data_int; - - _ref_coord = rhs._ref_coord; - - _hr_angle = rhs._hr_angle; - - _alt_poserr = rhs._alt_poserr; - - _crt_poserr = rhs._crt_poserr; - - _rad_poserr = rhs._rad_poserr; - - _alt_velerr = rhs._alt_velerr; - - _crt_velerr = rhs._crt_velerr; - - _rad_velerr = rhs._rad_velerr; - - for (int i=0;i<64;i++) - { - _pos_vect[i] = rhs._pos_vect[i]; - } - - return *this; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.cpp deleted file mode 100644 index a5bdda9c5e..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarPositionVectorRecord.h> - - -ErsSarPositionVectorRecord::ErsSarPositionVectorRecord() -{ -} - -ErsSarPositionVectorRecord::~ErsSarPositionVectorRecord() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarPositionVectorRecord& data) -{ - for (int i=0;i<3;i++) - { - os<<"pos["<<i<<"]:"<<data._pos[i]<<std::endl; - } - - for (int i=0;i<3;i++) - { - os<<"vel["<<i<<"]:"<<data._vel[i]<<std::endl; - } - return os; -} - -std::istream& operator>>(std::istream& is, ErsSarPositionVectorRecord& data) -{ - char buf[23]; - buf[22] = '\0'; - - for (int i=0;i<3;i++) - { - is.read(buf,22); - data._pos[i] = atof(buf); - } - - for (int i=0;i<3;i++) - { - is.read(buf,22); - data._vel[i] = atof(buf); - } - return is; -} - -ErsSarPositionVectorRecord::ErsSarPositionVectorRecord(const ErsSarPositionVectorRecord& rhs) -{ - for (int i=0;i<3;i++) - { - _pos[i] = rhs._pos[i]; - } - - for (int i=0;i<3;i++) - { - _vel[i] = rhs._vel[i]; - } -} - -ErsSarPositionVectorRecord& ErsSarPositionVectorRecord::operator=(const ErsSarPositionVectorRecord& rhs) -{ - for (int i=0;i<3;i++) - { - _pos[i] = rhs._pos[i]; - } - - for (int i=0;i<3;i++) - { - _vel[i] = rhs._vel[i]; - } - return *this; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecord.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecord.cpp deleted file mode 100644 index cbae007365..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecord.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarRecord.h> -#include <memory.h> - -ErsSarRecord::ErsSarRecord(std::string mnemonic): - _mnemonic(mnemonic) -{ -} - -ErsSarRecord::~ErsSarRecord() -{ -} - -ErsSarRecord::ErsSarRecord(const ErsSarRecord& rhs): - _mnemonic(rhs._mnemonic) -{ -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordFactory.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordFactory.cpp deleted file mode 100644 index f280b6968c..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordFactory.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarRecordFactory.h> - -ErsSarRecordFactory::ErsSarRecordFactory() -{ -} - -ErsSarRecordFactory::~ErsSarRecordFactory() -{ -} - -ErsSarRecord* ErsSarRecordFactory::Instanciate(int id) -{ - ErsSarRecord* record = _availableRecords[id]; - if(record == NULL) - { - return NULL; - } - else - { - return record->Instanciate(); - } -} - -void ErsSarRecordFactory::RegisterRecord(int id, ErsSarRecord * record) -{ - _availableRecords[id] = record; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordHeader.cpp b/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordHeader.cpp deleted file mode 100644 index 8e9a67258e..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ErsSar/ErsSarRecordHeader.cpp +++ /dev/null @@ -1,67 +0,0 @@ -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - - -ErsSarRecordHeader::ErsSarRecordHeader() -{ -} - -ErsSarRecordHeader::~ErsSarRecordHeader() -{ -} - -std::ostream& operator<<(std::ostream& os, const ErsSarRecordHeader& data) -{ - os<<"record_sequence_number:"<<data._rec_seq<<std::endl; - os<<"first_record_sub-type:"<<(int)data._rec_sub1<<std::endl; - os<<"record_type_code:"<<(int)data._rec_type<<std::endl; - os<<"second_record_sub-type:"<<(int)data._rec_sub2<<std::endl; - os<<"third_record_sub-type:"<<(int)data._rec_sub3<<std::endl; - os<<"length:"<<data._length<<std::endl; - return os; -} - -std::istream& operator>>(std::istream& is, ErsSarRecordHeader& data) -{ - is.read((char*)&(data._rec_seq),4); - data.SwitchEndian(data._rec_seq); - is.read((char*)&(data._rec_sub1),1); - is.read((char*)&(data._rec_type),1); - is.read((char*)&(data._rec_sub2),1); - is.read((char*)&(data._rec_sub3),1); - is.read((char*)&(data._length),4); - data.SwitchEndian(data._length); - return is; -} - -ErsSarRecordHeader::ErsSarRecordHeader(const ErsSarRecordHeader& rhs): - _rec_seq(rhs._rec_seq), - _rec_sub1(rhs._rec_sub1), - _rec_type(rhs._rec_type), - _rec_sub2(rhs._rec_sub2), - _rec_sub3(rhs._rec_sub3) -{ -} - -ErsSarRecordHeader& ErsSarRecordHeader::operator=(const ErsSarRecordHeader& rhs) -{ - _rec_seq=rhs._rec_seq; - _rec_sub1=rhs._rec_sub1; - _rec_type=rhs._rec_type; - _rec_sub2=rhs._rec_sub2; - _rec_sub3=rhs._rec_sub3; - return *this; -} - -void ErsSarRecordHeader::SwitchEndian(unsigned int& value) -{ - char buffer[4]; - char res[4]; - - memcpy(buffer,&value,4); - res[0] = buffer[3]; - res[1] = buffer[2]; - res[2] = buffer[1]; - res[3] = buffer[0]; - - memcpy(&value,res,4); -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/RadarSat2/Rds2Annotation.cpp b/Utilities/otbossim/src/ossim/imaging/RadarSat2/Rds2Annotation.cpp deleted file mode 100644 index e098bd235d..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/RadarSat2/Rds2Annotation.cpp +++ /dev/null @@ -1,310 +0,0 @@ -#include <ossim/imaging/RadarSat2/Rds2Annotation.h> -#include <ossim/base/ossimString.h> -#include <ossim/base/ossimXmlDocument.h> -#include <ossim/base/ossimXmlNode.h> -#include <ossim/base/ossimRefPtr.h> -#include <iostream> - -Rds2Annotation::Rds2Annotation() -{ -} - -Rds2Annotation::~Rds2Annotation() -{ -} - -bool Rds2Annotation::Parse(ossimXmlDocument docXML) { - - // Rds2 date format is UTC (xs:dateTime) : yyyy-mm-ddThh:mm:ss(.s+)zzzz (where zzzz is the timeZone). - - std::vector< ossimRefPtr<ossimXmlNode> > searchResult, secondSearchResult ; - ossimRefPtr<ossimXmlNode> foundNode; - ossimRefPtr<ossimXmlNode> foundSubNode ; - ossimString * xpathTest ; - - // Pixel order - xpathTest = new ossimString("/product/imageAttributes/rasterAttributes/lineTimeOrdering") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _lineTimeOrdering = foundNode->getText() ; - - xpathTest = new ossimString("/product/imageAttributes/rasterAttributes/pixelTimeOrdering") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pixelTimeOrdering = foundNode->getText() ; - - // Orbit direction : Ascending/descending - xpathTest = new ossimString("/product/sourceAttributes/orbitAndAttitude/orbitInformation/passDirection") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _orbitDirection = foundNode->getText() ; - - // Look direction - xpathTest = new ossimString("/product/sourceAttributes/radarParameters/antennaPointing") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _lookDirection = foundNode->getText() ; - - // Ellipsoid semi-major axis, km - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/referenceEllipsoidParameters/semiMajorAxis") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _ellip_maj = ( foundNode->getText() ).toDouble() / 1000.0 ; - - // Ellipsoid semi_minor axis, km - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/referenceEllipsoidParameters/semiMinorAxis") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _ellip_min = ( foundNode->getText() ).toDouble() / 1000.0 ; - - // Radar center frequency - xpathTest = new ossimString("/product/sourceAttributes/radarParameters/radarCenterFrequency") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _central_freq = ( foundNode->getText() ).toDouble() ; - - // Range sampling rate - xpathTest = new ossimString("/product/sourceAttributes/radarParameters/adcSamplingRate") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _fr = ( foundNode->getText() ).toDouble() ; - - // Slant Range Near Edge - xpathTest = new ossimString("/product/imageGenerationParameters/sarProcessingInformation/slantRangeNearEdge") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _slantRangeNearEdge = ( foundNode->getText() ).toDouble() ; - - // Zero Doppler Time First Line - xpathTest = new ossimString("/product/imageGenerationParameters/sarProcessingInformation/zeroDopplerTimeFirstLine") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _zeroDopplerTimeFirstLine = foundNode->getText() ; - - // Nominal PRF, Hz - xpathTest = new ossimString("/product/sourceAttributes/radarParameters/pulseRepetitionFrequency") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _fa = ( foundNode->getText() ).toDouble() ; - - // Number of azimuth looks - xpathTest = new ossimString("/product/imageGenerationParameters/sarProcessingInformation/numberOfAzimuthLooks") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _n_azilok = ( foundNode->getText() ).toDouble() ; - - // Number of range looks - xpathTest = new ossimString("/product/imageGenerationParameters/sarProcessingInformation/numberOfRangeLooks") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _n_rnglok = ( foundNode->getText() ).toDouble() ; - - // Average terrain height, m - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/referenceEllipsoidParameters/geodeticTerrainHeight") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _terrain_h = ( foundNode->getText() ).toDouble() ; - - // ProductType (SLC,SGF,SGX,SGC,SSG,SPG) - xpathTest = new ossimString("/product/imageGenerationParameters/generalProcessingInformation/productType") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _productType = foundNode->getText() ; - - // number of lines - xpathTest = new ossimString("/product/imageAttributes/rasterAttributes/numberOfLines") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _nbLin = (foundNode->getText()).toDouble() ; - - // Slant Range FOR EACH Ground Range Projection - // number of columns - xpathTest = new ossimString("/product/imageAttributes/rasterAttributes/numberOfSamplesPerLine") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _nbCol = (foundNode->getText()).toDouble() ; - // mean pixel spacing - xpathTest = new ossimString("/product/imageAttributes/rasterAttributes/sampledPixelSpacing") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pixel_spacing_mean = (foundNode->getText()).toDouble() ; - - // update times - xpathTest = new ossimString("/product/imageGenerationParameters/slantRangeToGroundRange/zeroDopplerAzimuthTime") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for ( int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - _SrGr_update.push_back(foundNode->getText()) ; - } - - // reference points - xpathTest = new ossimString("/product/imageGenerationParameters/slantRangeToGroundRange/groundRangeOrigin") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for ( int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - _SrGr_R0.push_back(foundNode->getText().toDouble()) ; - } - // coefficients - xpathTest = new ossimString("/product/imageGenerationParameters/slantRangeToGroundRange/groundToSlantRangeCoefficients") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - std::string coefficients; - double coeff ; - int indexDeb, indexFin ; - for ( int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - coefficients = (foundNode->getText()) ; // list of coefficients ; separator : ' ' - std::vector<double> coefficientVector; - indexDeb = 0 ; - indexFin = 0 ; - while (indexFin != std::string::npos) { - indexFin = coefficients.find(' ', indexDeb) ; - coeff = ossimString(coefficients.substr(indexDeb,indexFin-indexDeb)).toDouble() ; - coefficientVector.push_back(coeff) ; - indexDeb = indexFin+1 ; - } - _SrGr_coeffs.push_back(coefficientVector) ; - } - - _ndata=0 ; // Number of state vector data points - - // Data point position/velocity - xpathTest = new ossimString("/product/sourceAttributes/orbitAndAttitude/orbitInformation/stateVector") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - - ossimString *xpathTime = new ossimString("timeStamp") ; - ossimString *xpathPosX = new ossimString("xPosition") ; - ossimString *xpathPosY = new ossimString("yPosition") ; - ossimString *xpathPosZ = new ossimString("zPosition") ; - ossimString *xpathVelX = new ossimString("xVelocity") ; - ossimString *xpathVelY = new ossimString("yVelocity") ; - ossimString *xpathVelZ = new ossimString("zVelocity") ; - _eph_date.clear(); - _posX.clear(); - _posY.clear(); - _posZ.clear(); - _velX.clear(); - _velY.clear(); - _velZ.clear(); - - for (int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - - _ndata++; - secondSearchResult.clear(); - foundSubNode =foundNode->findFirstNode(*xpathTime); - if (foundSubNode==0) return false; - _eph_date.push_back(foundSubNode->getText()); - - foundSubNode =foundNode->findFirstNode(*xpathPosX); - if (foundSubNode==0) return false; - _posX.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathPosY); - if (foundSubNode==0) return false; - _posY.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathPosZ); - if (foundSubNode==0) return false; - _posZ.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelX); - if (foundSubNode==0) return false; - _velX.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelY); - if (foundSubNode==0) return false; - _velY.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelZ); - if (foundSubNode==0) return false; - _velZ.push_back((foundSubNode->getText()).toDouble()); - } - - // Tie points longitudes - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/geolocationGrid/imageTiePoint/geodeticCoordinate/longitude") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for (int i=0 ; i<searchResult.size() ; i++ ) { - foundNode = searchResult.at(i) ; - _cornersLon.push_back( (foundNode->getText()).toDouble() ) ; - } - - // Tie points latitudes - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/geolocationGrid/imageTiePoint/geodeticCoordinate/latitude") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for (int i=0 ; i<searchResult.size() ; i++ ) { - foundNode = searchResult.at(i) ; - _cornersLat.push_back( (foundNode->getText()).toDouble() ) ; - } - - // Tie points heights - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/geolocationGrid/imageTiePoint/geodeticCoordinate/height") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for (int i=0 ; i<searchResult.size() ; i++ ) { - foundNode = searchResult.at(i) ; - _cornersHeight.push_back( (foundNode->getText()).toDouble() ) ; - } - - // Tie points columns - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/geolocationGrid/imageTiePoint/imageCoordinate/pixel") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for (int i=0 ; i<searchResult.size() ; i++ ) { - foundNode = searchResult.at(i) ; - _cornersCol.push_back( (foundNode->getText()).toDouble() ) ; - } - - // Tie points lines - xpathTest = new ossimString("/product/imageAttributes/geographicInformation/geolocationGrid/imageTiePoint/imageCoordinate/line") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - for (int i=0 ; i<searchResult.size() ; i++ ) { - foundNode = searchResult.at(i) ; - _cornersLin.push_back( (foundNode->getText()).toDouble() ) ; - } - - return true ; -} - diff --git a/Utilities/otbossim/src/ossim/imaging/TerraSar/TsxAnnotation.cpp b/Utilities/otbossim/src/ossim/imaging/TerraSar/TsxAnnotation.cpp deleted file mode 100644 index f1f98f92f2..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/TerraSar/TsxAnnotation.cpp +++ /dev/null @@ -1,418 +0,0 @@ -#include <ossim/imaging/TerraSar/TsxAnnotation.h> -#include <ossim/base/ossimString.h> -#include <ossim/base/ossimXmlDocument.h> -#include <ossim/base/ossimXmlNode.h> -#include <ossim/base/ossimRefPtr.h> -#include <iostream> - -TsxAnnotation::TsxAnnotation() -{ -} - -TsxAnnotation::~TsxAnnotation() -{ -} - -bool TsxAnnotation::Parse(ossimXmlDocument docXML) { - - std::vector< ossimRefPtr<ossimXmlNode> > searchResult, secondSearchResult ; - ossimRefPtr<ossimXmlNode> foundNode; - ossimRefPtr<ossimXmlNode> foundSubNode ; - ossimString * xpathTest ; - - // Pixel order - xpathTest = new ossimString("/level1Product/productSpecific/complexImageInfo/imageDataStartWith") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _imageDataStartWith = foundNode->getText() ; - - // Orbit direction : Ascending/descending - xpathTest = new ossimString("/level1Product/productInfo/missionInfo/orbitDirection") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _orbitDirection = foundNode->getText() ; - - // Look Direction - xpathTest = new ossimString("/level1Product/productInfo/acquisitionInfo/lookDirection") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _lookDirection = foundNode->getText() ; - - // Input scene centre time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/azimuthTimeUTC") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _inp_sctim = foundNode->getText() ; - // TSX date format is UTC (xs:dateTime) : yyyy-mm-ddThh:mm:ss(.s+)zzzz (where zzzz is the timeZone). - - // Processed scene centre latitude - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/lat") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pro_lat = ( foundNode->getText() ).toDouble() ; - - // Processed scene centre longitude - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/lon") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pro_long = ( foundNode->getText() ).toDouble() ; - - // Processed scene centre heading - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/headingAngle") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pro_head = ( foundNode->getText() ).toDouble() ; - - // Ellipsoid semi-major axis, km - _ellip_maj=6378.137; - // this parameter can be retrieved more precisely from the external file GEOREFERENCE.XML - - // Ellipsoid semi_minor axis, km - _ellip_min=6356.752315; - // this parameter can be retrieved more precisely from the external file GEOREFERENCE.XML - - // Scene centre line number - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/refRow") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _sc_lin = ( foundNode->getText() ).toInt() ; - _sc_lin = _sc_lin - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - - // Scene centre pixel number - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/refColumn") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _sc_pix = ( foundNode->getText() ).toInt() ; - _sc_pix = _sc_pix - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - - // Radar center frequency - xpathTest = new ossimString("/level1Product/instrument/radarParameters/centerFrequency") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _central_freq = ( foundNode->getText() ).toDouble() ; - - // Range sampling rate - xpathTest = new ossimString("/level1Product/productSpecific/complexImageInfo/commonRSF") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _fr = ( foundNode->getText() ).toDouble() ; - - // Range gate start time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/rangeTime/firstPixel") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _rng_gate = ( foundNode->getText() ).toDouble() ; - - // Range gate end time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/rangeTime/lastPixel") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _rng_gate_end = ( foundNode->getText() ).toDouble() ; - - // Azimuth start time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/start/timeUTC") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _azimuthStartTime = ( foundNode->getText() ) ; - - // Azimuth stop time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/stop/timeUTC") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _azimuthStopTime = ( foundNode->getText() ) ; - - // Scene center range time - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/rangeTime") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _sceneCenterRangeTime = ( foundNode->getText() ).toDouble() ; - - // Nominal PRF, Hz - xpathTest = new ossimString("/level1Product/productSpecific/complexImageInfo/commonPRF") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _fa = ( foundNode->getText() ).toDouble() ; - - // Number of azimuth looks - xpathTest = new ossimString("/level1Product/processing/processingParameter/azimuthLooks") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _n_azilok = ( foundNode->getText() ).toDouble() ; - - // Number of range looks - xpathTest = new ossimString("/level1Product/processing/processingParameter/rangeLooks") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _n_rnglok = ( foundNode->getText() ).toDouble() ; - - // Average terrain height, m - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneAverageHeight") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _terrain_h = ( foundNode->getText() ).toDouble() ; - - // Type of range data (GROUNDRANGE, SLANTRANGE, MAP, UNDEFINED) - xpathTest = new ossimString("/level1Product/productInfo/productVariantInfo/projection") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _rangeProjectionType = foundNode->getText() ; - - // number of lines - xpathTest = new ossimString("/level1Product/productInfo/imageDataInfo/imageRaster/numberOfRows") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _nbLin = (foundNode->getText()).toDouble() ; - - // Slant Range TO Ground Range Projection - // number of columns - xpathTest = new ossimString("/level1Product/productInfo/imageDataInfo/imageRaster/numberOfColumns") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _nbCol = (foundNode->getText()).toDouble() ; - // mean pixel spacing - xpathTest = new ossimString("/level1Product/productInfo/imageDataInfo/imageRaster/groundRangeResolution") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pixel_spacing_mean = (foundNode->getText()).toDouble() ; - // pixel spacing at near range - xpathTest = new ossimString("/level1Product/productSpecific/complexImageInfo/projectedSpacingRange/groundNear") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pixel_spacing_near = (foundNode->getText()).toDouble() ; - // pixel spacing at far range - xpathTest = new ossimString("/level1Product/productSpecific/complexImageInfo/projectedSpacingRange/groundFar") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _pixel_spacing_far = (foundNode->getText()).toDouble() ; - // reference point - xpathTest = new ossimString("/level1Product/productSpecific/projectedImageInfo/slantToGroundRangeProjection/referencePoint") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() == 1 ) { - foundNode = searchResult.at(0) ; - _SrToGr_R0 = (foundNode->getText()).toDouble() ; - } - // coefficients - xpathTest = new ossimString("/level1Product/productSpecific/projectedImageInfo/slantToGroundRangeProjection/coefficient") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - ossimString *xpathExponent = new ossimString("exponent") ; - ossimString exponent_str ; - double coefficient; - int exponent ; - for ( int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - foundNode->getAttributeValue(exponent_str, *xpathExponent); - exponent = exponent_str.toInt() ; - coefficient = (foundNode->getText()).toDouble() ; - _SrToGr_coeffs.push_back(coefficient) ; - _SrToGr_exps.push_back(exponent) ; - } - - _ndata=0 ; // Number of state vector data points - - // Data point position/velocity - xpathTest = new ossimString("/level1Product/platform/orbit/stateVec") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - - ossimString qualind ; // TSX ephemerisis quality indicator (1:good, 0: wrong) - - ossimString *xpathQualind = new ossimString("qualInd") ; - ossimString *xpathTime = new ossimString("timeUTC") ; - ossimString *xpathPosX = new ossimString("posX") ; - ossimString *xpathPosY = new ossimString("posY") ; - ossimString *xpathPosZ = new ossimString("posZ") ; - ossimString *xpathVelX = new ossimString("velX") ; - ossimString *xpathVelY = new ossimString("velY") ; - ossimString *xpathVelZ = new ossimString("velZ") ; - _eph_date.clear(); - _posX.clear(); - _posY.clear(); - _posZ.clear(); - _velX.clear(); - _velY.clear(); - _velZ.clear(); - - for (int i=0 ; i<searchResult.size() ; i++) { - foundNode = searchResult.at(i) ; - foundNode->getAttributeValue(qualind, *xpathQualind); - - if (qualind=="1") { - _ndata++; - secondSearchResult.clear(); - foundSubNode =foundNode->findFirstNode(*xpathTime); - if (foundSubNode==0) return false; - _eph_date.push_back(foundSubNode->getText()); - - foundSubNode =foundNode->findFirstNode(*xpathPosX); - if (foundSubNode==0) return false; - _posX.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathPosY); - if (foundSubNode==0) return false; - _posY.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathPosZ); - if (foundSubNode==0) return false; - _posZ.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelX); - if (foundSubNode==0) return false; - _velX.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelY); - if (foundSubNode==0) return false; - _velY.push_back((foundSubNode->getText()).toDouble()); - - foundSubNode =foundNode->findFirstNode(*xpathVelZ); - if (foundSubNode==0) return false; - _velZ.push_back((foundSubNode->getText()).toDouble()); - } - } - - // Scene corners + scene center longitudes - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/lon") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLon[0] = ( foundNode->getText() ).toDouble() ; - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCornerCoord/lon") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 4 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLon[1] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(1) ; - _cornersLon[2] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(2) ; - _cornersLon[3] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(3) ; - _cornersLon[4] = ( foundNode->getText() ).toDouble() ; - - // Scene corners + scene center latitudes - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/lat") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLat[0] = ( foundNode->getText() ).toDouble() ; - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCornerCoord/lat") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 4 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLat[1] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(1) ; - _cornersLat[2] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(2) ; - _cornersLat[3] = ( foundNode->getText() ).toDouble() ; - foundNode = searchResult.at(3) ; - _cornersLat[4] = ( foundNode->getText() ).toDouble() ; - - // Scene corners + scene center columns - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/refColumn") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _cornersCol[0] = ( foundNode->getText() ).toInt() ; - _cornersCol[0] = _cornersCol[0] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCornerCoord/refColumn") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 4 ) return false ; - foundNode = searchResult.at(0) ; - _cornersCol[1] = ( foundNode->getText() ).toInt() ; - _cornersCol[1] = _cornersCol[1] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(1) ; - _cornersCol[2] = ( foundNode->getText() ).toInt() ; - _cornersCol[2] = _cornersCol[2] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(2) ; - _cornersCol[3] = ( foundNode->getText() ).toInt() ; - _cornersCol[3] = _cornersCol[3] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(3) ; - _cornersCol[4] = ( foundNode->getText() ).toInt() ; - _cornersCol[4] = _cornersCol[4] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - - // Scene corners + scene center lines - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCenterCoord/refRow") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 1 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLin[0] = ( foundNode->getText() ).toInt() ; - _cornersLin[0] = _cornersLin[0] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - xpathTest = new ossimString("/level1Product/productInfo/sceneInfo/sceneCornerCoord/refRow") ; - searchResult.clear(); - docXML.findNodes(*xpathTest, searchResult) ; - if (searchResult.size() != 4 ) return false ; - foundNode = searchResult.at(0) ; - _cornersLin[1] = ( foundNode->getText() ).toInt() ; - _cornersLin[1] = _cornersLin[1] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(1) ; - _cornersLin[2] = ( foundNode->getText() ).toInt() ; - _cornersLin[2] = _cornersLin[2] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(2) ; - _cornersLin[3] = ( foundNode->getText() ).toInt() ; - _cornersLin[3] = _cornersLin[3] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - foundNode = searchResult.at(3) ; - _cornersLin[4] = ( foundNode->getText() ).toInt() ; - _cornersLin[4] = _cornersLin[4] - 1 ; //TSX image coordinates start at (1,1), while OSSIM image coordinates start at (0,0) - - return true ; -} - diff --git a/Utilities/otbossim/src/ossim/imaging/ossimErsSarTileSource.cpp b/Utilities/otbossim/src/ossim/imaging/ossimErsSarTileSource.cpp deleted file mode 100644 index ed2a9ec852..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ossimErsSarTileSource.cpp +++ /dev/null @@ -1,347 +0,0 @@ -#include <ossim/base/ossimTrace.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimDpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimKeywordlist.h> -#include <ossim/base/ossimEllipsoid.h> -#include <ossim/base/ossimDatum.h> -#include <ossim/base/ossimBooleanProperty.h> -#include <ossim/imaging/ossimImageDataFactory.h> -#include <ossim/imaging/ossimErsSarTileSource.h> -#include <ossim/projection/ossimEquDistCylProjection.h> -#include <ossim/projection/ossimAlbersProjection.h> -#include <ossim/projection/ossimCylEquAreaProjection.h> -#include <ossim/projection/ossimEquDistCylProjection.h> -#include <ossim/projection/ossimVanDerGrintenProjection.h> -#include <ossim/projection/ossimLambertConformalConicProjection.h> -#include <ossim/projection/ossimMercatorProjection.h> -#include <ossim/projection/ossimMillerProjection.h> -#include <ossim/projection/ossimOrthoGraphicProjection.h> -#include <ossim/projection/ossimPolyconicProjection.h> -#include <ossim/projection/ossimSinusoidalProjection.h> -#include <ossim/projection/ossimTransMercatorProjection.h> -#include <ossim/projection/ossimCassiniProjection.h> -#include <ossim/projection/ossimUtmProjection.h> -#include <ossim/base/ossimConstants.h> -#include <ossim/base/ossimCommon.h> -#include <ossim/base/ossimKeywordNames.h> -#include <ossim/base/ossimTrace.h> -#include <ossim/base/ossimKeywordlist.h> -#include <ossim/base/ossimEllipsoid.h> -#include <ossim/base/ossimDatum.h> - -#include <ossim/imaging/ErsSar/ErsSarRecordHeader.h> - -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarDataFactory.h> -#include <ossim/imaging/ErsSar/ErsSarData/ErsSarImageOptionsFileDescriptor.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarPlatformPositionData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarDataSetSummary.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFileDescriptor.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarMapProjectionData.h> -#include <ossim/imaging/ErsSar/ErsSarLeader/ErsSarFacilityData.h> - -#include <iostream> -#include <fstream> -#include <ios> - - -RTTI_DEF1(ossimErsSarTileSource, "ossimErsSarTileSource", ossimImageHandler) - -static ossimTrace traceDebug("ossimErsSarTileSource:debug"); - -ossimErsSarTileSource::ossimErsSarTileSource(): - _ErsSardata(NULL), - _ErsSarleader(NULL) -{ -} - -ossimErsSarTileSource::~ossimErsSarTileSource() -{ - if (_ErsSardata != NULL) - { - delete _ErsSardata; - } - if(_ErsSarleader != NULL) - { - delete _ErsSarleader; - } -} - -ossimString ossimErsSarTileSource::getLongName()const -{ - return ossimString("ErsSar Image Handler"); -} - -ossimString ossimErsSarTileSource::getShortName()const -{ - return ossimString("ErsSar Image Handler"); -} - -bool ossimErsSarTileSource::saveState(ossimKeywordlist& kwl, const char* prefix)const -{ - return false; -} - -bool ossimErsSarTileSource::loadState(const ossimKeywordlist& kwl, const char* prefix) -{ - return false; -} - -bool ossimErsSarTileSource::open() -{ - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimErsSarTileSource::open(filename) DEBUG: entered..." - << std::endl - << "Attempting to open file " << theImageFile << std::endl; - } - - bool retValue = true; - ossimFilename tempFilename = theImageFile; - - /* - * Creation of the class allowing to store Data file metadata - */ - if (_ErsSardata != NULL) - { - delete _ErsSardata; - _ErsSardata = NULL; - } - _ErsSardata = new ErsSarData(); - - /* - * Creation of the class allowing to store Leader file metadata - */ - if(_ErsSarleader != NULL) - { - delete _ErsSarleader; - _ErsSarleader = NULL; - } - - _ErsSarleader = new ErsSarLeader(); - - ErsSarRecordHeader header; - ErsSarDataFactory factory; - ifstream dataFile (tempFilename, ios::in|ios::binary); - dataFile>>header; - if(dataFile.eof()) - { - dataFile.close(); - retValue = false; - } - else - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "Begin reading DAT file" << std::endl; - } - ErsSarRecord* record = factory.Instanciate(header.get_rec_seq()); - if (record != NULL && header.get_rec_seq() == 1) - { - record->Read(dataFile); - /* - * ErsSar DAT file verificationTest whether - */ - std::string capteur = (((ErsSarImageOptionsFileDescriptor*)record)->get_file_name()).substr(0,3); - if ( capteur == "ERS") - { - /* - * We are in a ErsSar Data file tree, we read the remaining of the Data file - */ - - dataFile>>*_ErsSardata; - _ErsSardata->InsertRecord(header.get_rec_seq(), record); - dataFile.close(); - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "End reading DAT file" << std::endl; - } - /* - * Leader file path contruction from the DAT file path - */ - std::string leader_file = theImageFile; - string::size_type loc = leader_file.find( "DAT_01", 0 ); - if( loc != string::npos ) leader_file.replace(loc, 6, "LEA_01" ); // upper case test - else { - loc = leader_file.find( "dat_01", 0 ); - if( loc != string::npos ) leader_file.replace(loc, 6, "lea_01" ); // lower case test - else { - ossimNotify(ossimNotifyLevel_DEBUG) - << "File Name not coherent (searching for *DAT_01* or *dat_01*) : " << theImageFile << std::endl; - } - } - ossimFilename leaderFilePath(leader_file); - - if (!leaderFilePath.exists()){ - ossimNotify(ossimNotifyLevel_DEBUG) - << "Leader file not found (searching for *lea_01* coherent with *dat_01*) : " << theImageFile << std::endl; - retValue = false; - } - else { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "Begin reading Leader file" << std::endl; - } - /* - * Leader file data reading - */ - ifstream leaderFile (leaderFilePath, ios::in|ios::binary); - leaderFile>>*_ErsSarleader; - leaderFile.close(); - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "End reading Leader file" << std::endl; - } - } - } - else - { - dataFile.close(); - retValue = false; - } - } - else - { - dataFile.close(); - retValue = false; - } - } - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimErsSarTileSource::open() DEBUG: returning..." << std::endl; - } - return retValue; -} - -void ossimErsSarTileSource::close() -{ -} - -bool ossimErsSarTileSource::isOpen()const -{ - return false; -} - -bool ossimErsSarTileSource::getImageGeometry(ossimKeywordlist& kwl,const char* prefix) -{ - char name[64]; - - kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimErsSarModel", true); - /* - * Adding metadata necessary to the sensor model in the keywordlist - */ - ErsSarFileDescriptor * leaderfiledesc = _ErsSarleader->get_ErsSarFileDescriptor(); - if(leaderfiledesc != NULL) - { - kwl.add(prefix, "filename",leaderfiledesc->get_file_name().c_str(),true); - } - else - { - return false; - } - /* - * Adding metadata necessary to the sensor model in the keywordlist - */ - ErsSarDataSetSummary * datasetSummary = _ErsSarleader->get_ErsSarDataSetSummary(); - if(datasetSummary != NULL) - { - kwl.add(prefix, "inp_sctim",(datasetSummary->get_inp_sctim()).c_str(),true); - kwl.add(prefix, "ellip_maj", datasetSummary->get_ellip_maj(),true); - kwl.add(prefix, "ellip_min", datasetSummary->get_ellip_min(),true); - kwl.add(prefix, "sc_lin", datasetSummary->get_sc_lin(),true); - kwl.add(prefix, "sc_pix", datasetSummary->get_sc_pix(),true); - kwl.add(prefix, "wave_length", datasetSummary->get_wave_length(),true); - kwl.add(prefix, "fr", datasetSummary->get_fr(),true); - kwl.add(prefix, "fa", datasetSummary->get_fa(),true); - kwl.add(prefix, "time_dir_pix", (datasetSummary->get_time_dir_pix()).c_str(),true); - kwl.add(prefix, "time_dir_lin", (datasetSummary->get_time_dir_lin()).c_str(),true); - kwl.add(prefix, "line_spacing", datasetSummary->get_line_spacing(),true); - kwl.add(prefix, "pix_spacing", datasetSummary->get_pix_spacing(),true); - kwl.add(prefix, "nlooks_az", datasetSummary->get_n_azilok(),true); - kwl.add(prefix, "n_rnglok", datasetSummary->get_n_rnglok(),true); - kwl.add(prefix, "zero_dop_range_time_f_pixel", datasetSummary->get_zero_dop_range_time_f_pixel(),true); - kwl.add(prefix, "zero_dop_range_time_c_pixel", datasetSummary->get_zero_dop_range_time_c_pixel(),true); - kwl.add(prefix, "zero_dop_range_time_l_pixel", datasetSummary->get_zero_dop_range_time_l_pixel(),true); - } - else - { - return false; - } - ErsSarMapProjectionData * mapprojectiondata = _ErsSarleader->get_ErsSarMapProjectionData(); - if(mapprojectiondata != NULL) - { - kwl.add(prefix, "map_proj_des",(mapprojectiondata->get_map_proj_des()).c_str(),true); - kwl.add(prefix, "num_lines",(double) mapprojectiondata->get_num_lines(),true); - kwl.add(prefix, "num_pix",(double) mapprojectiondata->get_num_pix_in_line(),true); - kwl.add(prefix, "first_line_first_pixel_lat",mapprojectiondata->get_first_line_first_pixel_lat(), true); - kwl.add(prefix, "first_line_first_pixel_lon",mapprojectiondata->get_first_line_first_pixel_lon(), true); - kwl.add(prefix, "first_line_last_pixel_lat",mapprojectiondata->get_first_line_last_pixel_lat(), true); - kwl.add(prefix, "first_line_last_pixel_lon",mapprojectiondata->get_first_line_last_pixel_lon(), true); - kwl.add(prefix, "last_line_first_pixel_lat",mapprojectiondata->get_last_line_first_pixel_lat(), true); - kwl.add(prefix, "last_line_first_pixel_lon",mapprojectiondata->get_last_line_first_pixel_lon(), true); - kwl.add(prefix, "last_line_last_pixel_lat",mapprojectiondata->get_last_line_last_pixel_lat(), true); - kwl.add(prefix, "last_line_last_pixel_lon",mapprojectiondata->get_last_line_last_pixel_lon(), true); - } - else - { - return false; - } - ErsSarPlatformPositionData * platformposition = _ErsSarleader->get_ErsSarPlatformPositionData(); - if(mapprojectiondata != NULL) - { - kwl.add(prefix, "neph", platformposition->get_ndata(),true); - kwl.add(prefix, "eph_year", platformposition->get_year(),true); - kwl.add(prefix, "eph_month", platformposition->get_month(),true); - kwl.add(prefix, "eph_day", platformposition->get_day(),true); - kwl.add(prefix, "eph_gmt_day", platformposition->get_gmt_day(),true); - kwl.add(prefix, "eph_sec", platformposition->get_gmt_sec(),true); - kwl.add(prefix, "eph_hr_angle", platformposition->get_hr_angle(),true); - kwl.add(prefix, "eph_int", platformposition->get_data_int(),true); - - for(int i=0;i<platformposition->get_ndata();i++) - { - sprintf(name,"eph%i_posX",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_pos()[0],true); - sprintf(name,"eph%i_posY",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_pos()[1],true); - sprintf(name,"eph%i_posZ",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_pos()[2],true); - - sprintf(name,"eph%i_velX",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_vel()[0],true); - sprintf(name,"eph%i_velY",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_vel()[1],true); - sprintf(name,"eph%i_velZ",i); - kwl.add(prefix, name,(platformposition->get_pos_vect()[i]).get_vel()[2],true); - } - } - else - { - return false; - } - /* - * Adding metadata necessary to the sensor model in the keywordlist - */ - ErsSarFacilityData * facilitydata = _ErsSarleader->get_ErsSarFacilityData(); - if(facilitydata != NULL) - { - kwl.add(prefix, "coef_ground_range_1",facilitydata->get_coef_ground_range_1(),true); - kwl.add(prefix, "coef_ground_range_2",facilitydata->get_coef_ground_range_2(),true); - kwl.add(prefix, "coef_ground_range_3",facilitydata->get_coef_ground_range_3(),true); - kwl.add(prefix, "coef_ground_range_4",facilitydata->get_coef_ground_range_4(),true); - } - else - { - return false; - } - return true; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ossimImageHandlerSarFactory.cpp b/Utilities/otbossim/src/ossim/imaging/ossimImageHandlerSarFactory.cpp deleted file mode 100644 index a44f8c9ebe..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ossimImageHandlerSarFactory.cpp +++ /dev/null @@ -1,345 +0,0 @@ -//---------------------------------------------------------------------------- -// -// License: LGPL -// -// See LICENSE.txt file in the top level directory for more details. -// -//---------------------------------------------------------------------------- -// $Id: ossimImageHandlerFactory.cpp 10104 2006-12-14 16:13:05Z gpotts $ -#include <ossim/imaging/ossimImageHandlerSarFactory.h> -#include <ossim/base/ossimTrace.h> -#include <ossim/base/ossimKeywordNames.h> -#include <ossim/base/ossimKeywordlist.h> -#include <ossim/imaging/ossimImageHandler.h> -//#include <ossim/imaging/ossimRadarSatTileSource.h> -// #include <ossim/imaging/ossimRadarSat2TileSource.h> -// #include <ossim/imaging/ossimTerraSarTileSource.h> -//#include <ossim/imaging/ossimCosmoSkymedTileSource.h> -//#include <ossim/imaging/ossimEnvisatAsarTileSource.h> -// #include <ossim/imaging/ossimErsSarTileSource.h> - - - -static const ossimTrace traceDebug("ossimImageHandlerSarFactory:debug"); - -RTTI_DEF1(ossimImageHandlerSarFactory, "ossimImageHandlerSarFactory", ossimImageHandlerFactoryBase); - -ossimImageHandlerSarFactory* ossimImageHandlerSarFactory::theInstance = 0; - -ossimImageHandlerSarFactory::~ossimImageHandlerSarFactory() -{ - theInstance = (ossimImageHandlerSarFactory*)NULL; -} - -ossimImageHandlerSarFactory* ossimImageHandlerSarFactory::instance() -{ - if(!theInstance) - { - theInstance = new ossimImageHandlerSarFactory; - } - - return theInstance; -} - -ossimImageHandler* ossimImageHandlerSarFactory::open(const ossimFilename& fileName)const -{ - - ossimFilename copyFilename = fileName; - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimImageHandlerSarFactory::open(filename) DEBUG: entered..." - << std::endl - << "Attempting to open file " << copyFilename << std::endl; - } - ossimImageHandler* result = NULL; - - // Check for empty file. - copyFilename.trim(); - if (copyFilename.empty()) - { - return result; - } - - // Radarsat -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying RadarSat" -// << std::endl; -// } -// result = new ossimRadarSatTileSource; -// if(result->open(copyFilename)) -// { -// return result; -// } -// delete result; - - // TerraSar -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying TerraSar" -// << std::endl; -// } -// result = new ossimTerraSarTileSource; -// if(result->open(copyFilename)) -// { -// return result; -// } -// delete result; - - // Envisat ASAR -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying EnvisatAsar" -// << std::endl; -// } -// result = new ossimEnvisatAsarTileSource; -// if(result->open(copyFilename)) -// { -// return result; -// } -// delete result; - - // Radarsat 2 -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying RadarSat2" -// << std::endl; -// } -// result = new ossimRadarSat2TileSource; -// if(result->open(copyFilename)) -// { -// return result; -// } -// delete result; - - // ERS -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying Ers Sar" -// << std::endl; -// } -// result = new ossimErsSarTileSource; -// if(result->open(copyFilename)) -// { -// return result; -// } -// delete result; - - //// Cosmo Skymed - //if(traceDebug()) - //{ - // ossimNotify(ossimNotifyLevel_DEBUG) - // << "trying CosmoSkymed" - // << std::endl; - //} - //result = new ossimCosmoSkymedTileSource; - //if(result->open(copyFilename)) - //{ - // return result; - //} - //delete result; - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimImageHandlerFactory::open(filename) DEBUG: returning..." << std::endl; - } - return (ossimImageHandler*)NULL; -} - -ossimImageHandler* ossimImageHandlerSarFactory::open(const ossimKeywordlist& kwl, - const char* prefix)const -{ - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimImageHandlerSarFactory::open(kwl, prefix) DEBUG: entered..." - << std::endl; - } - ossimImageHandler* result = NULL; - -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying RadarSat" -// << std::endl; -// } -// result = new ossimRadarSatTileSource(); -// if(result->loadState(kwl, prefix)) -// { -// return result; -// } -// delete result; - -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying TerraSar" -// << std::endl; -// } -// result = new ossimTerraSarTileSource(); -// if(result->loadState(kwl, prefix)) -// { -// return result; -// } -// delete result; - -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying RadarSat2" -// << std::endl; -// } -// result = new ossimRadarSat2TileSource(); -// if(result->loadState(kwl, prefix)) -// { -// return result; -// } -// delete result; - -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying EnvisatAsar" -// << std::endl; -// } -// result = new ossimEnvisatAsarTileSource(); -// if(result->loadState(kwl, prefix)) -// { -// return result; -// } -// delete result; - -// if(traceDebug()) -// { -// ossimNotify(ossimNotifyLevel_DEBUG) -// << "trying Ers Sar" -// << std::endl; -// } -// result = new ossimErsSarTileSource(); -// if(result->loadState(kwl, prefix)) -// { -// return result; -// } -// delete result; - - /*if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "trying CosmoSkymed" - << std::endl; - } - result = new ossimCosmoSkymedTileSource(); - if(result->loadState(kwl, prefix)) - { - return result; - } - delete result;*/ - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimImageHandlerFactory::open(kwl, prefix) DEBUG: returning..." - << std::endl; - } - return (ossimImageHandler*)NULL; -} - -ossimObject* ossimImageHandlerSarFactory::createObject(const ossimString& typeName)const -{ -// if(STATIC_TYPE_NAME(ossimRadarSatTileSource) == typeName) -// { -// return new ossimRadarSatTileSource(); -// } -// if(STATIC_TYPE_NAME(ossimTerraSarTileSource) == typeName) -// { -// return new ossimTerraSarTileSource(); -// } -// if(STATIC_TYPE_NAME(ossimEnvisatAsarTileSource) == typeName) -// { -// return new ossimEnvisatAsarTileSource(); -// } - /*if(STATIC_TYPE_NAME(ossimCosmoSkymedTileSource) == typeName) - { - return new ossimCosmoSkymedTileSource(); - }*/ -// if(STATIC_TYPE_NAME(ossimErsSarTileSource) == typeName) -// { -// return new ossimErsSarTileSource(); -// } -// if(STATIC_TYPE_NAME(ossimRadarSat2TileSource) == typeName) -// { -// return new ossimRadarSat2TileSource(); -// } - return (ossimObject*)NULL; -} - -void ossimImageHandlerSarFactory::getSupportedExtensions(ossimImageHandlerFactoryBase::UniqueStringList& extensionList)const -{ -// extensionList.push_back("001"); // RadarSat, ERS -// extensionList.push_back("xml"); // TerraSar, RadarSat2 - //extensionList.push_back("h5"); // CosmoSkymed -// extensionList.push_back("n1"); // EnvisatAsar -} - -ossimObject* ossimImageHandlerSarFactory::createObject(const ossimKeywordlist& kwl, - const char* prefix)const -{ - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimImageHandlerSarFactory::createObject(kwl, prefix) DEBUG:" - << " entering ..." << std::endl; - } - ossimObject* result = (ossimObject*)NULL; - const char* type = kwl.find(prefix, ossimKeywordNames::TYPE_KW); - - if(type) - { - if (ossimString(type).trim() == STATIC_TYPE_NAME(ossimImageHandler)) - { - const char* lookup = kwl.find(prefix, ossimKeywordNames::FILENAME_KW); - - if (lookup) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) << "BEBUG: filename " << lookup << std::endl; - } - // Call the open that takes a filename... - result = this->open(kwl, prefix);//ossimFilename(lookup)); - } - } - else - { - result = createObject(ossimString(type)); - if(result) - { - result->loadState(kwl, prefix); - } - } - } - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) << "ossimImageHandlerSarFactory::createObject(kwl, prefix) DEBUG: returning result ..." << std::endl; - } - return result; -} - -void ossimImageHandlerSarFactory::getTypeNameList(std::vector<ossimString>& typeList)const -{ -// typeList.push_back(STATIC_TYPE_NAME(ossimRadarSatTileSource)); -// typeList.push_back(STATIC_TYPE_NAME(ossimTerraSarTileSource)); -// typeList.push_back(STATIC_TYPE_NAME(ossimEnvisatAsarTileSource)); - //typeList.push_back(STATIC_TYPE_NAME(ossimCosmoSkymedTileSource)); -// typeList.push_back(STATIC_TYPE_NAME(ossimErsSarTileSource)); -// typeList.push_back(STATIC_TYPE_NAME(ossimRadarSat2TileSource)); -} diff --git a/Utilities/otbossim/src/ossim/imaging/ossimRadarSat2TileSource.cpp b/Utilities/otbossim/src/ossim/imaging/ossimRadarSat2TileSource.cpp deleted file mode 100644 index 5f8bc96d67..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ossimRadarSat2TileSource.cpp +++ /dev/null @@ -1,260 +0,0 @@ -#include <ossim/imaging/ossimRadarSat2TileSource.h> - -#include <ossim/base/ossimTrace.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimDpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimDirectory.h> -#include <ossim/base/ossimKeywordlist.h> -#include <ossim/base/ossimKeywordNames.h> -#include <ossim/base/ossimEllipsoid.h> -#include <ossim/base/ossimDatum.h> -#include <ossim/base/ossimBooleanProperty.h> -#include <ossim/imaging/ossimImageDataFactory.h> - -#include <ossim/base/ossimXmlDocument.h> -#include <ossim/base/ossimXmlNode.h> - -#include <iostream> -#include <fstream> -#include <ios> - - -RTTI_DEF1(ossimRadarSat2TileSource, "ossimRadarSat2TileSource", ossimImageHandler) - -static ossimTrace traceDebug("ossimRadarSat2TileSource:debug"); - -ossimRadarSat2TileSource::ossimRadarSat2TileSource(): - _annotation(NULL) -{ -} - -ossimRadarSat2TileSource::~ossimRadarSat2TileSource() -{ - if(_annotation != NULL) - { - delete _annotation; - } -} - -ossimString ossimRadarSat2TileSource::getLongName()const -{ - return ossimString("RadarSat2 Image Handler"); -} - -ossimString ossimRadarSat2TileSource::getShortName()const -{ - return ossimString("RadarSat2 Image Handler"); -} - -bool ossimRadarSat2TileSource::saveState(ossimKeywordlist& kwl, const char* prefix)const -{ - return false; -} - -bool ossimRadarSat2TileSource::loadState(const ossimKeywordlist& kwl, const char* prefix) -{ - return false; -} - -bool ossimRadarSat2TileSource::open() -{ - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimRadarSat2TileSource::open(filename) DEBUG: entered..." - << std::endl - << "Attempting to open file " << theImageFile << std::endl; - } - - bool retValue = true; - - /* - * Creation of the XML annotation file data storage class - */ - if(_annotation != NULL) - { - delete _annotation; - _annotation = NULL; - } - - _annotation = new Rds2Annotation(); - - /* - * Uses XML annotation file corresponding to the input "image file" - */ - ossimFilename annotationFilename = theImageFile; - if ((annotationFilename.ext()).downcase() != "xml") { - // assigned to a "product.xml" file in the same directory - annotationFilename = annotationFilename.path(); - annotationFilename += annotationFilename.thePathSeparator ; - annotationFilename += "product.xml" ; - } - - if (annotationFilename.exists()) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "Begin reading Annotation file" << std::endl; - } - - /* - * Checks whether the XML file corresponds to a RadarSat2 product - */ - ossimXmlDocument docXML(annotationFilename) ; - ossimString xpathTest("/product/sourceAttributes/satellite") ; - // note : the satellite name could be tested ("RADARSAT-1, RADARSAT-2) - std::vector<ossimRefPtr<ossimXmlNode> > listeResultat ; - docXML.findNodes(xpathTest, listeResultat) ; - if (listeResultat.size() != 1 ) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimRadarSat2TileSource::open() DEBUG: the file does not correspond to a RadarSat2 XML annotation file" << std::endl; - } - retValue = false; - } - else - { - /* - * Annotation file data reading - */ - if (! _annotation->Parse(docXML)) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "XML annotation file parsing error" << std::endl; - } - retValue = false; - } - else - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "End reading Annotation file" << std::endl; - } - } - } - } - else - { - retValue = false; - } - - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimRadarSat2TileSource::open() DEBUG: returning..." << std::endl; - } - return retValue; -} - -void ossimRadarSat2TileSource::close() -{ -} - -bool ossimRadarSat2TileSource::isOpen()const -{ - return false; -} - -bool ossimRadarSat2TileSource::getImageGeometry(ossimKeywordlist& kwl,const char* prefix) -{ - kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimRadarSat2Model", true); - - /* - * Insertion of data related to the sensor model acquisition parameters into the keywordlist - */ - - kwl.add(prefix, "lineTimeOrdering",_annotation->get_lineTimeOrdering().c_str(),true); - kwl.add(prefix, "pixelTimeOrdering",_annotation->get_pixelTimeOrdering().c_str(),true); - kwl.add(prefix, "orbitDirection",_annotation->get_orbitDirection().c_str(),true); - kwl.add(prefix, "lookDirection",_annotation->get_lookDirection().c_str(),true); - - kwl.add(prefix, "ellip_maj",_annotation->get_ellip_maj(),true); - kwl.add(prefix, "ellip_min",_annotation->get_ellip_min(),true); - - kwl.add(prefix, "central_freq",_annotation->get_central_freq(),true); - - kwl.add(prefix, "fr",_annotation->get_fr(),true); - - kwl.add(prefix, "fa",_annotation->get_fa(),true); - - kwl.add(prefix, "n_azilok",_annotation->get_n_azilok(),true); - kwl.add(prefix, "n_rnglok",_annotation->get_n_rnglok(),true); - - kwl.add(prefix, "zeroDopplerTimeFirstLine",_annotation->get_zeroDopplerTimeFirstLine().c_str(),true); - kwl.add(prefix, "slantRangeNearEdge",_annotation->get_slantRangeNearEdge(),true); - - kwl.add(prefix, "productType",(_annotation->get_productType()).c_str(),true); - - kwl.add(prefix, "nbCol",_annotation->get_nbCol(),true); - kwl.add(prefix, "nbLin",_annotation->get_nbLin(),true); - kwl.add(prefix, "pixel_spacing_mean",_annotation->get_pixel_spacing_mean(),true); - - int nbCoeffs = (_annotation->get_SrGr_update()).size() ; - - kwl.add(prefix, "SrGr_coeffs_number",nbCoeffs,true); - - char name[64]; - for(int i=0;i<nbCoeffs;i++) - { - for(int j=0;j<((_annotation->get_SrGr_coeffs())[i]).size();j++) - { - sprintf(name,"SrGr_coeffs_%i_%i",i,j); - kwl.add(prefix, name,(_annotation->get_SrGr_coeffs())[i][j],true); - } - sprintf(name,"SrGr_R0_%i",i); - kwl.add(prefix,name,_annotation->get_SrGr_R0()[i],true); - sprintf(name,"SrGr_update_%i",i); - kwl.add(prefix,name,(_annotation->get_SrGr_update()[i]).c_str(),true); - } - - kwl.add(prefix, "neph",_annotation->get_ndata(),true); - - for(int i=0;i<_annotation->get_ndata();i++) - { - sprintf(name,"eph%i_date",i); - kwl.add(prefix, name,(_annotation->get_eph_date()[i]).c_str(),true); - - sprintf(name,"eph%i_posX",i); - kwl.add(prefix, name,(_annotation->get_posX()[i]),true); - sprintf(name,"eph%i_posY",i); - kwl.add(prefix, name,(_annotation->get_posY()[i]),true); - sprintf(name,"eph%i_posZ",i); - kwl.add(prefix, name,(_annotation->get_posZ()[i]),true); - - sprintf(name,"eph%i_velX",i); - kwl.add(prefix, name,(_annotation->get_velX()[i]),true); - sprintf(name,"eph%i_velY",i); - kwl.add(prefix, name,(_annotation->get_velY()[i]),true); - sprintf(name,"eph%i_velZ",i); - kwl.add(prefix, name,(_annotation->get_velZ()[i]),true); - } - - int cornersLonSize = (_annotation->get_cornersLon()).size() ; - kwl.add(prefix, "nTiePoints",cornersLonSize ,true); - - for(int i=0;i<_annotation->get_cornersLon().size();i++) - { - sprintf(name,"cornersLon%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLon())[i],true); - sprintf(name,"cornersLat%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLat())[i],true); - sprintf(name,"cornersHeight%i",i); - kwl.add(prefix, name,(_annotation->get_cornersHeight())[i],true); - sprintf(name,"cornersCol%i",i); - kwl.add(prefix, name,(_annotation->get_cornersCol())[i],true); - sprintf(name,"cornersLin%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLin())[i],true); - } - - kwl.add(prefix, "terrain_h",_annotation->get_terrain_h(),true); - - return true; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/imaging/ossimTerraSarTileSource.cpp b/Utilities/otbossim/src/ossim/imaging/ossimTerraSarTileSource.cpp deleted file mode 100644 index 5ff58f7b18..0000000000 --- a/Utilities/otbossim/src/ossim/imaging/ossimTerraSarTileSource.cpp +++ /dev/null @@ -1,301 +0,0 @@ -#include <ossim/imaging/ossimTerraSarTileSource.h> - -#include <ossim/base/ossimTrace.h> -#include <ossim/base/ossimIpt.h> -#include <ossim/base/ossimDpt.h> -#include <ossim/base/ossimFilename.h> -#include <ossim/base/ossimDirectory.h> -#include <ossim/base/ossimKeywordlist.h> -#include <ossim/base/ossimKeywordNames.h> -#include <ossim/base/ossimEllipsoid.h> -#include <ossim/base/ossimDatum.h> -#include <ossim/base/ossimBooleanProperty.h> -#include <ossim/imaging/ossimImageDataFactory.h> - -#include <ossim/base/ossimXmlDocument.h> -#include <ossim/base/ossimXmlNode.h> - -#include <iostream> -#include <fstream> -#include <ios> - - -RTTI_DEF1(ossimTerraSarTileSource, "ossimTerraSarTileSource", ossimImageHandler) - -static ossimTrace traceDebug("ossimTerraSarTileSource:debug"); - -ossimTerraSarTileSource::ossimTerraSarTileSource(): - _annotation(NULL) -{ -} - -ossimTerraSarTileSource::~ossimTerraSarTileSource() -{ - if(_annotation != NULL) - { - delete _annotation; - } -} - -ossimString ossimTerraSarTileSource::getLongName()const -{ - return ossimString("TerraSar Image Handler"); -} - -ossimString ossimTerraSarTileSource::getShortName()const -{ - return ossimString("TerraSar Image Handler"); -} - -bool ossimTerraSarTileSource::saveState(ossimKeywordlist& kwl, const char* prefix)const -{ - return false; -} - -bool ossimTerraSarTileSource::loadState(const ossimKeywordlist& kwl, const char* prefix) -{ - return false; -} - -bool ossimTerraSarTileSource::open() -{ - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open(filename) DEBUG: entered..." - << std::endl - << "Attempting to open file " << theImageFile << std::endl; - } - - bool retValue = true; - - /* - * Creation of the XML annotation file data storage class - */ - if(_annotation != NULL) - { - delete _annotation; - _annotation = NULL; - } - - _annotation = new TsxAnnotation(); - - /* - * Finds the XML annotation file corresponding to the input "image file" - */ - ossimFilename annotationFilename = theImageFile; - if ((annotationFilename.ext()).downcase() != "xml") { - // search for a XML file in the same directory, beginning by "TSX" - ossimDirectory currentDir(annotationFilename.path()); - std::vector<ossimFilename> searchRes ; - ossimString searchedPattern("^(TSX)+[^(xml)]*(xml)+") ; - currentDir.findAllFilesThatMatch(searchRes, searchedPattern) ; - if (searchRes.size() == 1) { - annotationFilename = searchRes[0] ; - } else if (searchRes.size() > 1) { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open() DEBUG: Several TSX XML files found in the current directory" << std::endl; - } - return false; - } else if (searchRes.size() == 0) { - // search for a XML file in the parent directory, beginning by "TSX" - ossimString parentDirPath = annotationFilename.path() ; - parentDirPath += annotationFilename.thePathSeparator ; - parentDirPath += ".." ; - ossimDirectory parentDir(parentDirPath); - parentDir.findAllFilesThatMatch(searchRes, searchedPattern) ; - if (searchRes.size() == 1) { - annotationFilename = searchRes[0] ; - } else if (searchRes.size() == 0) { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open() DEBUG: No TSX XML file found in the current directory or in the parent directory" << std::endl; - } - return false; - } else { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open() DEBUG: Several TSX XML file found in the parent directory" << std::endl; - } - return false; - } - } - } - - if (annotationFilename.exists()) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "Begin reading Annotation file" << std::endl; - } - - /* - * Checks whether the XML file corresponds to a Level1B TerraSar product - */ - ossimXmlDocument docXML(annotationFilename) ; - - ossimString xpathTest("/level1Product") ; - std::vector<ossimRefPtr<ossimXmlNode> > listeResultat ; - docXML.findNodes(xpathTest, listeResultat) ; - if (listeResultat.size() != 1 ) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open() DEBUG: the file does not correspond to a level1B TerraSar XML annotation file" << std::endl; - } - retValue = false; - } - else - { - /* - * Annotation file data reading - */ - if (! _annotation->Parse(docXML)) - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "XML annotation file parsing error" << std::endl; - } - retValue = false; - } - else - { - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "End reading Annotation file" << std::endl; - } - } - } - } - else - { - retValue = false; - } - - - if(traceDebug()) - { - ossimNotify(ossimNotifyLevel_DEBUG) - << "ossimTerraSarTileSource::open() DEBUG: returning..." << std::endl; - } - return retValue; -} - -void ossimTerraSarTileSource::close() -{ -} - -bool ossimTerraSarTileSource::isOpen()const -{ - return false; -} - -bool ossimTerraSarTileSource::getImageGeometry(ossimKeywordlist& kwl,const char* prefix) -{ - kwl.add(prefix, ossimKeywordNames::TYPE_KW, "ossimTerraSarModel", true); - - /* - * Insertion of data related to the sensor model acquisition parameters into the keywordlist - */ - - kwl.add(prefix, "imageDataStartWith",_annotation->get_imageDataStartWith().c_str(),true); - kwl.add(prefix, "orbitDirection",_annotation->get_orbitDirection().c_str(),true); - kwl.add(prefix, "lookDirection",_annotation->get_lookDirection().c_str(),true); - kwl.add(prefix, "inp_sctim",_annotation->get_inp_sctim().c_str(),true); - - kwl.add(prefix, "pro_lat",_annotation->get_pro_lat(),true); - kwl.add(prefix, "pro_long",_annotation->get_pro_long(),true); - kwl.add(prefix, "pro_head",_annotation->get_pro_head(),true); - - kwl.add(prefix, "ellip_maj",_annotation->get_ellip_maj(),true); - kwl.add(prefix, "ellip_min",_annotation->get_ellip_min(),true); - - kwl.add(prefix, "sc_lin",_annotation->get_sc_lin(),true); - kwl.add(prefix, "sc_pix",_annotation->get_sc_pix(),true); - - kwl.add(prefix, "central_freq",_annotation->get_central_freq(),true); - - kwl.add(prefix, "fr",_annotation->get_fr(),true); - - kwl.add(prefix, "sc_rng",_annotation->get_sceneCenterRangeTime(),true); - kwl.add(prefix, "start_rng",_annotation->get_rng_gate(),true); - kwl.add(prefix, "end_rng",_annotation->get_rng_gate_end(),true); - - kwl.add(prefix, "azimuthStartTime",_annotation->get_azimuthStartTime().c_str(),true); - kwl.add(prefix, "azimuthStopTime",_annotation->get_azimuthStopTime().c_str(),true); - - kwl.add(prefix, "fa",_annotation->get_fa(),true); - - kwl.add(prefix, "n_azilok",_annotation->get_n_azilok(),true); - kwl.add(prefix, "n_rnglok",_annotation->get_n_rnglok(),true); - - kwl.add(prefix, "rangeProjectionType",(_annotation->get_rangeProjectionType()).c_str(),true); - - kwl.add(prefix, "SrToGr_R0",_annotation->get_SrToGr_R0(),true); - - kwl.add(prefix, "nbCol",_annotation->get_nbCol(),true); - kwl.add(prefix, "nbLin",_annotation->get_nbLin(),true); - kwl.add(prefix, "pixel_spacing_mean",_annotation->get_pixel_spacing_mean(),true); - kwl.add(prefix, "pixel_spacing_near",_annotation->get_pixel_spacing_near(),true); - kwl.add(prefix, "pixel_spacing_far",_annotation->get_pixel_spacing_far(),true); - - int nbCoeffs = (_annotation->get_SrToGr_coeffs()).size() ; - - kwl.add(prefix, "SrToGr_coeffs_number",nbCoeffs,true); - - char name[64]; - for(int i=0;i<nbCoeffs;i++) - { - sprintf(name,"SrToGr_coeffs_%i",i); - kwl.add(prefix, name,(_annotation->get_SrToGr_coeffs())[i],true); - - sprintf(name,"SrToGr_exps_%i",i); - kwl.add(prefix, name,(_annotation->get_SrToGr_exps())[i],true); - } - - kwl.add(prefix, "neph",_annotation->get_ndata(),true); - - for(int i=0;i<_annotation->get_ndata();i++) - { - sprintf(name,"eph%i_date",i); - kwl.add(prefix, name,(_annotation->get_eph_date()[i]).c_str(),true); - - sprintf(name,"eph%i_posX",i); - kwl.add(prefix, name,(_annotation->get_posX()[i]),true); - sprintf(name,"eph%i_posY",i); - kwl.add(prefix, name,(_annotation->get_posY()[i]),true); - sprintf(name,"eph%i_posZ",i); - kwl.add(prefix, name,(_annotation->get_posZ()[i]),true); - - sprintf(name,"eph%i_velX",i); - kwl.add(prefix, name,(_annotation->get_velX()[i]),true); - sprintf(name,"eph%i_velY",i); - kwl.add(prefix, name,(_annotation->get_velY()[i]),true); - sprintf(name,"eph%i_velZ",i); - kwl.add(prefix, name,(_annotation->get_velZ()[i]),true); - } - - for(int i=0;i<5;i++) - { - sprintf(name,"cornersLon%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLon())[i],true); - sprintf(name,"cornersLat%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLat())[i],true); - sprintf(name,"cornersCol%i",i); - kwl.add(prefix, name,(_annotation->get_cornersCol())[i],true); - sprintf(name,"cornersLin%i",i); - kwl.add(prefix, name,(_annotation->get_cornersLin())[i],true); - } - - kwl.add(prefix, "terrain_h",_annotation->get_terrain_h(),true); - - return true; -} \ No newline at end of file diff --git a/Utilities/otbossim/src/ossim/projection/ossimErsSarModel.cpp b/Utilities/otbossim/src/ossim/projection/ossimErsSarModel.cpp deleted file mode 100644 index b230436455..0000000000 --- a/Utilities/otbossim/src/ossim/projection/ossimErsSarModel.cpp +++ /dev/null @@ -1,397 +0,0 @@ -#include <ossim/projection/ossimErsSarModel.h> -#include <ossim/projection/SARModel/Ephemeris/GalileanEphemeris.h> -#include <ossim/projection/SARModel/Ephemeris/GeographicEphemeris.h> - -#include <ossim/projection/SARModel/DateTime/JSDDateTime.h> -#include <ossim/projection/SARModel/DateTime/GMSTDateTime.h> -#include <ossim/projection/SARModel/DateTime/CivilDateTime.h> - -#include <ossim/projection/SARModel/PlatformPosition.h> -#include <ossim/projection/SARModel/SensorParams.h> -#include <ossim/projection/SARModel/RefPoint.h> -#include <ossim/projection/SARModel/SarSensor.h> -#include <ossim/base/ossimString.h> - -#include <math.h> -#include <cctype> // for toupper -#include <string> -#include <algorithm> - -RTTI_DEF1(ossimErsSarModel, "ossimErsSarModel", ossimGeometricSarSensorModel); - -ossimErsSarModel::ossimErsSarModel(): - _n_srgr(0), - _pixel_spacing(0) -{ -} - -ossimErsSarModel::~ossimErsSarModel() -{ -} - -double ossimErsSarModel::getSlantRangeFromGeoreferenced(double col) const -{ - const double c = 2.99792458e+8; - double tn = _srgr_coefset[0][0] + _srgr_coefset[0][1] * col + _srgr_coefset[0][2] * col*col ; - return tn * (c/2.0); -} - -bool ossimErsSarModel::InitSensorParams(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* wave_length_str = kwl.find(prefix,"wave_length"); - double wave_length = atof(wave_length_str); - const char* fr_str = kwl.find(prefix,"fr"); - double fr = atof(fr_str)*1e6; - const char* fa_str = kwl.find(prefix,"fa"); - double fa = atof(fa_str); - - ossimString time_dir_pix = kwl.find(prefix,"time_dir_pix"); - time_dir_pix.upcase(); - //std::transform(time_dir_pix.begin(), time_dir_pix.end(), time_dir_pix.begin(), toupper); - ossimString time_dir_lin = kwl.find(prefix,"time_dir_lin"); - time_dir_lin.upcase(); - //std::transform(time_dir_lin.begin(), time_dir_lin.end(), time_dir_lin.begin(), toupper); - - //ellipsoid parameters - const char* ellip_maj_str = kwl.find(prefix,"ellip_maj"); - double ellip_maj = atof(ellip_maj_str) * 1000.0; // km -> m - const char* ellip_min_str = kwl.find(prefix,"ellip_min"); - double ellip_min = atof(ellip_min_str) * 1000.0; // km -> m - - if(_sensor != NULL) - { - delete _sensor; - } - - _sensor = new SensorParams(); - - if(strcmp(time_dir_pix.c_str(), "INCREASE") == 0) - { - _sensor->set_col_direction(1); - } - else - { - _sensor->set_col_direction(-1); - } - - if(strcmp(time_dir_lin.c_str(), "INCREASE") == 0) - { - _sensor->set_lin_direction(1); - } - else - { - _sensor->set_lin_direction(-1); - } - - _sensor->set_sightDirection(SensorParams::Right) ; - - double nlooks_az = atof(kwl.find(prefix,"nlooks_az")); - _sensor->set_nAzimuthLook(nlooks_az); - double n_rnglok = atof(kwl.find(prefix,"n_rnglok")); - _sensor->set_nRangeLook(n_rnglok); - - _sensor->set_prf(fa); - _sensor->set_sf(fr); - _sensor->set_rwl(wave_length); - - _sensor->set_semiMajorAxis(ellip_maj) ; - _sensor->set_semiMinorAxis(ellip_min) ; - - return true; -} - -bool ossimErsSarModel::InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix) -{ - const double PI = 3.14159265358979323846 ; - CivilDateTime ref_civil_date; - /* - * Ephemerisis reference date retrieval - */ - const char* eph_year_str = kwl.find(prefix,"eph_year"); - int eph_year = atoi(eph_year_str); - const char* eph_month_str = kwl.find(prefix,"eph_month"); - int eph_month = atoi(eph_month_str); - const char* eph_day_str = kwl.find(prefix,"eph_day"); - int eph_day = atoi(eph_day_str); - const char* eph_sec_str = kwl.find(prefix,"eph_sec"); - double eph_sec = atof(eph_sec_str); - - ref_civil_date.set_year(eph_year); - ref_civil_date.set_month(eph_month); - ref_civil_date.set_day(eph_day); - ref_civil_date.set_second((int)eph_sec); - ref_civil_date.set_decimal( eph_sec-(double)((int)eph_sec)); - - JSDDateTime ref_jsd_date(ref_civil_date); - - /* - * Ephemerisis time interval retrieval - */ - const char* eph_int_str = kwl.find(prefix, "eph_int"); - double eph_int = atof(eph_int_str); - /* - * Ephemerisis number retrieval - */ - const char* neph_str = kwl.find(prefix,"neph"); - int neph = atoi(neph_str); - - Ephemeris** ephemeris = new Ephemeris*[neph]; - - /* - * Ephemerisis retrieval - */ - for (int i=0;i<neph;i++) - { - double pos[3]; - double vit[3]; - char name[64]; - - - sprintf(name,"eph%i_posX",i); - const char* px_str = kwl.find(prefix,name); - pos[0] = atof(px_str); - - sprintf(name,"eph%i_posY",i); - const char* py_str = kwl.find(prefix,name); - pos[1] = atof(py_str); - - sprintf(name,"eph%i_posZ",i); - const char* pz_str = kwl.find(prefix,name); - pos[2] = atof(pz_str); - - - sprintf(name,"eph%i_velX",i); - const char* vx_str = kwl.find(prefix,name); - vit[0] = atof(vx_str); - - sprintf(name,"eph%i_velY",i); - const char* vy_str = kwl.find(prefix,name); - vit[1] = atof(vy_str); - - sprintf(name,"eph%i_velZ",i); - const char* vz_str = kwl.find(prefix,name); - vit[2] = atof(vz_str); - - /* - * Ephemerisis date - */ - JSDDateTime date(ref_jsd_date); - date.set_second(date.get_second() + i * eph_int); - date.NormDate(); - - GeographicEphemeris* eph = new GeographicEphemeris(date, pos, vit); - - ephemeris[i] = eph; - } - - /* - * Antenna position interpolator creation - */ - if (_platformPosition != NULL) - { - delete _platformPosition; - } - _platformPosition = new PlatformPosition(ephemeris,neph); - - /* - * Free of memory used by the ephemerisis list - */ - for (int i=0;i<neph;i++) - { - delete ephemeris[i]; - } - delete[] ephemeris; - - return true; -} - -bool ossimErsSarModel::InitRefPoint(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* sc_lin_str = kwl.find(prefix,"sc_lin"); - double sc_lin = atof(sc_lin_str); - - const char* sc_pix_str = kwl.find(prefix,"sc_pix"); - double sc_pix = atof(sc_pix_str); - - const char* inp_sctim_str = kwl.find(prefix,"inp_sctim"); - - const char* rng_gate_str = kwl.find(prefix,"zero_dop_range_time_f_pixel"); - double rng_gate = atof(rng_gate_str); - - if(_refPoint == NULL) - { - _refPoint = new RefPoint(); - } - - _refPoint->set_pix_col(sc_pix); - _refPoint->set_pix_line(sc_lin); - - char year_str[5]; - for (int i=0;i<4;i++) - { - year_str[i] = inp_sctim_str[i]; - } - year_str[4] = '\0'; - - char month_str[3]; - for (int i=4;i<6;i++) - { - month_str[i-4] = inp_sctim_str[i]; - } - month_str[2] = '\0'; - - char day_str[3]; - for (int i=6;i<8;i++) - { - day_str[i-6] = inp_sctim_str[i]; - } - day_str[2] = '\0'; - - char hour_str[3]; - for (int i=8;i<10;i++) - { - hour_str[i-8] = inp_sctim_str[i]; - } - hour_str[2] = '\0'; - - char min_str[3]; - for (int i=10;i<12;i++) - { - min_str[i-10] = inp_sctim_str[i]; - } - min_str[2] = '\0'; - - char sec_str[3]; - for (int i=12;i<14;i++) - { - sec_str[i-12] = inp_sctim_str[i]; - } - sec_str[2] = '\0'; - - char mili_str[4]; - for (int i=14;i<17;i++) - { - mili_str[i-14] = inp_sctim_str[i]; - } - mili_str[3] = '\0'; - - int year = atoi(year_str); - int month = atoi(month_str); - int day = atoi(day_str); - int hour = atoi(hour_str); - int min = atoi(min_str); - int sec = atoi(sec_str); - double mili = atof(mili_str); - - - CivilDateTime date(year, month, day, hour * 3600 + min * 60 + sec, mili/1000.0); - - if(_platformPosition != NULL) - { - Ephemeris * ephemeris = _platformPosition->Interpolate((JSDDateTime)date); - if (ephemeris == NULL) return false ; - _refPoint->set_ephemeris(ephemeris); - - delete ephemeris; - } - else - { - return false; - } - - double c = 2.99792458e+8; - - double distance = (rng_gate*1e-3 + ((double)sc_pix)*_sensor->get_nRangeLook()/_sensor->get_sf()) * (c/2.0); - - _refPoint->set_distance(distance); - - // in order to use ossimSensorModel::lineSampleToWorld - const char* nbCol_str = kwl.find(prefix,"num_pix"); - const char* nbLin_str = kwl.find(prefix,"num_lines"); - theImageSize.x = atoi(nbCol_str); - theImageSize.y = atoi(nbLin_str); - theImageClipRect = ossimDrect(0, 0, theImageSize.x-1, theImageSize.y-1); - - // Ground Control Points extracted from the model : corner points - std::list<ossimGpt> groundGcpCoordinates ; - std::list<ossimDpt> imageGcpCoordinates ; - // first line first pix - const char* lon_str = kwl.find("first_line_first_pixel_lon"); - double lon = atof(lon_str); - const char* lat_str = kwl.find("first_line_first_pixel_lat"); - double lat = atof(lat_str); - if (lon > 180.0) lon -= 360.0; - ossimDpt imageGCP1(0,0); - ossimGpt groundGCP1(lat, lon, 0.0); - groundGcpCoordinates.push_back(groundGCP1) ; - imageGcpCoordinates.push_back(imageGCP1) ; - // first line last pix - lon_str = kwl.find("first_line_last_pixel_lon"); - lon = atof(lon_str); - lat_str = kwl.find("first_line_last_pixel_lat"); - lat = atof(lat_str); - if (lon > 180.0) lon -= 360.0; - ossimDpt imageGCP2(theImageSize.x-1, 0); - ossimGpt groundGCP2(lat, lon, 0.0); - groundGcpCoordinates.push_back(groundGCP2) ; - imageGcpCoordinates.push_back(imageGCP2) ; - // last line last pix - lon_str = kwl.find("last_line_last_pixel_lon"); - lon = atof(lon_str); - lat_str = kwl.find("last_line_last_pixel_lat"); - lat = atof(lat_str); - if (lon > 180.0) lon -= 360.0; - ossimDpt imageGCP3(theImageSize.x-1,theImageSize.y-1); - ossimGpt groundGCP3(lat, lon, 0.0); - groundGcpCoordinates.push_back(groundGCP3) ; - imageGcpCoordinates.push_back(imageGCP3) ; - // last line first pix - lon_str = kwl.find("last_line_first_pixel_lon"); - lon = atof(lon_str); - lat_str = kwl.find("last_line_first_pixel_lat"); - lat = atof(lat_str); - if (lon > 180.0) lon -= 360.0; - ossimDpt imageGCP4(0,theImageSize.y-1); - ossimGpt groundGCP4(lat, lon, 0.0); - groundGcpCoordinates.push_back(groundGCP4) ; - imageGcpCoordinates.push_back(imageGCP4) ; - - // Default optimization - optimizeModel(groundGcpCoordinates, imageGcpCoordinates) ; - - return true; -} - -bool ossimErsSarModel::InitSRGR(const ossimKeywordlist &kwl, const char *prefix) -{ - // Product type = PRI - ossimString filename(kwl.find("filename")); - filename.upcase(); - //std::transform(filename.begin(), filename.end(), filename.begin(), toupper); - string::size_type loc = filename.find("PRI"); - if( loc != string::npos ) { - _isProductGeoreferenced = true; - } else { - _isProductGeoreferenced = false; - } - - // Number of SRGR Coef - _n_srgr = 3; - - // Range time for first mid and last pixel - double t1 = atof(kwl.find("zero_dop_range_time_f_pixel"))*1e-3; - double t2 = atof(kwl.find("zero_dop_range_time_c_pixel"))*1e-3; - double t3 = atof(kwl.find("zero_dop_range_time_l_pixel"))*1e-3; - - // Range pixels numbers corresponding - // Todo : check if it works with "DECREASING LINE TIME" - double x1 = 0.0; - double x2 = atof(kwl.find("sc_pix")) - 1.0; - double x3 = 2.0*(x2+1.0) -1.0 ; - - _srgr_coefset[0][0] = t1; - _srgr_coefset[0][1] = ((t2-t1)/(x2*x2)+(t1-t3)/(x3*x3))/((1.0/x2)-(1.0/x3)); - _srgr_coefset[0][2] = ((t2-t1)/x2 + (t1-t3)/x3)/(x2-x3); - - return true; -} diff --git a/Utilities/otbossim/src/ossim/projection/ossimGeometricSarSensorModel.cpp b/Utilities/otbossim/src/ossim/projection/ossimGeometricSarSensorModel.cpp deleted file mode 100644 index 99f4f78a5b..0000000000 --- a/Utilities/otbossim/src/ossim/projection/ossimGeometricSarSensorModel.cpp +++ /dev/null @@ -1,248 +0,0 @@ -#include <ossim/projection/ossimGeometricSarSensorModel.h> - -#include <ossim/projection/SARModel/Ephemeris/GalileanEphemeris.h> -#include <ossim/projection/SARModel/Ephemeris/GeographicEphemeris.h> -#include <ossim/projection/SARModel/DateTime/GMSTDateTime.h> - -#include <ossim/projection/SARModel/PlatformPosition.h> -#include <ossim/projection/SARModel/SensorParams.h> -#include <ossim/projection/SARModel/RefPoint.h> -#include <ossim/projection/SARModel/SarSensor.h> - -#include <ossim/base/ossimTrace.h> - -#include <math.h> - -RTTI_DEF1(ossimGeometricSarSensorModel, "ossimGeometricSarSensorModel", ossimSensorModel); - -static ossimTrace traceDebug("ossimGeometricSarSensorModel:debug"); - -ossimGeometricSarSensorModel::ossimGeometricSarSensorModel(): - _platformPosition(NULL), - _sensor(NULL), - _refPoint(NULL), - _isProductGeoreferenced(false), - _optimizationFactorX(0.0), - _optimizationFactorY(0.0), - _optimizationBiasX(0.0), - _optimizationBiasY(0.0) -{ -} - -ossimGeometricSarSensorModel::~ossimGeometricSarSensorModel() -{ - if (_platformPosition != NULL) - { - delete _platformPosition; - } - - if(_sensor != NULL) - { - delete _sensor; - } - - if(_refPoint != NULL) - { - delete _refPoint; - } -} - -double ossimGeometricSarSensorModel::getSlantRange(double col) const -{ - const double CLUM = 2.99792458e+8 ; - - double dist = _refPoint->get_distance() - + _sensor->get_col_direction() * (col - (_refPoint->get_pix_col())) * ((CLUM / 2.0) * _sensor->get_nRangeLook() / _sensor->get_sf()) ; - - return dist; -} - -JSDDateTime ossimGeometricSarSensorModel::getTime(double line) const -{ - double dt = _sensor->get_lin_direction() * (line - _refPoint->get_pix_line()) * _sensor->get_nAzimuthLook() / _sensor->get_prf() ; - JSDDateTime time = _refPoint->get_ephemeris()->get_date(); - time.set_second(time.get_second() + dt); - time.NormDate(); - - return time; -} - -void ossimGeometricSarSensorModel::lineSampleHeightToWorld(const ossimDpt& image_point, const double& heightEllipsoid, ossimGpt& worldPoint) const -{ - SarSensor sensor(_sensor,_platformPosition); - double lon, lat; - const double CLUM = 2.99792458e+8 ; - - // optimization - double col = image_point.x - (image_point.x * _optimizationFactorX + _optimizationBiasX) ; - double line = image_point.y - (image_point.y * _optimizationFactorY + _optimizationBiasY) ; - - // Slant range computation, depending on the product type - double slantRange; - if (_isProductGeoreferenced) { - slantRange = getSlantRangeFromGeoreferenced(col) ; - } - else { - slantRange = getSlantRange(col) ; - } - - JSDDateTime azimuthTime = getTime(line) ; - int etatLoc = sensor.ImageToWorld(slantRange, azimuthTime, heightEllipsoid, lon, lat); - - if(traceDebug()) - { - switch (etatLoc) - { - case 0: - ossimNotify(ossimNotifyLevel_DEBUG) << "successful call to lineSampleHeightToWorld" << std::endl; - break; - case 1: - ossimNotify(ossimNotifyLevel_DEBUG) << "lineSampleHeightToWorld : no real root to the equation belongs to the imaging ray" << std::endl; - break; - case 2: - ossimNotify(ossimNotifyLevel_DEBUG) << "lineSampleHeightToWorld : no real root to the equation" << std::endl; - break; - default : - ossimNotify(ossimNotifyLevel_DEBUG) << "lineSampleHeightToWorld : unknown error case" << std::endl; - break; - } - } - - worldPoint.lat = lat; - worldPoint.lon = lon; - worldPoint.hgt = heightEllipsoid ; -} - -void ossimGeometricSarSensorModel::clearGCPlist() { - _optimizationGCPsGroundCoordinates.clear(); - _optimizationGCPsImageCoordinates.clear(); - - // optimization model update - optimizeModel(_optimizationGCPsGroundCoordinates, _optimizationGCPsImageCoordinates) ; -} - -void ossimGeometricSarSensorModel::getGCPlist(std::list<ossimGpt> & groundCoordinates, std::list<ossimDpt> & imageCoordinates) { - groundCoordinates = _optimizationGCPsGroundCoordinates ; - imageCoordinates = _optimizationGCPsImageCoordinates ; -} - -bool ossimGeometricSarSensorModel::optimizeModel(const std::list<ossimGpt> & groundCoordinates, const std::list<ossimDpt> & imageCoordinates) { - - if (groundCoordinates.size() != imageCoordinates.size()) return false ; - - // no optimization is used during the GCP localization error computation - _optimizationFactorX = 0.0 ; - _optimizationFactorY = 0.0 ; - _optimizationBiasX = 0.0 ; - _optimizationBiasY = 0.0 ; - - // appends the user input GCPs to the GCPs already present - _optimizationGCPsGroundCoordinates.insert(_optimizationGCPsGroundCoordinates.end(), groundCoordinates.begin(), groundCoordinates.end()) ; - _optimizationGCPsImageCoordinates.insert(_optimizationGCPsImageCoordinates.end(), imageCoordinates.begin(), imageCoordinates.end()) ; - - // no GCP : no optimization - if (groundCoordinates.size() == 0) return true ; - - // Inverse projection of each Ground Control Point - std::list<ossimGpt>::iterator itGround = _optimizationGCPsGroundCoordinates.begin() ; - std::list<ossimDpt> inverseLocResults ; - while (itGround != _optimizationGCPsGroundCoordinates.end()) { - ossimDpt itLoc ; - this->worldToLineSample(*itGround,itLoc); - inverseLocResults.push_back(itLoc) ; - itGround++; - } - - // error computation - int nbPoints = _optimizationGCPsGroundCoordinates.size() ; - double xErrorMean = 0.0, yErrorMean = 0.0, xActualPow = 0.0, yActualPow = 0.0, xActualMean = 0.0, yActualMean = 0.0, - xErrorByActualMean = 0.0, yErrorByActualMean = 0.0 ; - double xLocalError, yLocalError ; - - std::list<ossimDpt>::iterator itActualCoords = _optimizationGCPsImageCoordinates.begin() ; - std::list<ossimDpt>::iterator itEstimatedCoords = inverseLocResults.begin() ; - while ((itActualCoords != _optimizationGCPsImageCoordinates.end())&&(itEstimatedCoords != inverseLocResults.end())) { - xLocalError = itActualCoords->x - itEstimatedCoords->x ; - yLocalError = itActualCoords->y - itEstimatedCoords->y ; - - xErrorMean += xLocalError ; - yErrorMean += yLocalError ; - xActualMean += itActualCoords->x ; - yActualMean += itActualCoords->y ; - xActualPow += itActualCoords->x * itActualCoords->x ; - yActualPow += itActualCoords->y * itActualCoords->y ; - xErrorByActualMean += xLocalError * itActualCoords->x ; - yErrorByActualMean += yLocalError * itActualCoords->y ; - - ++itActualCoords; - ++itEstimatedCoords; - } - - xErrorMean /= nbPoints ; - yErrorMean /= nbPoints ; - xActualMean /= nbPoints ; - yActualMean /= nbPoints ; - xActualPow /= nbPoints ; - yActualPow /= nbPoints ; - xErrorByActualMean /= nbPoints ; - yErrorByActualMean /= nbPoints ; - - // linear regression - if (fabs(xActualPow - xActualMean*xActualMean) > FLT_EPSILON) - _optimizationFactorX = (xErrorByActualMean - xErrorMean * xActualMean) / (xActualPow - xActualMean*xActualMean) ; - if (fabs(yActualPow - yActualMean*yActualMean) > FLT_EPSILON) - _optimizationFactorY = (yErrorByActualMean - yErrorMean * yActualMean) / (yActualPow - yActualMean*yActualMean) ; - _optimizationBiasX = xErrorMean - _optimizationFactorX * xActualMean ; - _optimizationBiasY = yErrorMean - _optimizationFactorY * yActualMean ; - - //// Comparison between the estimated image coordinates of each GCP and its actual image coordinates - //double lineBias = 0.0, columnBias = 0.0 ; - //int nbPtsUsed = 0; - - //std::list<ossimDpt>::iterator itActualCoords = imageCoordinates.begin() ; - //std::list<ossimDpt>::iterator itEstimatedCoords = inverseLocResults.begin() ; - //while ((itActualCoords != imageCoordinates.end())&&(itEstimatedCoords != inverseLocResults.end())) { - // - // columnBias += (itActualCoords->x - itEstimatedCoords->x ) ; - // lineBias += (itActualCoords->y - itEstimatedCoords->y ) ; - // - // nbPtsUsed++; - // itActualCoords++; - // itEstimatedCoords++; - //} - - //// Computation of bias in line and column : mean deviations - //lineBias /= nbPtsUsed ; - //columnBias /= nbPtsUsed ; - - //// Update of the model Reference Point - //_refPoint->set_pix_col(_refPoint->get_pix_col() - columnBias); - //_refPoint->set_pix_line(_refPoint->get_pix_line() - lineBias); - - return true ; -} - -bool ossimGeometricSarSensorModel::loadState(const ossimKeywordlist &kwl, const char *prefix) -{ - if(!InitSRGR(kwl, prefix)) - { - return false; - } - if(!InitPlatformPosition(kwl, prefix)) - { - return false; - } - if(!InitSensorParams(kwl, prefix)) - { - return false; - } - if(!InitRefPoint(kwl, prefix)) - { - return false; - } - return true; -} - - - - diff --git a/Utilities/otbossim/src/ossim/projection/ossimRadarSat2Model.cpp b/Utilities/otbossim/src/ossim/projection/ossimRadarSat2Model.cpp deleted file mode 100644 index b50ca73455..0000000000 --- a/Utilities/otbossim/src/ossim/projection/ossimRadarSat2Model.cpp +++ /dev/null @@ -1,430 +0,0 @@ -#include <ossim/projection/ossimRadarSat2Model.h> - -#include <ossim/projection/SARModel/Ephemeris/GalileanEphemeris.h> -#include <ossim/projection/SARModel/Ephemeris/GeographicEphemeris.h> -#include <ossim/projection/SARModel/DateTime/GMSTDateTime.h> - -#include <ossim/projection/SARModel/PlatformPosition.h> -#include <ossim/projection/SARModel/SensorParams.h> -#include <ossim/projection/SARModel/RefPoint.h> -#include <ossim/projection/SARModel/SarSensor.h> - -#include <math.h> - -RTTI_DEF1(ossimRadarSat2Model, "ossimRadarSat2Model", ossimGeometricSarSensorModel); - -ossimRadarSat2Model::ossimRadarSat2Model(): - _nbCol(0), - _pixel_spacing(0), - _n_srgr(0) -{ -} - -ossimRadarSat2Model::~ossimRadarSat2Model() -{ -} - -double ossimRadarSat2Model::getSlantRangeFromGeoreferenced(double col) const -{ - if (_n_srgr==0) return(-1) ; - - double relativeGroundRange, slantRange = 0.0 ; - - // in the case of Georeferenced images, _refPoint->get_distance() contains the ground range - relativeGroundRange = _refPoint->get_distance() + _sensor->get_col_direction() * (col-_refPoint->get_pix_col())* _pixel_spacing ; - - int numSet = FindSRGRSetNumber((_refPoint->get_ephemeris())->get_date()) ; - /** - * @todo : could be improved (date choice) - */ - - for (int i=0 ; i<_SrGr_coeffs[numSet].size() ; i++) { - slantRange += _SrGr_coeffs[numSet][i]*pow(relativeGroundRange,i) ; - } - - return slantRange ; -} - -bool ossimRadarSat2Model::InitSensorParams(const ossimKeywordlist &kwl, const char *prefix) -{ - // sensor frequencies - const char* central_freq_str = kwl.find(prefix,"central_freq"); - double central_freq = atof(central_freq_str); - const char* fr_str = kwl.find(prefix,"fr"); - double fr = atof(fr_str); - const char* fa_str = kwl.find(prefix,"fa"); - double fa = atof(fa_str); - - //number of different looks - const char* n_azilok_str = kwl.find(prefix,"n_azilok"); - double n_azilok = atof(n_azilok_str); - const char* n_rnglok_str = kwl.find(prefix,"n_rnglok"); - double n_rnglok = atof(n_rnglok_str); - - //ellipsoid parameters - const char* ellip_maj_str = kwl.find(prefix,"ellip_maj"); - double ellip_maj = atof(ellip_maj_str) * 1000.0; // km -> m - const char* ellip_min_str = kwl.find(prefix,"ellip_min"); - double ellip_min = atof(ellip_min_str) * 1000.0; // km -> m - - if(_sensor != NULL) - { - delete _sensor; - } - - _sensor = new SensorParams(); - - const char* lineTimeOrdering_str = kwl.find(prefix,"lineTimeOrdering"); - std::string lineTimeOrdering(lineTimeOrdering_str) ; - const char* pixelTimeOrdering_str = kwl.find(prefix,"pixelTimeOrdering"); - std::string pixelTimeOrdering(pixelTimeOrdering_str) ; - if (pixelTimeOrdering == "Increasing") _sensor->set_col_direction(1); - else _sensor->set_col_direction(- 1); - if (lineTimeOrdering == "Increasing") _sensor->set_lin_direction(1); - else _sensor->set_lin_direction(- 1); - - const char* lookDirection_str = kwl.find(prefix,"lookDirection"); - std::string lookDirection(lookDirection_str) ; - if ((lookDirection == "Right")||(lookDirection == "RIGHT")) _sensor->set_sightDirection(SensorParams::Right) ; - else _sensor->set_sightDirection(SensorParams::Left) ; - - _sensor->set_sf(fr); - const double CLUM = 2.99792458e+8 ; - double wave_length = CLUM / central_freq ; - _sensor->set_rwl(wave_length); - _sensor->set_nAzimuthLook(n_azilok); - _sensor->set_nRangeLook(n_rnglok); - - // fa is the processing PRF - _sensor->set_prf(fa * n_azilok); - - _sensor->set_semiMajorAxis(ellip_maj) ; - _sensor->set_semiMinorAxis(ellip_min) ; - - return true; -} - -bool ossimRadarSat2Model::InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix) -{ - /* - * Retrieval of ephemerisis number - */ - const char* neph_str = kwl.find(prefix,"neph"); - int neph = atoi(neph_str); - - Ephemeris** ephemeris = new Ephemeris*[neph]; - - /* - * Retrieval of ephemerisis - */ - for (int i=0;i<neph;i++) - { - double pos[3]; - double vit[3]; - char name[64]; - - - sprintf(name,"eph%i_date",i); - const char* date_str = kwl.find(prefix,name); - - sprintf(name,"eph%i_posX",i); - const char* px_str = kwl.find(prefix,name); - pos[0] = atof(px_str); - - sprintf(name,"eph%i_posY",i); - const char* py_str = kwl.find(prefix,name); - pos[1] = atof(py_str); - - sprintf(name,"eph%i_posZ",i); - const char* pz_str = kwl.find(prefix,name); - pos[2] = atof(pz_str); - - - sprintf(name,"eph%i_velX",i); - const char* vx_str = kwl.find(prefix,name); - vit[0] = atof(vx_str) ; - - sprintf(name,"eph%i_velY",i); - const char* vy_str = kwl.find(prefix,name); - vit[1] = atof(vy_str) ; - - sprintf(name,"eph%i_velZ",i); - const char* vz_str = kwl.find(prefix,name); - vit[2] = atof(vz_str) ; - - /* - * Conversion to JSD Date - */ - std::string utcString(date_str); - CivilDateTime eph_civil_date; - if (! UtcDateTimeStringToCivilDate(utcString, eph_civil_date)) return false; - - JSDDateTime eph_jsd_date(eph_civil_date); - - GeographicEphemeris* eph = new GeographicEphemeris(eph_jsd_date,pos,vit); - - ephemeris[i] = eph; - } - - /* - * Creation of the platform position interpolator - */ - if (_platformPosition != NULL) - { - delete _platformPosition; - } - _platformPosition = new PlatformPosition(ephemeris,neph); - - /* - * Free of memory used by ephemerisis list : the constructor copies the ephemerisis - */ - for (int i=0;i<neph;i++) - { - delete ephemeris[i]; - } - delete[] ephemeris; - - return true; -} - -bool ossimRadarSat2Model::InitRefPoint(const ossimKeywordlist &kwl, const char *prefix) -{ - // in order to use ossimSensorModel::lineSampleToWorld - const char* nbCol_str = kwl.find(prefix,"nbCol"); - const char* nbLin_str = kwl.find(prefix,"nbLin"); - theImageSize.x = atoi(nbCol_str); - theImageSize.y = atoi(nbLin_str); - theImageClipRect = ossimDrect(0, 0, theImageSize.x-1, theImageSize.y-1); - - // no reference point (e.g. scene center) is given in the annotation file - // we choose to use the upper left corner as reference point - if(_refPoint == NULL) - { - _refPoint = new RefPoint(); - } - - _refPoint->set_pix_col(0); // upper left corner - _refPoint->set_pix_line(0); // upper left corner - - const char* zeroDopplerTimeFirstLine_str = kwl.find(prefix,"zeroDopplerTimeFirstLine"); - std::string zeroDopplerTimeFirstLine(zeroDopplerTimeFirstLine_str); - - CivilDateTime * date = new CivilDateTime() ; - if (! UtcDateTimeStringToCivilDate(zeroDopplerTimeFirstLine, *date)) return false ; - - if (_sensor->get_lin_direction() == -1) { - double time = (double) date->get_second() + date->get_decimal() ; // upper left corner - time += theImageSize.y / _sensor->get_prf() ; - date->set_second((int) floor(time)) ; - date->set_decimal(time - floor(time)) ; - } - - if(_platformPosition != NULL) - { - Ephemeris * ephemeris = _platformPosition->Interpolate((JSDDateTime)*date); - if (ephemeris == NULL) return false ; - _refPoint->set_ephemeris(ephemeris); - - delete ephemeris; - } - else - { - return false; - } - - const char* slantRangeNearEdge_str = kwl.find(prefix,"slantRangeNearEdge"); - double distance = atof(slantRangeNearEdge_str); - - // in the case of Georeferenced images, the ground range is stored in place of the slant range - // (used for SlantRange computation relative to reference point, necessary for optimization) - if (_isProductGeoreferenced) { - if (_sensor->get_col_direction() == 1) - distance += 0 ; // upper left corner - else - distance += _nbCol * _pixel_spacing ; - } - - _refPoint->set_distance(distance); - - // Ground Control Points extracted from the model - std::list<ossimGpt> groundGcpCoordinates ; - std::list<ossimDpt> imageGcpCoordinates ; - const char* nTiePoints_str = kwl.find(prefix,"nTiePoints"); - int nTiePoints = atoi(nTiePoints_str); - char name[64]; - for (int k=0 ; k<nTiePoints ; k++) { - sprintf(name,"cornersCol%i",k); - const char* i_str = kwl.find(name); - int i = atoi(i_str); - sprintf(name,"cornersLin%i",k); - const char* j_str = kwl.find(name); - int j = atoi(j_str); - sprintf(name,"cornersLon%i",k); - const char* lon_str = kwl.find(name); - double lon = atof(lon_str); - sprintf(name,"cornersLat%i",k); - const char* lat_str = kwl.find(name); - double lat = atof(lat_str); - sprintf(name,"cornersHeight%i",k); - const char* height_str = kwl.find(name); - double height = atof(height_str); - - ossimDpt imageGCP(i,j); - ossimGpt groundGCP(lat ,lon , height); - groundGcpCoordinates.push_back(groundGCP) ; - imageGcpCoordinates.push_back(imageGCP) ; - } - - // Default optimization - optimizeModel(groundGcpCoordinates, imageGcpCoordinates) ; - - return true; -} - -bool ossimRadarSat2Model::InitSRGR(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* productType_str = kwl.find(prefix,"productType"); - std::string productType(productType_str); - - _isProductGeoreferenced = (productType != "SLC") ; - - // Pixel spacing - const char* pixel_spacing_str = kwl.find(prefix,"pixel_spacing_mean"); - _pixel_spacing = atof(pixel_spacing_str); - - // Number of columns - const char* nbCol_str = kwl.find(prefix,"nbCol"); - _nbCol = atoi(nbCol_str); - - // number of SRGR coefficient sets - const char* SrGr_coeffs_number_str = kwl.find(prefix,"SrGr_coeffs_number"); - _n_srgr = atoi(SrGr_coeffs_number_str); - - // SRGR coefficients and exponents - char name[64]; - for(int i=0;i<_n_srgr;i++) - { - std::vector<double> srgr_set ; - for(int j=0;j<4;j++) - { - sprintf(name,"SrGr_coeffs_%i_%i",i,j); - const char* coeff_str = kwl.find(prefix,name); - double coeff = atof(coeff_str); - srgr_set.push_back(coeff); - } - _SrGr_coeffs.push_back(srgr_set); - // SRGR polynomial reference - sprintf(name,"SrGr_R0_%i",i); - const char* SrGr_R0_str = kwl.find(prefix,name); - _SrGr_R0.push_back(atof(SrGr_R0_str)); - // SRGR update time - sprintf(name,"SrGr_update_%i",i); - const char* SrGr_update_str = kwl.find(prefix,name); - CivilDateTime SrGr_update_date ; - UtcDateTimeStringToCivilDate(std::string(SrGr_update_str), SrGr_update_date) ; - _srgr_update.push_back((double) SrGr_update_date.get_second()+ SrGr_update_date.get_decimal()); - } - - return true; -} - - -bool ossimRadarSat2Model::UtcDateTimeStringToCivilDate(const std::string &utcString, CivilDateTime &outputDate) { - // conversion : - // ossimRadarSatModel handles string civil dates of the form yyyymmddhhmmssddd, - // while Rds2 date format is UTC (xs:dateTime) : yyyy-mm-ddThh:mm:ss(.s+)zzzz (where zzzz is the timeZone). - // Here, the timeZone is ignored. - if (utcString.size() < 19) return false ; - const char* stringUTCDate = utcString.c_str() ; - - char year_str[5]; - for (int i=0;i<4;i++) - { - year_str[i] = stringUTCDate[i]; - } - year_str[4] = '\0'; - - char month_str[3]; - for (int i=5;i<7;i++) - { - month_str[i-5] = stringUTCDate[i]; - } - month_str[2] = '\0'; - - char day_str[3]; - for (int i=8;i<10;i++) - { - day_str[i-8] = stringUTCDate[i]; - } - day_str[2] = '\0'; - - char hour_str[3]; - for (int i=11;i<13;i++) - { - hour_str[i-11] = stringUTCDate[i]; - } - hour_str[2] = '\0'; - - char min_str[3]; - for (int i=14;i<16;i++) - { - min_str[i-14] = stringUTCDate[i]; - } - min_str[2] = '\0'; - - char sec_str[3]; - for (int i=17;i<19;i++) - { - sec_str[i-17] = stringUTCDate[i]; - } - sec_str[2] = '\0'; - - char mili_str[4]={'0','0','0','\0'}; - if ((utcString.size() > 19)&& (stringUTCDate[19] == '.')) { - mili_str[0]=stringUTCDate[20]; - if ((utcString.size() > 21)&&(stringUTCDate[21] != ':')&&(stringUTCDate[21] != 'Z')) { - mili_str[1]=stringUTCDate[21]; - if ((utcString.size() > 22)&&(stringUTCDate[22] != ':')&&(stringUTCDate[22] != 'Z')) { - mili_str[2]=stringUTCDate[22]; - } - } - } - - int hour = atoi(hour_str); - int min = atoi(min_str); - int sec = atoi(sec_str); - double mili = atof(mili_str); - - outputDate.set_year(atoi(year_str)); - outputDate.set_month(atoi(month_str)); - outputDate.set_day(atoi(day_str)); - outputDate.set_second(hour * 3600 + min * 60 + sec); - outputDate.set_decimal(mili/1000.0); - - return true ; -} - -int ossimRadarSat2Model::FindSRGRSetNumber(JSDDateTime date) const -{ - if (_n_srgr==0) return(-1) ; - - double delays[20]; - for (int i=0;i<_n_srgr;i++) - { - delays[i] = fabs(date.get_second()+date.get_decimal()-_srgr_update[i]) ; - } - - int setNumber = 0 ; - double min_delay = delays[0] ; - for (int i=1;i<_n_srgr;i++) - { - if (delays[i]<min_delay) { - setNumber = i ; - min_delay = delays[i] ; - } - } - return setNumber ; -} - - - diff --git a/Utilities/otbossim/src/ossim/projection/ossimTerraSarModel.cpp b/Utilities/otbossim/src/ossim/projection/ossimTerraSarModel.cpp deleted file mode 100644 index b5301307f4..0000000000 --- a/Utilities/otbossim/src/ossim/projection/ossimTerraSarModel.cpp +++ /dev/null @@ -1,496 +0,0 @@ -#include <ossim/projection/ossimTerraSarModel.h> - -#include <ossim/projection/SARModel/Ephemeris/GalileanEphemeris.h> -#include <ossim/projection/SARModel/Ephemeris/GeographicEphemeris.h> -#include <ossim/projection/SARModel/DateTime/GMSTDateTime.h> - -#include <ossim/projection/SARModel/PlatformPosition.h> -#include <ossim/projection/SARModel/SensorParams.h> -#include <ossim/projection/SARModel/RefPoint.h> -#include <ossim/projection/SARModel/SarSensor.h> - -#include <math.h> - -RTTI_DEF1(ossimTerraSarModel, "ossimTerraSarModel", ossimGeometricSarSensorModel); - -ossimTerraSarModel::ossimTerraSarModel(): - _nbCol(0), - _SrToGr_R0(0), - _sceneCenterRangeTime(0), - _SrToGr_scaling_factor(0) -{ -} - -ossimTerraSarModel::~ossimTerraSarModel() -{ -} - -// Note : ground range to slant range coputation could be performed in three ways : -// (1) Slant Range to Ground Range polynomial inversion (coefficients given at mid-scene) -// (2) use of a parabolic model from three geolocated points -// (3) interpolation from the geolocation grid (separate file, most precise technique) -// In this version, (1) and (2) were implemented but (1) is imprecise on the test products. -double ossimTerraSarModel::getSlantRangeFromGeoreferenced(double col) const -{ - const double c = 2.99792458e+8; - double tn = _alt_srgr_coefset[0] + _alt_srgr_coefset[1] * col + _alt_srgr_coefset[2] * col*col ; - return tn * (c/2.0); -} - -/* -// Version (1) -double ossimTerraSarModel::getSlantRangeFromGeoreferenced(double col) const -{ - // iterative polynomial inversion - const double CLUM = 2.99792458e+8 ; - double EPSILON = 0.0000001 ; - double iterError = 1.0 ; - int maxIter = 50, nIter=0 ; - double estimatedGroundRange, estimatedSlantRangeTime, actualGroundRange, estimatedSlantRange ; - - - // actual ground range computation relative to the image near side - // in the case of Georeferenced images, _refPoint->get_distance() contains the ground range - actualGroundRange = _refPoint->get_distance() - _sensor->get_col_direction() * (col-_refPoint->get_pix_col()) * _SrToGr_scaling_factor ; - - estimatedSlantRangeTime = _sceneCenterRangeTime ; - while ((fabs(iterError)>EPSILON)&& (nIter<maxIter)) { - // estimated ground range computation from SrToGr - estimatedGroundRange = 0.0 ; - for (int i=0; i<_SrToGr_coeffs.size(); i++) { - estimatedGroundRange += _SrToGr_coeffs[i]*pow(estimatedSlantRangeTime-_SrToGr_R0,_SrToGr_exponent[i]); - } - - // comparison between the estimated ground range and the actual ground range - iterError = actualGroundRange - estimatedGroundRange ; - - // estimated slant range update - estimatedSlantRangeTime += iterError * 2.0 / CLUM ; - - nIter++; - } - - estimatedSlantRange = estimatedSlantRangeTime* CLUM / 2.0 ; - - return estimatedSlantRange ; -} -*/ - -bool ossimTerraSarModel::InitSensorParams(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* central_freq_str = kwl.find(prefix,"central_freq"); - double central_freq = atof(central_freq_str); - const char* fr_str = kwl.find(prefix,"fr"); - double fr = atof(fr_str); - const char* fa_str = kwl.find(prefix,"fa"); - double fa = atof(fa_str); - - //number of different looks - const char* n_azilok_str = kwl.find(prefix,"n_azilok"); - double n_azilok = atof(n_azilok_str); - const char* n_rnglok_str = kwl.find(prefix,"n_rnglok"); - double n_rnglok = atof(n_rnglok_str); - - //ellipsoid parameters - const char* ellip_maj_str = kwl.find(prefix,"ellip_maj"); - double ellip_maj = atof(ellip_maj_str) * 1000.0; // km -> m - const char* ellip_min_str = kwl.find(prefix,"ellip_min"); - double ellip_min = atof(ellip_min_str) * 1000.0; // km -> m - - - if(_sensor != NULL) - { - delete _sensor; - } - - _sensor = new SensorParams(); - - - if (_isProductGeoreferenced) { - const char* orbitDirection_str = kwl.find(prefix,"orbitDirection"); - std::string orbitDirection(orbitDirection_str) ; - int orbitDirectionSign ; - if (orbitDirection=="DESCENDING") orbitDirectionSign = 1 ; - else orbitDirectionSign = - 1 ; - - const char* imageDataStartWith_str = kwl.find(prefix,"imageDataStartWith"); - std::string imageDataStartWith(imageDataStartWith_str) ; - if (imageDataStartWith=="EARLYAZNEARRG") { - _sensor->set_col_direction(orbitDirectionSign); - _sensor->set_lin_direction(orbitDirectionSign); - } else if (imageDataStartWith=="EARLYAZFARRG") { - _sensor->set_col_direction(-orbitDirectionSign); - _sensor->set_lin_direction(orbitDirectionSign); - } else if (imageDataStartWith=="LATEAZNEARRG") { - _sensor->set_col_direction(orbitDirectionSign); - _sensor->set_lin_direction(-orbitDirectionSign); - } else if (imageDataStartWith=="LATEAZFARRG") { - _sensor->set_col_direction(-orbitDirectionSign); - _sensor->set_lin_direction(-orbitDirectionSign); - } else { - // COSAR Files are stored starting with early azimuth, near range - _sensor->set_col_direction(orbitDirectionSign); - _sensor->set_lin_direction(orbitDirectionSign); - } - } - else { - _sensor->set_col_direction(1); - _sensor->set_lin_direction(1); - } - - const char* lookDirection_str = kwl.find(prefix,"lookDirection"); - std::string lookDirection(lookDirection_str) ; - if ((lookDirection == "Right")||(lookDirection == "RIGHT")) _sensor->set_sightDirection(SensorParams::Right) ; - else _sensor->set_sightDirection(SensorParams::Left) ; - - _sensor->set_sf(fr); - const double CLUM = 2.99792458e+8 ; - double wave_length = CLUM / central_freq ; - _sensor->set_rwl(wave_length); - _sensor->set_nRangeLook(n_rnglok); - _sensor->set_prf(fa) ; - // fa is the processing PRF - //_sensor->set_prf(fa * n_azilok); // number of looks disabled - - _sensor->set_semiMajorAxis(ellip_maj) ; - _sensor->set_semiMinorAxis(ellip_min) ; - - return true; -} - -bool ossimTerraSarModel::InitPlatformPosition(const ossimKeywordlist &kwl, const char *prefix) -{ - /* - * Retrieval of ephemerisis number - */ - const char* neph_str = kwl.find(prefix,"neph"); - int neph = atoi(neph_str); - - Ephemeris** ephemeris = new Ephemeris*[neph]; - - /* - * Retrieval of ephemerisis - */ - for (int i=0;i<neph;i++) - { - double pos[3]; - double vit[3]; - char name[64]; - - - sprintf(name,"eph%i_date",i); - const char* date_str = kwl.find(prefix,name); - - sprintf(name,"eph%i_posX",i); - const char* px_str = kwl.find(prefix,name); - pos[0] = atof(px_str); - - sprintf(name,"eph%i_posY",i); - const char* py_str = kwl.find(prefix,name); - pos[1] = atof(py_str); - - sprintf(name,"eph%i_posZ",i); - const char* pz_str = kwl.find(prefix,name); - pos[2] = atof(pz_str); - - - sprintf(name,"eph%i_velX",i); - const char* vx_str = kwl.find(prefix,name); - vit[0] = atof(vx_str) ; - - sprintf(name,"eph%i_velY",i); - const char* vy_str = kwl.find(prefix,name); - vit[1] = atof(vy_str) ; - - sprintf(name,"eph%i_velZ",i); - const char* vz_str = kwl.find(prefix,name); - vit[2] = atof(vz_str) ; - - /* - * Conversion to JSD Date - */ - std::string utcString(date_str); - CivilDateTime eph_civil_date; - if (! UtcDateTimeStringToCivilDate(utcString, eph_civil_date)) return false; - - JSDDateTime eph_jsd_date(eph_civil_date); - - GeographicEphemeris* eph = new GeographicEphemeris(eph_jsd_date,pos,vit); - - ephemeris[i] = eph; - } - - /* - * Creation of the platform position interpolator - */ - if (_platformPosition != NULL) - { - delete _platformPosition; - } - _platformPosition = new PlatformPosition(ephemeris,neph); - - /* - * Free of memory used by ephemerisis list : the constructor copies the ephemerisis - */ - for (int i=0;i<neph;i++) - { - delete ephemeris[i]; - } - delete[] ephemeris; - - return true; -} - -bool ossimTerraSarModel::InitRefPoint(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* sc_lin_str = kwl.find(prefix,"sc_lin"); - double sc_lin = atof(sc_lin_str); - - const char* sc_pix_str = kwl.find(prefix,"sc_pix"); - double sc_pix = atof(sc_pix_str); - - const char* inp_sctim_str = kwl.find(prefix,"inp_sctim"); - std::string inp_sctim_string(inp_sctim_str) ; - - const char* sceneCenterRangeTime_str = kwl.find(prefix,"sc_rng"); - _sceneCenterRangeTime = atof(sceneCenterRangeTime_str); - - if(_refPoint == NULL) - { - _refPoint = new RefPoint(); - } - - _refPoint->set_pix_col(sc_pix); - _refPoint->set_pix_line(sc_lin); - - CivilDateTime * date = new CivilDateTime() ; - if (! UtcDateTimeStringToCivilDate(inp_sctim_string, *date)) return false ; - - if(_platformPosition != NULL) - { - Ephemeris * ephemeris = _platformPosition->Interpolate((JSDDateTime)*date); - if (ephemeris == NULL) return false ; - - _refPoint->set_ephemeris(ephemeris); - - delete ephemeris; - } - else - { - return false; - } - - const double CLUM = 2.99792458e+8 ; - double sceneCenterSlantRange = _sceneCenterRangeTime * CLUM / 2.0 ; - - _refPoint->set_distance(sceneCenterSlantRange); - - // in the case of Georeferenced images, the ground range is stored in place of the slant range - // (used for SlantRange computation relative to reference point, necessary for optimization) - if (_isProductGeoreferenced) { - double estimatedGroundRange = 0.0 ; - for (int i=0; i<_SrToGr_coeffs.size(); i++) { - estimatedGroundRange += _SrToGr_coeffs[i]*pow(_sceneCenterRangeTime-_SrToGr_R0,_SrToGr_exponent[i]); - } - // SrToGr update : estimatedGroundRange = sc_pix * scaling_factor - _SrToGr_scaling_factor = estimatedGroundRange / sc_pix ; - _refPoint->set_distance(estimatedGroundRange); - } - - // in order to use ossimSensorModel::lineSampleToWorld - const char* nbCol_str = kwl.find(prefix,"nbCol"); - const char* nbLin_str = kwl.find(prefix,"nbLin"); - theImageSize.x = atoi(nbCol_str); - theImageSize.y = atoi(nbLin_str); - theImageClipRect = ossimDrect(0, 0, theImageSize.x-1, theImageSize.y-1); - - if (_isProductGeoreferenced) { - std::string azimuthStartTime(kwl.find("azimuthStartTime")); - std::string azimuthStopTime(kwl.find("azimuthStopTime")); - CivilDateTime * dateStart = new CivilDateTime() ; - if (! UtcDateTimeStringToCivilDate(azimuthStartTime, *dateStart)) return false ; - CivilDateTime * dateStop = new CivilDateTime() ; - if (! UtcDateTimeStringToCivilDate(azimuthStopTime, *dateStop)) return false ; - double acq_msec_first = (double) dateStart->get_second()+dateStart->get_decimal(); - double acq_msec_last = (double) dateStop->get_second()+dateStop->get_decimal(); - - double actualPRF = theImageSize.y/(acq_msec_last-acq_msec_first) ; - _sensor->set_nAzimuthLook(_sensor->get_prf()/actualPRF); - } - else - _sensor->set_nAzimuthLook(1.0); - - // Ground Control Points extracted from the model : scene center and corners - std::list<ossimGpt> groundGcpCoordinates ; - std::list<ossimDpt> imageGcpCoordinates ; - char name[64]; - for (int k=0 ; k<5 ; k++) { - sprintf(name,"cornersCol%i",k); - const char* i_str = kwl.find(name); - int i = atoi(i_str); - sprintf(name,"cornersLin%i",k); - const char* j_str = kwl.find(name); - int j = atoi(j_str); - sprintf(name,"cornersLon%i",k); - const char* lon_str = kwl.find(name); - double lon = atof(lon_str); - sprintf(name,"cornersLat%i",k); - const char* lat_str = kwl.find(name); - double lat = atof(lat_str); - const char* height_str = kwl.find("terrain_h"); - double height = atof(height_str) ; - - ossimDpt imageGCP(i,j); - ossimGpt groundGCP(lat ,lon , height); - groundGcpCoordinates.push_back(groundGCP) ; - imageGcpCoordinates.push_back(imageGCP) ; - } - - // Default optimization - optimizeModel(groundGcpCoordinates, imageGcpCoordinates) ; - - return true; -} - -bool ossimTerraSarModel::InitSRGR(const ossimKeywordlist &kwl, const char *prefix) -{ - const char* rangeProjectionType_str = kwl.find(prefix,"rangeProjectionType"); - std::string rangeProjectionType(rangeProjectionType_str); - - _isProductGeoreferenced = (rangeProjectionType=="GROUNDRANGE") ; - - // Number of columns - const char* nbCol_str = kwl.find(prefix,"nbCol"); - _nbCol = atoi(nbCol_str); - - // SRtoGR polynomial reference - const char* SrToGr_R0_str = kwl.find(prefix,"SrToGr_R0"); - _SrToGr_R0 = atof(SrToGr_R0_str); - - // number of SRtoGR coefficients - const char* SrToGr_coeffs_number_str = kwl.find(prefix,"SrToGr_coeffs_number"); - int srToGr_coeffs_number = atoi(SrToGr_coeffs_number_str); - - // SRtoGR coefficients and exponents - char name[64]; - double coeff ; - int exponent ; - for(int i=0;i<srToGr_coeffs_number;i++) - { - sprintf(name,"SrToGr_coeffs_%i",i); - const char* coeff_str = kwl.find(prefix,name); - coeff = atof(coeff_str); - _SrToGr_coeffs.push_back(coeff); - sprintf(name,"SrToGr_exps_%i",i); - const char* exp_str = kwl.find(prefix,name); - exponent = atoi(exp_str); - _SrToGr_exponent.push_back(exponent); - } - - // ALTERNATIVE to provided coefficients - - // Range time for first mid and last pixel - std::string orbitDirection(kwl.find(prefix,"orbitDirection")) ; - double t1, t2, t3 ; - if (orbitDirection=="DESCENDING") { - t3 = atof(kwl.find("start_rng")); - t2 = atof(kwl.find("sc_rng")); - t1 = atof(kwl.find("end_rng")); - } - else { - t1 = atof(kwl.find("start_rng")); - t2 = atof(kwl.find("sc_rng")); - t3 = atof(kwl.find("end_rng")); - } - - // Range pixels numbers corresponding - double x1 = 0.0; - double x2 = atof(kwl.find("sc_pix")); - double x3 = 2.0*(x2+1.0) -1.0 ; - - _alt_srgr_coefset[0] = t1; - _alt_srgr_coefset[1] = ((t2-t1)/(x2*x2)+(t1-t3)/(x3*x3))/((1.0/x2)-(1.0/x3)); - _alt_srgr_coefset[2] = ((t2-t1)/x2 + (t1-t3)/x3)/(x2-x3); - - return true; -} - - -bool ossimTerraSarModel::UtcDateTimeStringToCivilDate(const std::string &utcString, CivilDateTime &outputDate) { - // conversion : - // ossimRadarSatModel handles string civil dates of the form yyyymmddhhmmssddd, - // while TSX date format is UTC (xs:dateTime) : yyyy-mm-ddThh:mm:ss(.s+)zzzz (where zzzz is the timeZone). - // Here, the timeZone is ignored. - if (utcString.size() < 19) return false ; - const char* stringUTCDate = utcString.c_str() ; - - char year_str[5]; - for (int i=0;i<4;i++) - { - year_str[i] = stringUTCDate[i]; - } - year_str[4] = '\0'; - - char month_str[3]; - for (int i=5;i<7;i++) - { - month_str[i-5] = stringUTCDate[i]; - } - month_str[2] = '\0'; - - char day_str[3]; - for (int i=8;i<10;i++) - { - day_str[i-8] = stringUTCDate[i]; - } - day_str[2] = '\0'; - - char hour_str[3]; - for (int i=11;i<13;i++) - { - hour_str[i-11] = stringUTCDate[i]; - } - hour_str[2] = '\0'; - - char min_str[3]; - for (int i=14;i<16;i++) - { - min_str[i-14] = stringUTCDate[i]; - } - min_str[2] = '\0'; - - char sec_str[3]; - for (int i=17;i<19;i++) - { - sec_str[i-17] = stringUTCDate[i]; - } - sec_str[2] = '\0'; - - char mili_str[4]={'0','0','0','\0'}; - if ((utcString.size() > 19)&& (stringUTCDate[19] == '.')) { - mili_str[0]=stringUTCDate[20]; - if ((utcString.size() > 21)&&(stringUTCDate[21] != ':')&&(stringUTCDate[21] != 'Z')) { - mili_str[1]=stringUTCDate[21]; - if ((utcString.size() > 22)&&(stringUTCDate[22] != ':')&&(stringUTCDate[22] != 'Z')) { - mili_str[2]=stringUTCDate[22]; - } - } - } - - int hour = atoi(hour_str); - int min = atoi(min_str); - int sec = atoi(sec_str); - double mili = atof(mili_str); - - outputDate.set_year(atoi(year_str)); - outputDate.set_month(atoi(month_str)); - outputDate.set_day(atoi(day_str)); - outputDate.set_second(hour * 3600 + min * 60 + sec); - outputDate.set_decimal(mili/1000.0); - - return true ; -} - - - - -- GitLab