Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

LambertConformalConic.h

Go to the documentation of this file.
00001 // SRM_SDK_VER_GOES_HERE
00002 

00004 

00006 
00007 // SRM_OTHERS_GOES_HERE
00008 
00009 // $Id: LambertConformalConic.h,v 1.14 2006/02/06 18:30:19 shend Exp $
00010 
00011 #ifndef _LambertConformalConic_h
00012 #define _LambertConformalConic_h
00013 
00019 #include "BaseSRF.h"
00020 #include "Coord.h"
00021 #include "Exception.h"
00022 
00023 namespace srm
00024 {
00025 
00026 
00033 class EXPORT_SRM_CPP_DLL SRF_LambertConformalConic: public BaseSRF_MapProjection
00034 {
00035 public:
00036 
00040     static SRF_LambertConformalConic* create( const SRM_ORM_Code orm,
00041                                          const SRM_RT_Code  rt,
00042                                          const SRM_LCC_Parameters &params );
00043 
00047     static SRF_LambertConformalConic* create( 
00048                                             SRM_ORM_Code orm,
00049                                             SRM_RT_Code  rt,
00050                                             SRM_Long_Float origin_longitude,
00051                                             SRM_Long_Float origin_latitude,
00052                                             SRM_Long_Float latitude1,
00053                                             SRM_Long_Float latitude2,
00054                                             SRM_Long_Float false_easting,
00055                                             SRM_Long_Float false_northing
00056                                         );
00057 
00061     static SRF_LambertConformalConic* create( SRM_SRF_Parameters_Info srf_params )
00062     {
00063         return create( srf_params.value.srf_template.orm_code,
00064                        srf_params.rt_code,
00065                        srf_params.value.srf_template.parameters.lcc_srf_parameters );
00066     }
00067 
00069     Coord3D* createCoordinate3D(SRM_Long_Float coord_comp1,
00070                                 SRM_Long_Float coord_comp2,
00071                                 SRM_Long_Float coord_comp3 );
00072  
00074     CoordSurf* createSurfaceCoordinate(SRM_Long_Float coord_surf_comp1,
00075                                        SRM_Long_Float coord_surf_comp2 );
00076  
00080     const SRM_LCC_Parameters &getSRFParameters() const;
00081 
00085     SRM_Long_Float get_origin_longitude() const;
00086 
00090     SRM_Long_Float get_origin_latitude() const;
00091 
00095     SRM_Long_Float get_latitude1() const;
00096 
00100     SRM_Long_Float get_latitude2() const;
00101 
00105     SRM_Long_Float get_false_easting() const;
00106 
00110     SRM_Long_Float get_false_northing() const;
00111 
00113     virtual bool isA( SRF_ClassType type ) const;
00114 
00115 
00117     virtual SRF_ClassType getClassType() const {
00118         return BaseSRF::SRF_TYP_LCC;
00119     }
00120 
00122     bool isEqual( const SRF_LambertConformalConic &srf ) const;
00123 
00124 
00128     SRF_LambertConformalConic* makeCopy() const;
00129 
00130 
00134     const char* toString();
00135 
00136 protected:
00137 
00138     friend class BaseSRF;
00139     friend class BaseSRF_3D;
00140     friend class BaseSRF_WithEllipsoidalHeight;
00141     SRF_LambertConformalConic( void *impl ) : BaseSRF_MapProjection(impl) {} 
00142     SRF_LambertConformalConic &operator =( const BaseSRF & ) { return *this; } 
00143     virtual ~SRF_LambertConformalConic() {} 
00144 
00145 };
00146 
00147 
00148 inline bool SRF_LambertConformalConic::isA( SRF_ClassType type ) const
00149 {
00150     if (type == BaseSRF::SRF_TYP_LCC)
00151          return true;
00152     else
00153          return BaseSRF_MapProjection::isA(type);
00154 };
00155 
00156 
00158 typedef SRF_LambertConformalConic SRF_LCC;
00159 
00160 
00165 class EXPORT_SRM_CPP_DLL Coord3D_LambertConformalConic: public Coord3D
00166 {
00167 public:
00168 
00170     Coord3D_LambertConformalConic( SRF_LambertConformalConic *srf, 
00171         SRM_Long_Float easting = 0.0,
00172         SRM_Long_Float northing = 0.0,
00173         SRM_Long_Float ellipsoidal_height = 0.0 )
00174     : Coord3D(srf)
00175     {
00176         setComponentValues(easting, northing, ellipsoidal_height);
00177     }
00178 
00180     Coord3D_LambertConformalConic( const Coord3D_LambertConformalConic &coord )
00181     : Coord3D(coord._srf)
00182     {
00183         setComponentValues( coord._values[0], coord._values[1], coord._values[2] );
00184     }
00185 
00189     void copyTo( Coord3D_LambertConformalConic &coord ) const
00190     {
00191         if (coord._srf != _srf)
00192            throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00193 
00194         coord._values[0] = _values[0]; 
00195         coord._values[1] = _values[1]; 
00196         coord._values[2] = _values[2];
00197     }
00198 
00200     bool isEqual( const Coord3D_LambertConformalConic &coord ) const
00201     {
00202         return (_srf == coord._srf &&
00203                 _values[0] == coord._values[0] &&
00204                 _values[1] == coord._values[1] &&
00205                 _values[2] == coord._values[2] );
00206     }
00207 
00209     void setComponentValues( SRM_Long_Float easting, SRM_Long_Float northing, SRM_Long_Float ellipsoidal_height )
00210     {
00211         _values[0] = easting;
00212         _values[1] = northing;
00213         _values[2] = ellipsoidal_height;
00214     }
00215 
00217     SRM_Long_Float get_easting() const {
00218         return _values[0];
00219     }
00220 
00222     SRM_Long_Float get_northing() const {
00223         return _values[1];
00224     }
00225 
00227     SRM_Long_Float get_ellipsoidal_height() const {
00228         return _values[2];
00229     }
00230 
00232     void set_easting( SRM_Long_Float value ) {
00233         _values[0] = value;
00234     }
00235 
00237     void set_northing( SRM_Long_Float value ) {
00238         _values[1] = value;
00239     }
00240 
00242     void set_ellipsoidal_height( SRM_Long_Float value ) {
00243         _values[2] = value;
00244     }
00245 
00247     virtual bool isA( Coord_ClassType type ) const;
00248 
00249 
00251     virtual Coord_ClassType getClassType() const {
00252         return Coord::COORD_TYP_LCC;
00253     }
00254 
00255 };
00256 
00257 
00258 inline bool Coord3D_LambertConformalConic::isA( Coord_ClassType type ) const
00259 {
00260     if (type == Coord::COORD_TYP_LCC)
00261        return true;
00262     else
00263         return Coord3D::isA(type);
00264 };
00265 
00266 
00268 typedef Coord3D_LambertConformalConic Coord3D_LCC;
00269 
00270 
00275 class EXPORT_SRM_CPP_DLL CoordSurf_LambertConformalConic: public CoordSurf
00276 {
00277 public:
00278 
00280     CoordSurf_LambertConformalConic( SRF_LambertConformalConic *srf, 
00281         SRM_Long_Float easting = 0.0,
00282         SRM_Long_Float northing = 0.0 )
00283     : CoordSurf(srf)
00284     {
00285         setComponentValues(easting, northing);
00286     }
00287 
00289     CoordSurf_LambertConformalConic( const CoordSurf_LambertConformalConic &coord )
00290     : CoordSurf(coord._srf)
00291     {
00292         setComponentValues( coord._values[0], coord._values[1] );
00293     }
00294 
00298     void copyTo( CoordSurf_LambertConformalConic &coord ) const
00299     {
00300         if (coord._srf != _srf)
00301            throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00302 
00303         coord._values[0] = _values[0]; 
00304         coord._values[1] = _values[1]; 
00305     }
00306 
00308     bool isEqual( const CoordSurf_LambertConformalConic &coord ) const
00309     {
00310         return (_srf == coord._srf &&
00311                 _values[0] == coord._values[0] &&
00312                 _values[1] == coord._values[1] );
00313     }
00314 
00316     void setComponentValues( SRM_Long_Float easting, SRM_Long_Float northing )
00317     {
00318         _values[0] = easting;
00319         _values[1] = northing;
00320     }
00321 
00323     SRM_Long_Float get_easting() const {
00324         return _values[0];
00325     }
00326 
00328     SRM_Long_Float get_northing() const {
00329         return _values[1];
00330     }
00331 
00333     void set_easting( SRM_Long_Float value ) {
00334         _values[0] = value;
00335     }
00336 
00338     void set_northing( SRM_Long_Float value ) {
00339         _values[1] = value;
00340     }
00341 
00343     virtual bool isA( Coord_ClassType type ) const;
00344 
00345 
00347     virtual Coord_ClassType getClassType() const {
00348         return Coord::COORD_TYP_SURF_LCC;
00349     }
00350 
00351 };
00352 
00353 
00354 inline bool CoordSurf_LambertConformalConic::isA( Coord_ClassType type ) const
00355 {
00356     if (type == Coord::COORD_TYP_SURF_LCC)
00357        return true;
00358     else
00359         return CoordSurf::isA(type);
00360 };
00361 
00362 
00364 typedef CoordSurf_LambertConformalConic CoordSurf_LCC;
00365 
00366 
00367 } // namespace srm
00368 
00369 #endif // _LambertConformalConic_h

Spatial Reference Model C++ API Version 4.1 - 26 Jun 2006
Copyright © 2006 SEDRIS Docs by Doxygen 1.3.2