1 : /******************************************************************************
2 : *
3 : * Purpose: Interface representing access to a PCIDSK RPC Segment
4 : *
5 : ******************************************************************************
6 : * Copyright (c) 2009
7 : * PCI Geomatics, 50 West Wilmot Street, Richmond Hill, Ont, Canada
8 : *
9 : * Permission is hereby granted, free of charge, to any person obtaining a
10 : * copy of this software and associated documentation files (the "Software"),
11 : * to deal in the Software without restriction, including without limitation
12 : * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 : * and/or sell copies of the Software, and to permit persons to whom the
14 : * Software is furnished to do so, subject to the following conditions:
15 : *
16 : * The above copyright notice and this permission notice shall be included
17 : * in all copies or substantial portions of the Software.
18 : *
19 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 : * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 : * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 : * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 : * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 : * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 : * DEALINGS IN THE SOFTWARE.
26 : ****************************************************************************/
27 : #ifndef __INCLUDE_PCIDSK_PCIDSK_RPC_H
28 : #define __INCLUDE_PCIDSK_PCIDSK_RPC_H
29 :
30 : #include <vector>
31 : #include <string>
32 :
33 : namespace PCIDSK {
34 : class PCIDSKRPCSegment
35 0 : {
36 : public:
37 :
38 : // Get the X and Y RPC coefficients
39 : virtual std::vector<double> GetXNumerator(void) const = 0;
40 : virtual std::vector<double> GetXDenominator(void) const = 0;
41 : virtual std::vector<double> GetYNumerator(void) const = 0;
42 : virtual std::vector<double> GetYDenominator(void) const = 0;
43 :
44 : // Set the X and Y RPC Coefficients
45 : virtual void SetCoefficients(const std::vector<double>& xnum,
46 : const std::vector<double>& xdenom, const std::vector<double>& ynum,
47 : const std::vector<double>& ydenom) = 0;
48 :
49 : // Get the RPC offset/scale Coefficients
50 : virtual void GetRPCTranslationCoeffs(double& xoffset, double& xscale,
51 : double& yoffset, double& yscale, double& zoffset, double& zscale,
52 : double& pixoffset, double& pixscale, double& lineoffset, double& linescale) const = 0;
53 :
54 : // Set the RPC offset/scale Coefficients
55 : virtual void SetRPCTranslationCoeffs(const double xoffset, const double xscale,
56 : const double yoffset, const double yscale,
57 : const double zoffset, const double zscale,
58 : const double pixoffset, const double pixscale,
59 : const double lineoffset, const double linescale) = 0;
60 :
61 : // Get the adjusted X values
62 : virtual std::vector<double> GetAdjXValues(void) const = 0;
63 : // Get the adjusted Y values
64 : virtual std::vector<double> GetAdjYValues(void) const = 0;
65 :
66 : // Set the adjusted X/Y values
67 : virtual void SetAdjCoordValues(const std::vector<double>& xcoord,
68 : const std::vector<double>& ycoord) = 0;
69 :
70 : // Get whether or not this is a user-generated RPC model
71 : virtual bool IsUserGenerated(void) const = 0;
72 : // Set whether or not this is a user-generated RPC model
73 : virtual void SetUserGenerated(bool usergen) = 0;
74 :
75 : // Get whether the model has been adjusted
76 : virtual bool IsNominalModel(void) const = 0;
77 : // Set whether the model has been adjusted
78 : virtual void SetIsNominalModel(bool nominal) = 0;
79 :
80 : // Get sensor name
81 : virtual std::string GetSensorName(void) const = 0;
82 : // Set sensor name
83 : virtual void SetSensorName(const std::string& name) = 0;
84 :
85 : // Output projection information of RPC Model
86 : // Get the Geosys String
87 : virtual std::string GetGeosysString(void) const = 0;
88 : // Set the Geosys string
89 : virtual void SetGeosysString(const std::string& geosys) = 0;
90 :
91 : // Get the number of lines
92 : virtual unsigned int GetLines(void) const = 0;
93 :
94 : // Get the number of pixels
95 : virtual unsigned int GetPixels(void) const = 0;
96 :
97 : // Set the number of lines/pixels
98 : virtual void SetRasterSize(const unsigned int lines, const unsigned int pixels) = 0;
99 :
100 : // TODO: Setting/getting detailed projection params (just GCTP params?)
101 :
102 : // Virtual destructor
103 0 : virtual ~PCIDSKRPCSegment() {}
104 : };
105 : }
106 :
107 : #endif // __INCLUDE_PCIDSK_PCIDSK_RPC_H
|