32 static const ossimString HEIGHT_OFF_KW =
"HEIGHT_OFF";
33 static const ossimString LINE_SCALE_KW =
"LINE_SCALE";
34 static const ossimString SAMP_SCALE_KW =
"SAMP_SCALE";
35 static const ossimString LAT_SCALE_KW =
"LAT_SCALE";
36 static const ossimString LONG_SCALE_KW =
"LONG_SCALE";
37 static const ossimString HEIGHT_SCALE_KW =
"HEIGHT_SCALE";
38 static const ossimString LINE_NUM_COEFF_KW =
"LINE_NUM_COEFF_";
39 static const ossimString LINE_DEN_COEFF_KW =
"LINE_DEN_COEFF_";
40 static const ossimString SAMP_NUM_COEFF_KW =
"SAMP_NUM_COEFF_";
41 static const ossimString SAMP_DEN_COEFF_KW =
"SAMP_DEN_COEFF_";
182 const char* zeroString =
"+0.000000E+0";
214 vector<double> coef (20);
215 for(idx = 0; idx < 20; ++idx)
219 for(idx = 0; idx < 20; ++idx)
223 for(idx = 0; idx < 20; ++idx)
227 for(idx = 0; idx < 20; ++idx)
324 if ( (geodeticLatOffset >= -90.0) && (geodeticLatOffset <= 90.0) )
349 if ( (geodeticLonOffset >= -180.0) && (geodeticLonOffset <= 180.0) )
429 if (geodeticLatScale == 0.0)
435 if ( (geodeticLatScale >= -90.0) && (geodeticLatScale <= 90.0) )
458 if (geodeticLonScale == 0.0)
464 if ( (geodeticLonScale >= -180.0) && (geodeticLonScale <= 180.0) )
502 #define ASSERT_ARRAY_CONSTRAINT(expression, idx, correctedValue, module) \ 503 assert(expression); \ 504 ossimSetError(getClassName().c_str(), ossimErrorCodes::OSSIM_ERROR, \ 505 "File %s line %d Module %s Error:\nArray index constraint error.\n", \ 506 __FILE__, __LINE__, module); \ 507 if (! (expression) ) idx = correctedValue; 520 <<
"ossimNitfRpcBase::getLineNumeratorCoeff range error!" 530 const std::vector<ossim_float64>& coeff)
538 <<
"ossimNitfRpcBase::setLineNumeratorCoeff WARNING:" 539 <<
"\nArray not of correct size!" 561 <<
"ossimNitfRpcBase::setLineNumeratorCoeff range error!" 577 <<
"ossimNitfRpcBase::getLineDenominatorCoeff range error!" 586 const std::vector<ossim_float64>& coeff)
594 <<
"ossimNitfRpcBase::setLineDenominatorCoeff WARNING:" 595 <<
"\nArray not of correct size!" 617 <<
"ossimNitfRpcBase::setLineDenominatorCoeff range error!" 633 <<
"ossimNitfRpcBase::getSampleNumeratorCoeff range error!" 641 const std::vector<ossim_float64>& coeff)
649 <<
"ossimNitfRpcBase::setSampleNumeratorCoeff WARNING:" 650 <<
"\nArray not of correct size!" 672 <<
"ossimNitfRpcBase::setSampleNumeratorCoeff range error!" 688 <<
"ossimNitfRpcBase::getSampleDenominatorCoeff range error!" 697 const std::vector<ossim_float64>& coeff)
705 <<
"ossimNitfRpcBase::setSampleDenominatorCoeff WARNING:" 706 <<
"\nArray not of correct size!" 728 <<
"ossimNitfRpcBase::setSampleDenominatorCoeff range error!" 739 const std::string& prefix)
const 741 std::string pfx = prefix;
745 out << setiosflags(std::ios::left)
746 << pfx << std::setw(24) <<
"CETAG:" 748 << pfx << std::setw(24) <<
"CEL:" 750 << pfx << std::setw(24) <<
"SUCCESS:" 752 << pfx << std::setw(24) <<
"ERR_BIAS:" 754 << pfx << std::setw(24) <<
"ERR_RAND:" 756 << pfx << std::setw(24) <<
"LINE_OFF:" 758 << pfx << std::setw(24) <<
"SAMP_OFF:" 760 << pfx << std::setw(24) <<
"LAT_OFF:" 762 << pfx << std::setw(24) <<
"LONG_OFF:" 764 << pfx << std::setw(24) <<
"HEIGHT_OFF:" 766 << pfx << std::setw(24) <<
"LINE_SCALE:" 768 << pfx << std::setw(24)
770 << pfx << std::setw(24) <<
"LAT_SCALE:" 772 << pfx << std::setw(24) <<
"LONG_SCALE:" 774 << pfx << std::setw(24) <<
"HEIGHT_SCALE:" 782 s =
"LINE_NUM_COEFF_";
785 out << pfx << std::setw(24) << s
791 s =
"LINE_DEN_COEFF_";
794 out << pfx << std::setw(24) << s
800 s =
"SAMP_NUM_COEFF_";
803 out << pfx << std::setw(24) << s
809 s =
"SAMP_DEN_COEFF_";
812 out << pfx << std::setw(24) << s
829 if(name == ERR_BIAS_KW)
833 else if(name == ERR_RAND_KW)
837 else if(name == LINE_OFF_KW)
841 else if(name == SAMP_OFF_KW)
845 else if(name == LAT_OFF_KW)
849 else if(name == LONG_OFF_KW)
853 else if(name == HEIGHT_OFF_KW)
857 else if(name == LINE_SCALE_KW)
861 else if(name == SAMP_SCALE_KW)
865 else if(name == LAT_SCALE_KW)
869 else if(name == LONG_SCALE_KW)
873 else if(name == HEIGHT_SCALE_KW)
877 else if(name.
contains(LINE_NUM_COEFF_KW))
882 name.
end()).toUInt32();
890 else if(name.
contains(LINE_DEN_COEFF_KW))
895 name.
end()).toUInt32();
903 else if(name.
contains(SAMP_NUM_COEFF_KW))
908 name.
end()).toUInt32();
916 else if(name.
contains(SAMP_DEN_COEFF_KW))
921 name.
end()).toUInt32();
937 propertyNames.push_back(ERR_BIAS_KW);
938 propertyNames.push_back(ERR_RAND_KW);
939 propertyNames.push_back(LINE_OFF_KW);
940 propertyNames.push_back(SAMP_OFF_KW);
941 propertyNames.push_back(LAT_OFF_KW);
942 propertyNames.push_back(LONG_OFF_KW);
943 propertyNames.push_back(HEIGHT_OFF_KW);
944 propertyNames.push_back(LINE_SCALE_KW);
945 propertyNames.push_back(SAMP_SCALE_KW);
946 propertyNames.push_back(LAT_SCALE_KW);
947 propertyNames.push_back(LONG_SCALE_KW);
948 propertyNames.push_back(HEIGHT_SCALE_KW);
950 for(idx = 1; idx <= 20; ++idx)
954 for(idx = 1; idx <= 20; ++idx)
958 for(idx = 1; idx <= 20; ++idx)
962 for(idx = 1; idx <= 20; ++idx)
973 if(!result)
return result;
974 lookup = kwl.
find(prefix,
"SUCCESS");
979 lookup = kwl.
find(prefix,
"ERR_BIAS");
984 lookup = kwl.
find(prefix,
"ERR_RAND");
989 lookup = kwl.
find(prefix,
"LINE_OFF");
994 lookup = kwl.
find(prefix,
"SAMP_OFF");
999 lookup = kwl.
find(prefix,
"LAT_OFF");
1004 lookup = kwl.
find(prefix,
"LONG_OFF");
1009 lookup = kwl.
find(prefix,
"HEIGHT_OFF");
1014 lookup = kwl.
find(prefix,
"LINE_SCALE");
1019 lookup = kwl.
find(prefix,
"SAMP_SCALE");
1024 lookup = kwl.
find(prefix,
"LAT_SCALE");
1029 lookup = kwl.
find(prefix,
"LONG_SCALE");
1034 lookup = kwl.
find(prefix,
"HEIGHT_SCALE");
1042 lookup = kwl.
find(prefix, line_num_coeff);
1051 lookup = kwl.
find(prefix, line_den_coeff);
1060 lookup = kwl.
find(prefix, samp_num_coeff);
1069 lookup = kwl.
find(prefix, samp_den_coeff);
ossimString getLineScale() const
double theSampNumCoef[20]
std::vector< ossimString > theLineNumeratorCoefficient
FIELD: LINE_NUM_COEFF_1 through LINE_NUM_COEFF_20.
virtual const std::string & getTagName() const
This will return the name of the registered tag for this user defined header.
virtual void parseStream(std::istream &in)
Parse method.
ossimString getGeodeticHeightScale() const
bool loadState(const ossimKeywordlist &kwl, const char *prefix)
char theGeodeticLonScale[GEODETIC_LON_SCALE_SIZE+1]
FIELD: LON_SCALE.
std::vector< ossimString > theSampleNumeratorCoefficient
FIELD: SAMP_NUM_COEFF_1 through SAMP_NUM_COEFF_20.
ossimString getLineDenominatorCoeff(ossim_uint32 idx) const
Represents serializable keyword/value map.
char theErrorBias[ERROR_BIAS_SIZE+1]
FIELD: ERR_BIAS.
RTTI_DEF1(ossimNitfRpcBase, "ossimNitfRpcBase", ossimNitfRegisteredTag)
const char * find(const char *key) const
char theLineScale[LINE_SCALE_SIZE+1]
FIELD: LINE_SCALE.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
bool contains(char aChar) const
virtual void writeStream(std::ostream &out)
Write method.
static ossimString toString(bool aValue)
Numeric to string methods.
virtual void setRpcModelParams(ossimRefPtr< ossimRpcModel > rpc)
For generating the RPC tag from existing RPC Model.
void setLineScale(ossim_uint32 lineScale)
ossimString getSampleOffset() const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
std::vector< ossimString > theSampleDenominatorCoefficient
FIELD: SAMP_DEN_COEFF_1 through SAMP_DEN_COEFF_20.
void setSuccess(bool success)
void setGeodeticLatOffset(const ossim_float64 &geodeticLatOffset)
void setSampleScale(ossim_uint32 sampleScale)
virtual void setTagLength(ossim_uint32 length)
Set the tag length.
void setSampleDenominatorCoeff(const std::vector< ossim_float64 > &coeff)
char theSampleScale[SAMPLE_SCALE_SIZE+1]
FIELD: SAMP_SCALE.
std::string::iterator end()
ossimNitfRpcBase()
default constructor
ossimString getSampleDenominatorCoeff(ossim_uint32 idx) const
void setGeodeticLatScale(const ossim_float64 &geodeticLatScale)
double theSampDenCoef[20]
ossimString getLineOffset() const
double theLineNumCoef[20]
void setGeodeticLonOffset(const ossim_float64 &geodeticLonOffset)
static ossimString convertToDoubleString(const ossim_float64 &aValue, ossim_uint32 precision, ossim_uint32 size)
This method takes a value and converts to a string of size with requested precision with a '0' fill...
char theGeodeticHeightScale[GEODETIC_HEIGHT_SCALE_SIZE+1]
FIELD: HEIGHT_SCALE.
ossimString getGeodeticHeightOffset() const
void setSampleNumeratorCoeff(const std::vector< ossim_float64 > &coeff)
void setErrorRand(const ossim_float64 &errorRand)
char theErrRand[ERR_RAND_SIZE+1]
FIELD ERR_RAND.
std::string::size_type length() const
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
static ossimString convertToScientificString(const ossim_float64 &aValue, ossim_uint32 size)
This method takes a value and a size(or width) and converts it to a scientific notation sting in the ...
std::string::iterator begin()
char theGeodeticLatOffset[GEODETIC_LAT_OFFSET_SIZE+1]
FIELD: LAT_OFF.
unsigned int ossim_uint32
void setSampleOffset(ossim_uint32 sampleOffset)
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
Print method that outputs a key/value type format adding prefix to keys.
void setGeodeticLonScale(const ossim_float64 &geodeticLonScale)
char theSuccess[SUCCESS_SIZE+1]
FIELD: SUCCESS.
char theGeodeticLatScale[GEODETIC_LAT_SCALE_SIZE+1]
FIELD: LAT_SCALE.
void setLineOffset(ossim_uint32 lineOffset)
char theGeodeticHeightOffset[GEODETIC_HEIGHT_OFFSET_SIZE+1]
FIELD: HEIGHT_OFF.
ossimString getErrorBias() const
ossimString getLineNumeratorCoeff(ossim_uint32 idx) const
static ossimString convertToUIntString(ossim_uint32 aValue, ossim_uint32 size)
This method takes a value and converts to a string of size with with a '0' fill.
void setErrorBias(const ossim_float64 &errorBias)
std::basic_istream< char > istream
Base class for char input streams.
ossimString getSampleNumeratorCoeff(ossim_uint32 idx) const
virtual ossim_uint32 getSizeInBytes() const
Returns the length in bytes of the tag from the CEL or REL field.
ossimString getGeodeticLatScale() const
virtual void clearFields()
Clears all string fields within the record to some default nothingness.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossimString getErrorRand() const
char theGeodeticLonOffset[GEODETIC_LON_OFFSET_SIZE+1]
FIELD: LONG_OFF.
char theSampleOffset[SAMPLE_OFFSET_SIZE+1]
FIELD: SAMP_OFF.
char theLineOffset[LINE_OFFSET_SIZE+1]
FIELD: LINE_OFF.
ossimString getGeodeticLonOffset() const
static ossimString convertToIntString(ossim_int32 aValue, ossim_uint32 size)
Just like convertToUIntString only takes a signed value.
void setLineDenominatorCoeff(const std::vector< ossim_float64 > &coeff)
virtual void setProperty(ossimRefPtr< ossimProperty > property)
ossimString getSampleScale() const
double theLineDenCoef[20]
ossimString getGeodeticLatOffset() const
ossimString getGeodeticLonScale() const
void setGeodeticHeightScale(ossim_int32 geodeticHeightScale)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::vector< ossimString > theLineDenominatorCoefficient
FIELD: LINE_DEN_COEFF_1 through LINE_DEN_COEFF_20.
std::basic_ostream< char > ostream
Base class for char output streams.
void setLineNumeratorCoeff(const std::vector< ossim_float64 > &coeff)
void setGeodeticHeightOffset(ossim_int32 geodeticHeightOffset)