pcidsk_rpc.h

00001 /******************************************************************************
00002  *
00003  * Purpose: Interface representing access to a PCIDSK RPC Segment
00004  * 
00005  ******************************************************************************
00006  * Copyright (c) 2009
00007  * PCI Geomatics, 50 West Wilmot Street, Richmond Hill, Ont, Canada
00008  *
00009  * Permission is hereby granted, free of charge, to any person obtaining a
00010  * copy of this software and associated documentation files (the "Software"),
00011  * to deal in the Software without restriction, including without limitation
00012  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00013  * and/or sell copies of the Software, and to permit persons to whom the
00014  * Software is furnished to do so, subject to the following conditions:
00015  *
00016  * The above copyright notice and this permission notice shall be included
00017  * in all copies or substantial portions of the Software.
00018  *
00019  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00020  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00021  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00022  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00023  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00024  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00025  * DEALINGS IN THE SOFTWARE.
00026  ****************************************************************************/
00027 #ifndef __INCLUDE_PCIDSK_PCIDSK_RPC_H
00028 #define __INCLUDE_PCIDSK_PCIDSK_RPC_H
00029 
00030 #include <vector>
00031 #include <string>
00032 
00033 namespace PCIDSK {
00035     class PCIDSKRPCSegment 
00036     {
00037     public:
00038         
00039         // Get the X and Y RPC coefficients
00040         virtual std::vector<double> GetXNumerator(void) const = 0;
00041         virtual std::vector<double> GetXDenominator(void) const = 0;
00042         virtual std::vector<double> GetYNumerator(void) const = 0;
00043         virtual std::vector<double> GetYDenominator(void) const = 0;
00044         
00045         // Set the X and Y RPC Coefficients
00046         virtual void SetCoefficients(const std::vector<double>& xnum,
00047             const std::vector<double>& xdenom, const std::vector<double>& ynum,
00048             const std::vector<double>& ydenom) = 0;
00049             
00050         // Get the RPC offset/scale Coefficients
00051         virtual void GetRPCTranslationCoeffs(double& xoffset, double& xscale,
00052             double& yoffset, double& yscale, double& zoffset, double& zscale,
00053             double& pixoffset, double& pixscale, double& lineoffset, double& linescale) const = 0;
00054             
00055         // Set the RPC offset/scale Coefficients
00056         virtual void SetRPCTranslationCoeffs(const double xoffset, const double xscale,
00057             const double yoffset, const double yscale,
00058             const double zoffset, const double zscale,
00059             const double pixoffset, const double pixscale,
00060             const double lineoffset, const double linescale) = 0;
00061 
00062         // Get the adjusted X values
00063         virtual std::vector<double> GetAdjXValues(void) const = 0;
00064         // Get the adjusted Y values
00065         virtual std::vector<double> GetAdjYValues(void) const = 0;
00066         
00067         // Set the adjusted X/Y values
00068         virtual void SetAdjCoordValues(const std::vector<double>& xcoord,
00069             const std::vector<double>& ycoord) = 0;
00070 
00071         // Get whether or not this is a user-generated RPC model
00072         virtual bool IsUserGenerated(void) const = 0;
00073         // Set whether or not this is a user-generated RPC model
00074         virtual void SetUserGenerated(bool usergen) = 0;
00075         
00076         // Get whether the model has been adjusted
00077         virtual bool IsNominalModel(void) const = 0;
00078         // Set whether the model has been adjusted
00079         virtual void SetIsNominalModel(bool nominal) = 0;
00080         
00081         // Get sensor name
00082         virtual std::string GetSensorName(void) const = 0;
00083         // Set sensor name
00084         virtual void SetSensorName(const std::string& name) = 0;
00085         
00086         // Output projection information of RPC Model
00087         // Get the Geosys String
00088         virtual std::string GetGeosysString(void) const = 0;
00089         // Set the Geosys string
00090         virtual void SetGeosysString(const std::string& geosys) = 0;
00091         
00092         // Get the number of lines
00093         virtual unsigned int GetLines(void) const = 0;
00094         
00095         // Get the number of pixels
00096         virtual unsigned int GetPixels(void) const = 0;
00097         
00098         // Set the number of lines/pixels
00099         virtual void SetRasterSize(const unsigned int lines, const unsigned int pixels) = 0;
00100         
00101         // TODO: Setting/getting detailed projection params (just GCTP params?)
00102 
00103         // Virtual destructor
00104         virtual ~PCIDSKRPCSegment() {}
00105     };
00106 }
00107 
00108 #endif // __INCLUDE_PCIDSK_PCIDSK_RPC_H

Generated on Fri Jul 16 16:01:31 2010 for libpcidsk by  doxygen 1.5.1