Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Purpose: Interface representing access to a PCIDSK RPC Segment 4 : * 5 : ****************************************************************************** 6 : * Copyright (c) 2009 7 : * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, 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 : //! Interface to PCIDSK RPC segment. 35 : class PCIDSKRPCSegment 36 : { 37 : public: 38 : 39 : // Get the X and Y RPC coefficients 40 : virtual std::vector<double> GetXNumerator(void) const = 0; 41 : virtual std::vector<double> GetXDenominator(void) const = 0; 42 : virtual std::vector<double> GetYNumerator(void) const = 0; 43 : virtual std::vector<double> GetYDenominator(void) const = 0; 44 : 45 : // Set the X and Y RPC Coefficients 46 : virtual void SetCoefficients(const std::vector<double>& xnum, 47 : const std::vector<double>& xdenom, const std::vector<double>& ynum, 48 : const std::vector<double>& ydenom) = 0; 49 : 50 : // Get the RPC offset/scale Coefficients 51 : virtual void GetRPCTranslationCoeffs(double& xoffset, double& xscale, 52 : double& yoffset, double& yscale, double& zoffset, double& zscale, 53 : double& pixoffset, double& pixscale, double& lineoffset, double& linescale) const = 0; 54 : 55 : // Set the RPC offset/scale Coefficients 56 : virtual void SetRPCTranslationCoeffs(const double xoffset, const double xscale, 57 : const double yoffset, const double yscale, 58 : const double zoffset, const double zscale, 59 : const double pixoffset, const double pixscale, 60 : const double lineoffset, const double linescale) = 0; 61 : 62 : // Get the adjusted X values 63 : virtual std::vector<double> GetAdjXValues(void) const = 0; 64 : // Get the adjusted Y values 65 : virtual std::vector<double> GetAdjYValues(void) const = 0; 66 : 67 : // Set the adjusted X/Y values 68 : virtual void SetAdjCoordValues(const std::vector<double>& xcoord, 69 : const std::vector<double>& ycoord) = 0; 70 : 71 : // Get whether or not this is a user-generated RPC model 72 : virtual bool IsUserGenerated(void) const = 0; 73 : // Set whether or not this is a user-generated RPC model 74 : virtual void SetUserGenerated(bool usergen) = 0; 75 : 76 : // Get whether the model has been adjusted 77 : virtual bool IsNominalModel(void) const = 0; 78 : // Set whether the model has been adjusted 79 : virtual void SetIsNominalModel(bool nominal) = 0; 80 : 81 : // Get sensor name 82 : virtual std::string GetSensorName(void) const = 0; 83 : // Set sensor name 84 : virtual void SetSensorName(const std::string& name) = 0; 85 : 86 : // Output projection information of RPC Model 87 : // Get the Geosys String 88 : virtual void GetMapUnits(std::string& map_units, std::string& proj_parms) const = 0; 89 : // Set the Geosys string 90 : virtual void SetMapUnits(std::string const& map_units, std::string const& proj_parms) = 0; 91 : 92 : // Get the number of lines 93 : virtual unsigned int GetLines(void) const = 0; 94 : 95 : // Get the number of pixels 96 : virtual unsigned int GetPixels(void) const = 0; 97 : 98 : // Set the number of lines/pixels 99 : virtual void SetRasterSize(const unsigned int lines, const unsigned int pixels) = 0; 100 : 101 : // Set/get the downsample factor 102 : virtual void SetDownsample(const unsigned int downsample) = 0; 103 : virtual unsigned int GetDownsample(void) const = 0; 104 : 105 : // TODO: Setting/getting detailed projection params (just GCTP params?) 106 : 107 : // Virtual destructor 108 0 : virtual ~PCIDSKRPCSegment() {} 109 : }; 110 : } 111 : 112 : #endif // INCLUDE_PCIDSK_PCIDSK_RPC_H