00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #ifndef _LocalTangentSpaceEuclidean_h
00077 #define _LocalTangentSpaceEuclidean_h
00078
00079 #include "BaseSRF.h"
00080 #include "Coord.h"
00081 #include "Exception.h"
00082
00083 namespace srm
00084 {
00091 class EXPORT_SRM_CPP_DLL SRF_LocalTangentSpaceEuclidean: public BaseSRF_WithTangentPlaneSurface
00092 {
00093 public:
00097 static SRF_LocalTangentSpaceEuclidean* create(const SRM_ORM_Code orm,
00098 const SRM_RT_Code rt,
00099 const SRM_LTSE_Parameters ¶ms );
00100
00104 static SRF_LocalTangentSpaceEuclidean* create(
00105 SRM_ORM_Code orm,
00106 SRM_RT_Code rt,
00107 SRM_Long_Float geodetic_longitude,
00108 SRM_Long_Float geodetic_latitude,
00109 SRM_Long_Float azimuth,
00110 SRM_Long_Float x_false_origin,
00111 SRM_Long_Float y_false_origin,
00112 SRM_Long_Float height_offset
00113 );
00114
00118 static SRF_LocalTangentSpaceEuclidean* create( SRM_SRF_Parameters_Info srf_params )
00119 {
00120 return create(srf_params.value.srf_template.orm_code,
00121 srf_params.rt_code,
00122 srf_params.value.srf_template.parameters.ltse_srf_parameters );
00123 }
00124
00127 Coord3D* createCoordinate3D(SRM_Long_Float coord_comp1,
00128 SRM_Long_Float coord_comp2,
00129 SRM_Long_Float coord_comp3 );
00130
00133 CoordSurf* createSurfaceCoordinate(SRM_Long_Float coord_surf_comp1,
00134 SRM_Long_Float coord_surf_comp2 );
00135
00139 const SRM_LTSE_Parameters &getSRFParameters() const;
00140
00144 SRM_Long_Float get_geodetic_longitude() const;
00145
00149 SRM_Long_Float get_geodetic_latitude() const;
00150
00154 SRM_Long_Float get_azimuth() const;
00155
00159 SRM_Long_Float get_x_false_origin() const;
00160
00164 SRM_Long_Float get_y_false_origin() const;
00165
00169 SRM_Long_Float get_height_offset() const;
00170
00173 virtual bool isA( SRF_ClassType type ) const;
00174
00177 virtual SRF_ClassType getClassType() const
00178 {
00179 return BaseSRF::SRF_TYP_LTSE;
00180 }
00181
00185 bool isEqual( const SRF_LocalTangentSpaceEuclidean &srf ) const;
00186
00190 bool operator==( const SRF_LocalTangentSpaceEuclidean &rhs ) const;
00191
00195 SRF_LocalTangentSpaceEuclidean* makeCopy() const;
00196
00204 virtual SRM_Coordinate_Valid_Region changeCoordinate3DSRF(const Coord3D &src_coord,
00205 Coord3D &des_coord );
00206
00210 const char* toString();
00211
00212 protected:
00213 friend class BaseSRF;
00214 friend class BaseSRF_3D;
00215 friend class BaseSRF_WithEllipsoidalHeight;
00216 SRF_LocalTangentSpaceEuclidean( void *impl );
00217 SRF_LocalTangentSpaceEuclidean &operator =( const SRF_LocalTangentSpaceEuclidean & ) { return *this; }
00218 virtual ~SRF_LocalTangentSpaceEuclidean();
00219 };
00220
00221
00222 inline bool SRF_LocalTangentSpaceEuclidean::isA( SRF_ClassType type ) const
00223 {
00224 if (type == BaseSRF::SRF_TYP_LTSE)
00225 return true;
00226 else
00227 return BaseSRF_WithTangentPlaneSurface::isA(type);
00228 };
00229
00230
00232 typedef SRF_LocalTangentSpaceEuclidean SRF_LTSE;
00233
00234
00239 class EXPORT_SRM_CPP_DLL Coord3D_LocalTangentSpaceEuclidean: public Coord3D
00240 {
00241 public:
00244 Coord3D_LocalTangentSpaceEuclidean(SRF_LocalTangentSpaceEuclidean *srf,
00245 SRM_Long_Float x = 0.0,
00246 SRM_Long_Float y = 0.0,
00247 SRM_Long_Float height = 0.0 )
00248 : Coord3D(srf)
00249 {
00250 setComponentValues(x, y, height);
00251 }
00252
00255 Coord3D_LocalTangentSpaceEuclidean( const Coord3D_LocalTangentSpaceEuclidean &coord )
00256 : Coord3D(coord._srf)
00257 {
00258 setComponentValues( coord._values[0], coord._values[1], coord._values[2] );
00259 }
00260
00266 void copyTo( Coord3D_LocalTangentSpaceEuclidean &coord ) const
00267 {
00268 if (coord._srf != _srf)
00269 throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00270
00271 coord._values[0] = _values[0];
00272 coord._values[1] = _values[1];
00273 coord._values[2] = _values[2];
00274 }
00275
00279 bool isEqual( const Coord3D_LocalTangentSpaceEuclidean &coord ) const
00280 {
00281 return (_srf == coord._srf &&
00282 _values[0] == coord._values[0] &&
00283 _values[1] == coord._values[1] &&
00284 _values[2] == coord._values[2] );
00285 }
00286
00289 void setComponentValues( SRM_Long_Float x, SRM_Long_Float y, SRM_Long_Float height )
00290 {
00291 _values[0] = x;
00292 _values[1] = y;
00293 _values[2] = height;
00294 }
00295
00298 SRM_Long_Float get_x() const
00299 {
00300 return _values[0];
00301 }
00302
00305 SRM_Long_Float get_y() const
00306 {
00307 return _values[1];
00308 }
00309
00312 SRM_Long_Float get_height() const
00313 {
00314 return _values[2];
00315 }
00316
00319 void set_x( SRM_Long_Float value )
00320 {
00321 _values[0] = value;
00322 }
00323
00326 void set_y( SRM_Long_Float value )
00327 {
00328 _values[1] = value;
00329 }
00330
00333 void set_height( SRM_Long_Float value )
00334 {
00335 _values[2] = value;
00336 }
00337
00340 virtual bool isA( Coord_ClassType type ) const;
00341
00344 virtual Coord_ClassType getClassType() const
00345 {
00346 return Coord::COORD_TYP_LTSE;
00347 }
00348
00351 bool operator==( const Coord3D_LocalTangentSpaceEuclidean &rhs ) const;
00352
00358 bool isCompatibleWith( const Coord3D_LocalTangentSpaceEuclidean &rhs ) const
00359 {
00360 return ((*(SRF_LocalTangentSpaceEuclidean*)(this->_srf)) == (*(SRF_LocalTangentSpaceEuclidean*)(rhs._srf)));
00361 }
00362
00367 Coord3D_LocalTangentSpaceEuclidean &operator= ( const Coord3D_LocalTangentSpaceEuclidean &rhs )
00368 {
00369 if((*(SRF_LocalTangentSpaceEuclidean*)(this->_srf)) == (*(SRF_LocalTangentSpaceEuclidean*)(rhs._srf)))
00370 {
00371 _values[0] = rhs._values[0];
00372 _values[1] = rhs._values[1];
00373 _values[2] = rhs._values[2];
00374 }
00375 else
00376 throw Exception(SRM_STATCOD_INVALID_TARGET_COORDINATE,
00377 "Coord3D_LocalTangentSpaceEuclidean op=: incompatible rhs coordinate");
00378
00379 return *this;
00380 }
00381 };
00382
00383
00384 inline bool Coord3D_LocalTangentSpaceEuclidean::isA( Coord_ClassType type ) const
00385 {
00386 if (type == Coord::COORD_TYP_LTSE)
00387 return true;
00388 else
00389 return Coord3D::isA(type);
00390 };
00391
00392
00394 typedef Coord3D_LocalTangentSpaceEuclidean Coord3D_LTSE;
00395
00396
00401 class EXPORT_SRM_CPP_DLL CoordSurf_LocalTangentSpaceEuclidean: public CoordSurf
00402 {
00403 public:
00406 CoordSurf_LocalTangentSpaceEuclidean(SRF_LocalTangentSpaceEuclidean *srf,
00407 SRM_Long_Float x = 0.0,
00408 SRM_Long_Float y = 0.0 )
00409 : CoordSurf(srf)
00410 {
00411 setComponentValues(x, y);
00412 }
00413
00416 CoordSurf_LocalTangentSpaceEuclidean( const CoordSurf_LocalTangentSpaceEuclidean &coord )
00417 : CoordSurf(coord._srf)
00418 {
00419 setComponentValues( coord._values[0], coord._values[1] );
00420 }
00421
00427 void copyTo( CoordSurf_LocalTangentSpaceEuclidean &coord ) const
00428 {
00429 if (coord._srf != _srf)
00430 throw Exception( SRM_STATCOD_INVALID_SOURCE_COORDINATE, "copyTo: Coordinate associated with a difference SRF" );
00431
00432 coord._values[0] = _values[0];
00433 coord._values[1] = _values[1];
00434 }
00435
00439 bool isEqual( const CoordSurf_LocalTangentSpaceEuclidean &coord ) const
00440 {
00441 return (_srf == coord._srf &&
00442 _values[0] == coord._values[0] &&
00443 _values[1] == coord._values[1] );
00444 }
00445
00448 void setComponentValues( SRM_Long_Float x, SRM_Long_Float y )
00449 {
00450 _values[0] = x;
00451 _values[1] = y;
00452 }
00453
00456 SRM_Long_Float get_x() const
00457 {
00458 return _values[0];
00459 }
00460
00463 SRM_Long_Float get_y() const
00464 {
00465 return _values[1];
00466 }
00467
00470 void set_x( SRM_Long_Float value )
00471 {
00472 _values[0] = value;
00473 }
00474
00477 void set_y( SRM_Long_Float value )
00478 {
00479 _values[1] = value;
00480 }
00481
00484 virtual bool isA( Coord_ClassType type ) const;
00485
00488 virtual Coord_ClassType getClassType() const
00489 {
00490 return Coord::COORD_TYP_SURF_LTSE;
00491 }
00492
00495 bool operator==( const CoordSurf_LocalTangentSpaceEuclidean &rhs ) const;
00496
00502 bool isCompatibleWith( const CoordSurf_LocalTangentSpaceEuclidean &rhs ) const
00503 {
00504 return ((*(SRF_LocalTangentSpaceEuclidean*)(this->_srf)) == (*(SRF_LocalTangentSpaceEuclidean*)(rhs._srf)));
00505 }
00506
00512 CoordSurf_LocalTangentSpaceEuclidean &operator= ( const CoordSurf_LocalTangentSpaceEuclidean &rhs )
00513 {
00514 if((*(SRF_LocalTangentSpaceEuclidean*)(this->_srf)) == (*(SRF_LocalTangentSpaceEuclidean*)(rhs._srf)))
00515 {
00516 _values[0] = rhs._values[0];
00517 _values[1] = rhs._values[1];
00518 }
00519 else
00520 throw Exception(SRM_STATCOD_INVALID_TARGET_COORDINATE,
00521 "CoordSurf_LocalTangentSpaceEuclidean op=: incompatible rhs coordinate");
00522
00523 return *this;
00524 }
00525 };
00526
00527
00528 inline bool CoordSurf_LocalTangentSpaceEuclidean::isA( Coord_ClassType type ) const
00529 {
00530 if (type == Coord::COORD_TYP_SURF_LTSE)
00531 return true;
00532 else
00533 return CoordSurf::isA(type);
00534 };
00535
00536
00538 typedef CoordSurf_LocalTangentSpaceEuclidean CoordSurf_LTSE;
00539
00540 }
00541
00542 #endif // _LocalTangentSpaceEuclidean_h