OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimNitfRpcBase.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Garrett Potts
8 //
9 // Description: Nitf base support data class for RPC tags.
10 //
11 // Rational Polynomial Coefficient extension.
12 //
13 // See: http://164.214.2.51/ntb/baseline/docs/stdi0002/final.pdf
14 //
15 //********************************************************************
16 // $Id: ossimNitfRpcBase.h 22013 2012-12-19 17:37:20Z dburken $
17 #ifndef ossimNitfRpcBase_HEADER
18 #define ossimNitfRpcBase_HEADER 1
21 
23 {
24  public:
25  enum
26  {
27  SUCCESS_SIZE = 1,
28  ERROR_BIAS_SIZE = 7,
29  ERR_RAND_SIZE = 7,
30  LINE_OFFSET_SIZE = 6,
31  SAMPLE_OFFSET_SIZE = 5,
32  GEODETIC_LAT_OFFSET_SIZE = 8,
33  GEODETIC_LON_OFFSET_SIZE = 9,
34  GEODETIC_HEIGHT_OFFSET_SIZE = 5,
35  LINE_SCALE_SIZE = 6,
36  SAMPLE_SCALE_SIZE = 5,
37  GEODETIC_LAT_SCALE_SIZE = 8,
38  GEODETIC_LON_SCALE_SIZE = 9,
39  GEODETIC_HEIGHT_SCALE_SIZE = 5,
40  LINE_NUMERATOR_COEFFICIENT_SIZE = 12,
41  LINE_NUMERATOR_COEFFICIENT_COUNT = 20,
42  LINE_DENOMINATOR_COEFFICIENT_SIZE = 12,
43  LINE_DENOMINATOR_COEFFICIENT_COUNT = 20,
44  SAMPLE_NUMERATOR_COEFFICIENT_SIZE = 12,
45  SAMPLE_NUMERATOR_COEFFICIENT_COUNT = 20,
46  SAMPLE_DENOMINATOR_COEFFICIENT_SIZE = 12,
47  SAMPLE_DENOMINATOR_COEFFICIENT_COUNT = 20
48  // -----
49  // 1041
50  };
51 
54 
60  virtual void parseStream(std::istream& in);
61 
67  virtual void writeStream(std::ostream& out);
68 
72  virtual void clearFields();
73 
77  virtual void setRpcModelParams(ossimRefPtr<ossimRpcModel> rpc);
78 
82  bool getSuccess()const;
83 
85  void setSuccess(bool success);
86 
88  ossimString getErrorBias()const;
89 
90  //---
91  // The set methods below taking ossimString args will truncate and
92  // pad with spaces, as necessary, to match enumed size.
93  //---
94 
99  void setErrorBias(const ossim_float64& errorBias);
100 
102  void setErrorBias(const ossimString& errorBias);
103 
105  ossimString getErrorRand()const;
106 
111  void setErrorRand(const ossim_float64& errorRand);
112 
113 
115  void setErrorRand(const ossimString& errorRand);
116 
118  ossimString getLineOffset()const;
119 
123  void setLineOffset(ossim_uint32 lineOffset);
124 
128  void setLineOffset(const ossimString& lineOffset);
129 
131  ossimString getSampleOffset()const;
132 
137  void setSampleOffset(ossim_uint32 sampleOffset);
138 
140  void setSampleOffset(const ossimString& sampleOffset);
141 
143  ossimString getGeodeticLatOffset()const;
144 
149  void setGeodeticLatOffset(const ossim_float64& geodeticLatOffset);
150 
155  void setGeodeticLatOffset(const ossimString& geodeticLatOffset);
156 
158  ossimString getGeodeticLonOffset()const;
159 
164  void setGeodeticLonOffset(const ossim_float64& geodeticLonOffset);
165 
169  void setGeodeticLonOffset(const ossimString& geodeticLonOffset);
170 
172  ossimString getGeodeticHeightOffset()const;
173 
178  void setGeodeticHeightOffset(ossim_int32 geodeticHeightOffset);
179 
181  void setGeodeticHeightOffset(const ossimString& geodeticHeightOffset);
182 
184  ossimString getLineScale()const;
185 
190  void setLineScale(ossim_uint32 lineScale);
191 
195  void setLineScale(const ossimString& lineScale);
196 
200  ossimString getSampleScale()const;
201 
206  void setSampleScale(ossim_uint32 sampleScale);
207 
211  void setSampleScale(const ossimString& sampleScale);
212 
214  ossimString getGeodeticLatScale()const;
215 
220  void setGeodeticLatScale(const ossim_float64& geodeticLatScale);
221 
225  void setGeodeticLatScale(const ossimString& geodeticLatScale);
226 
228  ossimString getGeodeticLonScale()const;
229 
234  void setGeodeticLonScale(const ossim_float64& geodeticLonScale);
235 
239  void setGeodeticLonScale(const ossimString& geodeticLonScale);
240 
242  ossimString getGeodeticHeightScale()const;
243 
248  void setGeodeticHeightScale(ossim_int32 geodeticHeightScale);
249 
253  void setGeodeticHeightScale(const ossimString& geodeticHeightScale);
254 
261  ossimString getLineNumeratorCoeff(ossim_uint32 idx)const;
262 
270  void setLineNumeratorCoeff(const std::vector<ossim_float64>& coeff);
271 
279  void setLineNumeratorCoeff(ossim_uint32 idx,
280  const ossimString& coeff);
281 
288  ossimString getLineDenominatorCoeff(ossim_uint32 idx)const;
289 
297  void setLineDenominatorCoeff(const std::vector<ossim_float64>& coeff);
298 
306  void setLineDenominatorCoeff(ossim_uint32 idx,
307  const ossimString& coeff);
308 
315  ossimString getSampleNumeratorCoeff(ossim_uint32 idx)const;
316 
324  void setSampleNumeratorCoeff(const std::vector<ossim_float64>& coeff);
325 
333  void setSampleNumeratorCoeff(ossim_uint32 idx,
334  const ossimString& coeff);
335 
342  ossimString getSampleDenominatorCoeff(ossim_uint32 idx)const;
343 
351  void setSampleDenominatorCoeff(const std::vector<ossim_float64>& coeff);
352 
360  void setSampleDenominatorCoeff(ossim_uint32 idx,
361  const ossimString& coeff);
362 
369  virtual std::ostream& print(std::ostream& out,
370  const std::string& prefix=std::string()) const;
371 
372  virtual void setProperty(ossimRefPtr<ossimProperty> property);
373  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
374  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
375 
376  bool loadState(const ossimKeywordlist& kwl, const char* prefix);
377 
378 protected:
379 
388  char theSuccess[SUCCESS_SIZE+1];
389 
400  char theErrorBias[ERROR_BIAS_SIZE+1];
401 
410  char theErrRand[ERR_RAND_SIZE+1];
411 
419  char theLineOffset[LINE_OFFSET_SIZE+1];
420 
428  char theSampleOffset[SAMPLE_OFFSET_SIZE+1];
429 
437  char theGeodeticLatOffset[GEODETIC_LAT_OFFSET_SIZE+1];
438 
446  char theGeodeticLonOffset[GEODETIC_LON_OFFSET_SIZE+1];
447 
455  char theGeodeticHeightOffset[GEODETIC_HEIGHT_OFFSET_SIZE+1];
456 
465  char theLineScale[LINE_SCALE_SIZE+1];
466 
475  char theSampleScale[SAMPLE_SCALE_SIZE+1];
476 
484  char theGeodeticLatScale[GEODETIC_LAT_SCALE_SIZE+1];
485 
493  char theGeodeticLonScale[GEODETIC_LON_SCALE_SIZE+1];
494 
502  char theGeodeticHeightScale[GEODETIC_HEIGHT_SCALE_SIZE+1];
503 
513  std::vector<ossimString> theLineNumeratorCoefficient;
514 
524  std::vector<ossimString> theLineDenominatorCoefficient;
525 
535  std::vector<ossimString> theSampleNumeratorCoefficient;
536 
546  std::vector<ossimString> theSampleDenominatorCoefficient;
547 
548 TYPE_DATA
549 };
550 
551 #endif
std::vector< ossimString > theLineNumeratorCoefficient
FIELD: LINE_NUM_COEFF_1 through LINE_NUM_COEFF_20.
virtual void writeStream(ossim::ostream &out)=0
std::vector< ossimString > theSampleNumeratorCoefficient
FIELD: SAMP_NUM_COEFF_1 through SAMP_NUM_COEFF_20.
Represents serializable keyword/value map.
virtual void parseStream(ossim::istream &in)=0
This will allow the user defined data to parse the stream.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
virtual std::ostream & print(std::ostream &out, const std::string &prefix=std::string()) const
Pure virtual print method that outputs a key/value type format adding prefix to keys.
std::vector< ossimString > theSampleDenominatorCoefficient
FIELD: SAMP_DEN_COEFF_1 through SAMP_DEN_COEFF_20.
double ossim_float64
virtual void setProperty(ossimRefPtr< ossimProperty > property)
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
#define OSSIM_DLL
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
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.
Definition: ossimIosFwd.h:23
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
int ossim_int32