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

BaseSRF.h

Go to the documentation of this file.
00001 
00005 // SRM SDK Release 4.4.0 - December 7, 2009
00006 
00007 // - SRM spec. 4.4
00008 
00009 /*
00010  *                             NOTICE
00011  * 
00012  * This software is provided openly and freely for use in representing and
00013  * interchanging environmental data & databases.
00014  * 
00015  * This software was developed for use by the United States Government with
00016  * unlimited rights.  The software was developed under contract
00017  * DASG60-02-D-0006 TO-193 by Science Applications International Corporation.
00018  * The software is unclassified and is deemed as Distribution A, approved
00019  * for Public Release.
00020  * 
00021  * Use by others is permitted only upon the ACCEPTANCE OF THE TERMS AND
00022  * CONDITIONS, AS STIPULATED UNDER THE FOLLOWING PROVISIONS:
00023  * 
00024  *    1. Recipient may make unlimited copies of this software and give
00025  *       copies to other persons or entities as long as the copies contain
00026  *       this NOTICE, and as long as the same copyright notices that
00027  *       appear on, or in, this software remain.
00028  * 
00029  *    2. Trademarks. All trademarks belong to their respective trademark
00030  *       holders.  Third-Party applications/software/information are
00031  *       copyrighted by their respective owners.
00032  * 
00033  *    3. Recipient agrees to forfeit all intellectual property and
00034  *       ownership rights for any version created from the modification
00035  *       or adaptation of this software, including versions created from
00036  *       the translation and/or reverse engineering of the software design.
00037  * 
00038  *    4. Transfer.  Recipient may not sell, rent, lease, or sublicense
00039  *       this software.  Recipient may, however enable another person
00040  *       or entity the rights to use this software, provided that this
00041  *       AGREEMENT and NOTICE is furnished along with the software and
00042  *       /or software system utilizing this software.
00043  * 
00044  *       All revisions, modifications, created by the Recipient, to this
00045  *       software and/or related technical data shall be forwarded by the
00046  *       Recipient to the Government at the following address:
00047  * 
00048  *         SMDC
00049  *         Attention SEDRIS (TO193) TPOC
00050  *         P.O. Box 1500
00051  *         Hunstville, AL  35807-3801
00052  * 
00053  *         or via electronic mail to:  [email protected]
00054  * 
00055  *    5. No Warranty. This software is being delivered to you AS IS
00056  *       and there is no warranty, EXPRESS or IMPLIED, as to its use
00057  *       or performance.
00058  * 
00059  *       The RECIPIENT ASSUMES ALL RISKS, KNOWN AND UNKNOWN, OF USING
00060  *       THIS SOFTWARE.  The DEVELOPER EXPRESSLY DISCLAIMS, and the
00061  *       RECIPIENT WAIVES, ANY and ALL PERFORMANCE OR RESULTS YOU MAY
00062  *       OBTAIN BY USING THIS SOFTWARE OR DOCUMENTATION.  THERE IS
00063  *       NO WARRANTY, EXPRESS OR, IMPLIED, AS TO NON-INFRINGEMENT OF
00064  *       THIRD PARTY RIGHTS, MERCHANTABILITY, OR FITNESS FOR ANY
00065  *       PARTICULAR PURPOSE.  IN NO EVENT WILL THE DEVELOPER, THE
00066  *       UNITED STATES GOVERNMENT OR ANYONE ELSE ASSOCIATED WITH THE
00067  *       DEVELOPMENT OF THIS SOFTWARE BE HELD LIABLE FOR ANY CONSEQUENTIAL,
00068  *       INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS
00069  *       OR LOST SAVINGS WHATSOEVER.
00070  */
00071 
00072 // SRM_OTHERS_GOES_HERE
00073 
00074 // $Id: BaseSRF.h,v 1.63 2009/11/05 21:17:12 worleym Exp $
00075 
00194 #ifndef _BaseSRF_h
00195 #define _BaseSRF_h
00196 
00197 #if !defined(_WIN32)
00198 #define EXPORT_SRM_CPP_DLL
00199 #elif defined(BUILD_SRM_CPP) /* SRM CPP Case */
00200 #if !defined(EXPORT_SRM_CPP_DLL)
00201 #if defined(_LIB)
00202 #define EXPORT_SRM_CPP_DLL
00203 #elif defined(_USRDLL)
00204 #define EXPORT_SRM_CPP_DLL __declspec(dllexport)
00205 #else
00206 #define EXPORT_SRM_CPP_DLL __declspec(dllimport)
00207 #endif
00208 #endif
00209 #else /* SRM C Case */
00210 #define EXPORT_SRM_CPP_DLL
00211 #endif /* _WIN32 && EXPORT_DLL */
00212 
00213 #include "srm_types.h"
00214 
00215 // global variable - controls whether SRF cache is used to speed
00216 // up coordinate conversion operations
00217 extern bool g_fast_mode;
00218 
00219 namespace srm
00220 {
00221 
00223 class Coord;
00224 class Coord2D;
00225 class CoordSurf;
00226 class Coord3D;
00227 class Direction;
00228 class Orientation;
00229 class SRF_LocalTangentSpaceEuclidean;
00230 class SRF_LococentricEuclidean3D;
00231 
00238 class EXPORT_SRM_CPP_DLL BaseSRF
00239 {
00240 public:
00241 
00243     enum SRF_ClassType
00244     {
00245         SRF_TYP_TWO_D,
00246         SRF_TYP_THREE_D,
00247         SRF_TYP_WITH_TANGENT_PLANE_SURFACE,
00248         SRF_TYP_WITH_ELLIPSOIDAL_HEIGHT,
00249         SRF_TYP_MAP_PROJECTION,
00250         SRF_TYP_LSA,
00251         SRF_TYP_CC,
00252         SRF_TYP_CD,
00253         SRF_TYP_CM,
00254         SRF_TYP_EC,
00255         SRF_TYP_EI,
00256         SRF_TYP_HAEC,
00257         SRF_TYP_HEEC,
00258         SRF_TYP_HEEQ,
00259         SRF_TYP_LCC,
00260         SRF_TYP_LCE_3D,
00261         SRF_TYP_LSR_2D,
00262         SRF_TYP_LSR_3D,
00263         SRF_TYP_LTSAS,
00264         SRF_TYP_LTSC,
00265         SRF_TYP_LTSE,
00266         SRF_TYP_M,
00267         SRF_TYP_OMS,
00268         SRF_TYP_PD,
00269         SRF_TYP_LSP,
00270         SRF_TYP_PS,
00271         SRF_TYP_SEC,
00272         SRF_TYP_SEQ,
00273         SRF_TYP_SME,
00274         SRF_TYP_SMD,
00275         SRF_TYP_TM
00276     };
00277 
00292     static BaseSRF *createStandardSRF( SRM_SRF_Code srf_code,
00293                                        SRM_RT_Code rt_code );
00294 
00310     static BaseSRF *createSRFSetMember( SRM_SRFS_Info srfs_info,
00311                                         SRM_RT_Code rt );
00312 
00324     virtual void release();
00325 
00343     virtual void getCodes( SRM_SRFT_Code &t_code,
00344                            SRM_SRF_Code  &srf_code,
00345                            SRM_SRFS_Code_Info  &srfs_code_info ) const;
00346 
00350     virtual SRM_CS_Code getCSCode() const;
00351 
00356     virtual SRM_ORM_Code get_orm() const;
00357 
00361     virtual SRM_ORM_Code getOrm() const;
00362 
00367     virtual SRM_RT_Code get_rt() const;
00368 
00372     virtual SRM_RT_Code getRt() const;
00373 
00377     virtual SRM_Long_Float getA() const;
00378 
00382     virtual SRM_Long_Float getF() const;
00383 
00389     static bool querySRFTSupport( SRM_SRFT_Code srft_code );
00390 
00398     static bool queryORMSupport( SRM_ORM_Code orm_code,
00399                                  SRM_RT_Code rt_code );
00400 
00406     virtual SRF_ClassType getClassType() const = 0;
00407 
00410     virtual bool isA( SRF_ClassType type ) const;
00411 
00425     virtual SRM_Coordinate_Valid_Region changeCoordinateSRF( const Coord &src_coord, Coord &des_coord );
00426 
00432     virtual SRM_Coordinate_Valid_Region checkCoordinate( const Coord &src );
00433 
00437     virtual void freeCoordinate( Coord *coord );
00438 
00444     static SRM_Long_Float calculateEuclideanDistance( const Coord &coord1,
00445                                                       const Coord &coord2 );
00446 
00451     void setCoordinateValidationOn();
00452 
00457     void setCoordinateValidationOff();
00458 
00461     bool coordinateValidationIsOn();
00462 
00465     virtual const char *toString() = 0;
00466 
00471     virtual BaseSRF *clone();
00472 
00476     SRM_Integer getId() const
00477     {
00478         return _id;
00479     }
00480 
00481 protected:
00482     friend class Coord3D;
00483 
00484     BaseSRF( void *impl ); 
00485     BaseSRF &operator =( const BaseSRF & ) { return *this; } 
00486     virtual ~BaseSRF() {} 
00487 
00489     unsigned int _ref_cnt;
00491     SRM_Integer _id;
00493     void *_impl, *_cache;
00494     bool _validate_coords;
00495 
00496     void *getImpl() const { return _impl; }
00497 };
00498 
00499 
00500 inline BaseSRF *BaseSRF::clone()
00501 {
00502     ++_ref_cnt;
00503     return this;
00504 }
00505 
00506 inline bool BaseSRF::isA( SRF_ClassType type ) const
00507 {
00508     return false;
00509 }
00510 
00511 
00518 class EXPORT_SRM_CPP_DLL BaseSRF_2D : public BaseSRF
00519 {
00520 public:
00521 
00524     virtual bool isA( SRF_ClassType type ) const;
00525 
00530     virtual Coord2D *createCoordinate2D( SRM_Long_Float coord_comp1,
00531                                          SRM_Long_Float coord_comp2 ) = 0;
00532 
00536     virtual void getCoordinate2DValues( const Coord2D &coord,
00537                                         SRM_Long_Float &coord_comp1,
00538                                         SRM_Long_Float &coord_comp2 ) const;
00539 
00543     virtual void freeCoordinate2D( Coord2D *coord );
00544 
00551     virtual void changeCoordinate2DSRF( const Coord2D &src_coord,
00552                                               Coord2D &des_coord );
00553 
00564     virtual void changeCoordinate2DArraySRF( Coord2D                     **src_coord_array,
00565                                              SRM_Integer_Positive        *index,
00566                                              Coord2D                     **des_coord_array );
00567 
00577     virtual void changeCoordinate2DSRFObject( const Coord2D                              &src_coord,
00578                                               const SRM_ORM_Transformation_2D_Parameters hst,
00579                                                     Coord2D                              &des_coord );
00580 
00594     virtual void changeCoordinate2DArraySRFObject( Coord2D                                    **src_coord_array,
00595                                                    const SRM_ORM_Transformation_2D_Parameters hst,
00596                                                    SRM_Integer_Positive                       *index,
00597                                                    Coord2D                                    **des_coord_array );
00598 
00599 
00604     static SRM_Long_Float calculateEuclideanDistance( const Coord2D &coord1,
00605                                                       const Coord2D &coord2 );
00606 
00607 protected:
00608     BaseSRF_2D( void *impl ) : BaseSRF(impl) {} 
00609     BaseSRF_2D &operator =( const BaseSRF_2D & ) { return *this; } 
00610     virtual ~BaseSRF_2D() {} 
00611 };
00612 
00613 
00614 inline bool BaseSRF_2D::isA( SRF_ClassType type ) const
00615 {
00616     if (type == BaseSRF::SRF_TYP_TWO_D)
00617         return true;
00618     else
00619         return BaseSRF::isA(type);
00620 }
00621 
00622 
00629 class EXPORT_SRM_CPP_DLL BaseSRF_3D : public BaseSRF
00630 {
00631 public:
00632 
00635     virtual bool isA( SRF_ClassType type ) const;
00636 
00642     virtual Coord3D *createCoordinate3D( SRM_Long_Float coord_comp1,
00643                                          SRM_Long_Float coord_comp2,
00644                                          SRM_Long_Float coord_comp3 ) = 0;
00645 
00649     virtual void freeCoordinate3D( Coord3D *coord );
00650 
00654     virtual void getCoordinate3DValues( const Coord3D &coord,
00655                                         SRM_Long_Float &coord_comp1,
00656                                         SRM_Long_Float &coord_comp2,
00657                                         SRM_Long_Float &coord_comp3 ) const;
00658 
00666     virtual SRM_Coordinate_Valid_Region changeCoordinate3DSRF( const Coord3D &src_coord,
00667                                                                      Coord3D &des_coord );
00668 
00680     virtual void changeCoordinate3DArraySRF( Coord3D                                    **src_coord_array,
00681                                              SRM_Integer_Positive                       *index,
00682                                              Coord3D                                    **des_coord_array,
00683                                              SRM_Coordinate_Valid_Region                *region_array );
00684 
00695     virtual SRM_Coordinate_Valid_Region changeCoordinate3DSRFObject( const Coord3D &src_coord,
00696                                                                      const SRM_ORM_Transformation_3D_Parameters hst,
00697                                                                            Coord3D &des_coord );
00698 
00711     virtual void changeCoordinate3DArraySRFObject( Coord3D                                    **src_coord_array,
00712                                                    const SRM_ORM_Transformation_3D_Parameters hst,
00713                                                    SRM_Integer_Positive                       *index,
00714                                                    Coord3D                                    **des_coord_array,
00715                                                    SRM_Coordinate_Valid_Region                *region_array );
00716 
00731     virtual void setValidRegion( const SRM_Integer component,
00732                                  const SRM_Interval_Type type,
00733                                  const SRM_Long_Float lower,
00734                                  const SRM_Long_Float upper );
00735 
00754     virtual void setExtendedValidRegion( const SRM_Integer component,
00755                                          const SRM_Interval_Type type,
00756                                          const SRM_Long_Float extended_lower,
00757                                          const SRM_Long_Float lower,
00758                                          const SRM_Long_Float upper,
00759                                          const SRM_Long_Float extended_upper );
00760 
00772     virtual void getValidRegion( const SRM_Integer component,
00773                                        SRM_Interval_Type &type,
00774                                        SRM_Long_Float &lower,
00775                                        SRM_Long_Float &upper );
00776 
00790     virtual void getExtendedValidRegion( const SRM_Integer component,
00791                                                SRM_Interval_Type &type,
00792                                                SRM_Long_Float &extended_lower,
00793                                                SRM_Long_Float &lower,
00794                                                SRM_Long_Float &upper,
00795                                                SRM_Long_Float &extended_upper );
00796 
00801     virtual Direction *createDirection( const Coord3D &ref_coord,
00802                                         const SRM_Vector_3D vec );
00803 
00808     virtual Direction *createDirection( const Coord3D &ref_coord,
00809                                         const SRM_Long_Float vectorComp1,
00810                                         const SRM_Long_Float vectorComp2,
00811                                         const SRM_Long_Float vectorComp3 );
00812 
00820     virtual Direction *createDirection();
00821 
00822 
00826     virtual void freeDirection( Direction *direction );
00827 
00831     virtual void getDirectionValues( const Direction &direction,
00832                                      Coord3D &ref_coord,
00833                                      SRM_Vector_3D vec ) const;
00834 
00842     virtual SRM_Coordinate_Valid_Region changeDirectionSRF( const Direction &src_dir, Direction &des_dir );
00843 
00855     void changeDirectionArraySRF( Direction                   **src_direction_array,
00856                                   SRM_Integer_Positive        *index,
00857                                   Direction                   **des_direction_array,
00858                                   SRM_Coordinate_Valid_Region *region_array );
00859 
00872     virtual SRM_Coordinate_Valid_Region changeDirectionSRFObject
00873     (
00874         const Direction                            &src_dir,
00875         const SRM_ORM_Transformation_3D_Parameters  hst,
00876               Direction                            &des_dir
00877     );
00878 
00896     void changeDirectionArraySRFObject
00897     (
00898               Direction                            **src_direction_array,
00899         const SRM_ORM_Transformation_3D_Parameters   hst,
00900               SRM_Integer_Positive                  *index,
00901               Direction                            **des_direction_array,
00902               SRM_Coordinate_Valid_Region           *region_array
00903     );
00904 
00907     virtual SRM_Coordinate_Valid_Region checkDirection( const Direction &direction );
00908 
00923     void computeSRFOrientation( const Coord3D &src_ref_loc,
00924                                 const Coord3D &tgt_ref_loc,
00925                                 Orientation &out_ori );
00926 
00935     void getLocalTangentFrameSRFParameters ( const Coord3D &ref_loc,
00936                                              SRM_LCE_3D_Parameters &ltf );
00937 
00938 
00948     virtual SRF_LococentricEuclidean3D
00949        *createLococentricEuclidean3DSRF ( const Coord3D &lococentre,
00950                                           const Direction &primary_axis,
00951                                           const Direction &secondary_axis );
00952 
00953 
00973     void transformOrientation(const Coord3D     &src_ref_loc,
00974                                     Orientation &src_ori,
00975                               const Coord3D     &tgt_ref_loc,
00976                                     Orientation &tgt_ori );
00977 
00996     SRM_Coordinate_Valid_Region transformOrientationCommonOrigin
00997                 (const Coord3D     &src_ref_loc,
00998                        Orientation &src_ori,
00999                        Coord3D     &tgt_ref_loc,
01000                        Orientation &tgt_ori );
01001 
01027     void transformVectorInBodyFrame( const Coord3D       &src_ref_loc,
01028                                            Orientation   &src_ori,
01029                                      const SRM_Vector_3D &input_vec,
01030                                      const Coord3D       &tgt_ref_loc,
01031                                            SRM_Vector_3D &tgt_vec );
01032 
01057     SRM_Coordinate_Valid_Region transformVectorInBodyFrameCommonOrigin
01058                 (const Coord3D       &src_ref_loc,
01059                        Orientation   &src_ori,
01060                  const SRM_Vector_3D &input_vec,
01061                        Coord3D       &tgt_ref_loc,
01062                        SRM_Vector_3D &tgt_vec );
01063 
01081     void transformVector(const Coord3D       &src_ref_loc,
01082                          const SRM_Vector_3D &src_vec,
01083                          const Coord3D       &tgt_ref_loc,
01084                                SRM_Vector_3D &tgt_vec );
01085 
01103     SRM_Coordinate_Valid_Region transformVectorCommonOrigin
01104                 (const Coord3D       &src_ref_loc,
01105                  const SRM_Vector_3D &src_vec,
01106                        Coord3D       &tgt_ref_loc,
01107                        SRM_Vector_3D &tgt_vec );
01108 
01118     static SRM_SRFS_Code_Info getNaturalSRFSetMemberCode(const Coord3D &src_coord,
01119                                                                SRM_ORM_Code  orm_dst,
01120                                                                SRM_RT_Code   rt_dst,
01121                                                                SRM_SRFS_Code tgt_srfs);
01122 
01132     static BaseSRF_3D* getNaturalSRFSetMember( Coord3D &src_coord,
01133                                                SRM_ORM_Code orm_dst,
01134                                                SRM_RT_Code rt_dst,
01135                                                SRM_SRFS_Code tgt_srfs);
01136 
01141     static SRM_Long_Float calculateEuclideanDistance( const Coord3D &coord1,
01142                                                       const Coord3D &coord2 );
01143 
01144 protected:
01145     BaseSRF_3D( void *impl ) : BaseSRF(impl) {} 
01146     BaseSRF_3D &operator =( const BaseSRF_3D & ) { return *this; } 
01147     virtual ~BaseSRF_3D() {} 
01148 };
01149 
01150 
01151 inline bool BaseSRF_3D::isA( SRF_ClassType type ) const
01152 {
01153     if (type == BaseSRF::SRF_TYP_THREE_D)
01154         return true;
01155     else
01156         return BaseSRF::isA(type);
01157 }
01158 
01159 
01167 class EXPORT_SRM_CPP_DLL BaseSRF_WithTangentPlaneSurface : public BaseSRF_3D
01168 {
01169 public:
01170 
01173     virtual bool isA( SRF_ClassType type ) const;
01174 
01178     virtual CoordSurf *createSurfaceCoordinate( SRM_Long_Float coord_surf_comp1,
01179                                                 SRM_Long_Float coord_surf_comp2 ) = 0;
01180 
01184     virtual void getSurfaceCoordinateValues( const CoordSurf &coord_surf,
01185                                              SRM_Long_Float &coord_surf_comp1,
01186                                              SRM_Long_Float &coord_surf_comp2 ) const;
01187 
01191     virtual void freeSurfaceCoordinate( CoordSurf *coord_surf );
01192 
01196     virtual void getAssociatedSurfaceCoordinate( const Coord3D &coord,
01197                                                  CoordSurf &on_surface_coord );
01198 
01203     virtual void getPromotedSurfaceCoordinate( const CoordSurf &surf_coord,
01204                                                Coord3D &three_d_coord );
01205 
01210     static SRM_Long_Float calculateEuclideanDistance( const CoordSurf &coord1,
01211                                                       const CoordSurf &coord2 );
01212 
01213 protected:
01214     BaseSRF_WithTangentPlaneSurface( void *impl ) : BaseSRF_3D(impl) {} 
01215     BaseSRF_WithTangentPlaneSurface &operator =( const BaseSRF_WithTangentPlaneSurface & ) { return *this; } 
01216     virtual ~BaseSRF_WithTangentPlaneSurface() {} 
01217 };
01218 
01219 
01220 inline bool BaseSRF_WithTangentPlaneSurface::isA( SRF_ClassType type ) const
01221 {
01222     if (type == BaseSRF::SRF_TYP_WITH_TANGENT_PLANE_SURFACE)
01223         return true;
01224     else
01225         return BaseSRF_3D::isA(type);
01226 }
01227 
01228 
01236 class EXPORT_SRM_CPP_DLL BaseSRF_WithEllipsoidalHeight : public BaseSRF_3D
01237 {
01238 public:
01239 
01242     virtual bool isA( SRF_ClassType type ) const;
01243 
01247     virtual CoordSurf *createSurfaceCoordinate( SRM_Long_Float coord_surf_comp1,
01248                                                 SRM_Long_Float coord_surf_comp2 ) = 0;
01249 
01253     virtual void getSurfaceCoordinateValues( const CoordSurf &coord_surf,
01254                                              SRM_Long_Float &coord_surf_comp1,
01255                                              SRM_Long_Float &coord_surf_comp2 ) const;
01256 
01260     virtual void freeSurfaceCoordinate( CoordSurf *coord_surf );
01261 
01265     virtual void getAssociatedSurfaceCoordinate( const Coord3D &coord,
01266                                                  CoordSurf &on_surface_coord );
01267 
01272     virtual void getPromotedSurfaceCoordinate( const CoordSurf &surf_coord,
01273                                                Coord3D &three_d_coord );
01274 
01279     virtual SRF_LocalTangentSpaceEuclidean
01280       *createLocalTangentSpaceEuclideanSRF(
01281                                            const CoordSurf &surf_coord,
01282                                            SRM_Long_Float azimuth,
01283                                            SRM_Long_Float false_x_origin,
01284                                            SRM_Long_Float false_y_origin,
01285                                            SRM_Long_Float offset_height );
01286 
01296     static SRM_SRFS_Code_Info getNaturalSRFSetMemberCode( CoordSurf &src_coord,
01297                                                           SRM_ORM_Code orm_dst,
01298                                                           SRM_RT_Code rt_dst,
01299                                                           SRM_SRFS_Code tgt_srfs);
01300 
01301 
01311     static BaseSRF_3D* getNaturalSRFSetMember( CoordSurf &src_coord,
01312                                                SRM_ORM_Code orm_dst,
01313                                                SRM_RT_Code rt_dst,
01314                                                SRM_SRFS_Code tgt_srfs);
01315 
01320     static SRM_Long_Float calculateEuclideanDistance( const CoordSurf &coord1,
01321                                                       const CoordSurf &coord2 );
01322 
01327     static SRM_Long_Float calculateGeodesicDistance( const CoordSurf &src_coord,
01328                                                      const CoordSurf &des_coord );
01329 
01333     virtual SRM_Long_Float calculateVerticalSeparationOffset( SRM_DSS_Code vos,
01334                                                               const CoordSurf &surf_coord );
01335 
01336 protected:
01337     BaseSRF_WithEllipsoidalHeight( void *impl ) : BaseSRF_3D(impl) {} 
01338     BaseSRF_WithEllipsoidalHeight &operator =( const BaseSRF_WithEllipsoidalHeight & ) { return *this; } 
01339     virtual ~BaseSRF_WithEllipsoidalHeight() {} 
01340 };
01341 
01342 
01343 inline bool BaseSRF_WithEllipsoidalHeight::isA( SRF_ClassType type ) const
01344 {
01345     if (type == BaseSRF::SRF_TYP_WITH_ELLIPSOIDAL_HEIGHT)
01346         return true;
01347     else
01348         return BaseSRF_3D::isA(type);
01349 }
01350 
01351 
01359 class EXPORT_SRM_CPP_DLL BaseSRF_MapProjection : public BaseSRF_WithEllipsoidalHeight
01360 {
01361 public:
01362 
01365     virtual bool isA( SRF_ClassType type ) const;
01366 
01381     virtual void setValidGeodeticRegion( const SRM_Integer component,
01382                                          const SRM_Interval_Type type,
01383                                          const SRM_Long_Float lower,
01384                                          const SRM_Long_Float upper );
01385 
01404     virtual void setExtendedValidGeodeticRegion( const SRM_Integer component,
01405                                                  const SRM_Interval_Type type,
01406                                                  const SRM_Long_Float extended_lower,
01407                                                  const SRM_Long_Float lower,
01408                                                  const SRM_Long_Float upper,
01409                                                  const SRM_Long_Float extended_upper );
01410 
01422     virtual void getValidGeodeticRegion( const SRM_Integer component,
01423                                          SRM_Interval_Type &type,
01424                                          SRM_Long_Float &lower,
01425                                          SRM_Long_Float &upper );
01426 
01440     virtual void getExtendedValidGeodeticRegion( const SRM_Integer component,
01441                                                  SRM_Interval_Type &type,
01442                                                  SRM_Long_Float &extended_lower,
01443                                                  SRM_Long_Float &lower,
01444                                                  SRM_Long_Float &upper,
01445                                                  SRM_Long_Float &extended_upper );
01446 
01451     virtual SRM_Long_Float calculateConvergenceOfTheMeridian( const CoordSurf &surf_coord );
01452 
01456     virtual SRM_Long_Float calculatePointDistortion( const CoordSurf &surf_coord );
01457 
01461     virtual SRM_Long_Float calculateMapAzimuth( const CoordSurf &src_coord,
01462                                                 const CoordSurf &des_coord );
01463 
01464 protected:
01465     BaseSRF_MapProjection( void *impl ) : BaseSRF_WithEllipsoidalHeight(impl) {} 
01466     BaseSRF_MapProjection &operator =( const BaseSRF_MapProjection & ) { return *this; } 
01467     virtual ~BaseSRF_MapProjection() {} 
01468 };
01469 
01470 
01471 inline bool BaseSRF_MapProjection::isA( SRF_ClassType type ) const
01472 {
01473     if (type == BaseSRF::SRF_TYP_MAP_PROJECTION)
01474         return true;
01475     else
01476         return BaseSRF_WithEllipsoidalHeight::isA(type);
01477 }
01478 
01479 } // namespace srm
01480 
01481 #endif // _BaseSRF_h

Spatial Reference Model C++ API Version 4.4 - December 7, 2009
Copyright © 2009 SEDRIS Docs by Doxygen 1.3.2