00001
00057 #ifndef INC_RVC_OPSURFACEFITTING_H
00058 #define INC_RVC_OPSURFACEFITTING_H
00059
00060 #ifndef INC_RVC_OPCOMPONENT_H
00061 #include <rvc/opcomponent.h>
00062 #endif
00063
00064 #include <float.h>
00065
00066 #ifndef INC_MI32_KRIGING_H
00067 #include <mi32/kriging.h>
00068 #endif
00069
00070 #ifndef INC_MI32_SPATREF_H
00071 #include <mi32/spatref.h>
00072 #endif
00073
00074 #ifndef INC_MI32_POLYLINE_H
00075 #include <mi32/polyline.h>
00076 #endif
00077
00078 #ifndef INC_RVC_RASTER_H
00079 #include <rvc/raster.h>
00080 #endif
00081
00082
00083 namespace RVC {
00084 namespace OP {
00085
00087 class SURFACEFITTING {
00088 public:
00089
00091 enum SOURCE {
00092 SOURCE_Invalid = -1,
00093 SOURCE_First = 0,
00094 SOURCE_Vector = 0,
00095 SOURCE_TIN = 1,
00096 SOURCE_Table = 2,
00097 SOURCE_Shape = 3,
00098 SOURCE_Last = 3,
00099 SOURCE_Count = 4
00100 };
00101
00103 enum METHOD {
00104 METHOD_Invalid = -1,
00105 METHOD_First = 0,
00106 METHOD_MinimumCurvature = 0,
00107 METHOD_UnivariateCurve = 1,
00108 METHOD_InverseDistance = 2,
00109 METHOD_Profiles = 3,
00110 METHOD_Polynomial = 4,
00111 METHOD_Kriging = 5,
00112 METHOD_TriangleInterpolation = 6,
00113 METHOD_Bidirectional = 7,
00114 METHOD_Last = 7,
00115 METHOD_Count = 8
00116 };
00117
00119 class SOURCE_PARAMETERS {
00120 public:
00121
00122 SOURCE_PARAMETERS (
00123 const SOURCE source
00124 );
00125
00126 virtual ~SOURCE_PARAMETERS (
00127 );
00128
00129 SOURCE GetSource (
00130 ) const { return m_Source; }
00131
00132 private:
00133 #ifndef GENERATING_DOXYGEN_OUTPUT
00134 SOURCE_PARAMETERS (
00135 );
00136
00137 const SOURCE m_Source;
00138 #endif // GENERATING_DOXYGEN_OUTPUT
00139 };
00140
00142 class VECTOR_PARAMETERS : public SOURCE_PARAMETERS {
00143 public:
00144
00146 enum TYPE {
00147 TYPE_Point = 0,
00148 TYPE_Line = 1
00149 };
00150
00151 VECTOR_PARAMETERS (
00152 );
00153
00154 ~VECTOR_PARAMETERS (
00155 );
00156
00157 VECTOR_PARAMETERS& operator= (
00158 const VECTOR_PARAMETERS&
00159 );
00160
00161 bool GetComponent (
00162 const TYPE type,
00163 COMPONENT& component
00164 ) const;
00165
00166 const OP::COMPONENT& GetComponentLine (
00167 ) const { return (m_Line); }
00168
00169 const OP::COMPONENT& GetComponentPoint (
00170 ) const { return (m_Point); }
00171
00172 void SetComponent (
00173 const TYPE type,
00174 const OP::COMPONENT& component
00175 );
00176
00177 void SetComponentLine (
00178 const OP::COMPONENT& component
00179 ) { m_Line = component; }
00180
00181 void SetComponentPoint (
00182 const OP::COMPONENT& component
00183 ) { m_Point = component; }
00184
00185 private:
00186 #ifndef GENERATING_DOXYGEN_OUTPUT
00187 COMPONENT m_Point;
00188 COMPONENT m_Line;
00189 #endif // GENERATING_DOXYGEN_OUTPUT
00190 };
00191
00193 class TIN_PARAMETERS : public SOURCE_PARAMETERS {
00194 public:
00195
00197 enum TYPE {
00198 TYPE_Node = 0,
00199 TYPE_Edge = 1,
00200 TYPE_Triangle = 2
00201 };
00202
00203 TIN_PARAMETERS (
00204 );
00205
00206 ~TIN_PARAMETERS (
00207 );
00208
00209 TIN_PARAMETERS& operator= (
00210 const TIN_PARAMETERS&
00211 );
00212
00213 bool GetComponent (
00214 const TYPE type,
00215 COMPONENT& component
00216 ) const;
00217
00218 const OP::COMPONENT& GetComponentEdge (
00219 ) const { return (m_Edge); }
00220
00221 const OP::COMPONENT& GetComponentNode (
00222 ) const { return (m_Node); }
00223
00224 const OP::COMPONENT& GetComponentTriangle (
00225 ) const { return (m_Triangle); }
00226
00227 void SetComponent (
00228 const TYPE type,
00229 const COMPONENT& component
00230 );
00231
00232 void SetComponentEdge (
00233 const OP::COMPONENT& component
00234 ) { m_Edge = component; }
00235
00236 void SetComponentNode (
00237 const OP::COMPONENT& component
00238 ) { m_Node = component; }
00239
00240 void SetComponentTriangle (
00241 const OP::COMPONENT& component
00242 ) { m_Triangle = component; }
00243
00244 private:
00245 #ifndef GENERATING_DOXYGEN_OUTPUT
00246 COMPONENT m_Node;
00247 COMPONENT m_Edge;
00248 COMPONENT m_Triangle;
00249 #endif // GENERATING_DOXYGEN_OUTPUT
00250 };
00251
00252
00254 class TABLE_PARAMETERS : public SOURCE_PARAMETERS {
00255 public:
00256
00258 enum NAME {
00259 NAME_XField = 0,
00260 NAME_YField = 1,
00261 NAME_ZField = 2,
00262 NAME_Count = 3
00263 };
00264
00265 TABLE_PARAMETERS (
00266 );
00267
00268 ~TABLE_PARAMETERS (
00269 );
00270
00271 TABLE_PARAMETERS& operator= (
00272 const TABLE_PARAMETERS&
00273 );
00274
00276 const SPATREF::COORDREFSYS& GetCoordRefSys (
00277 ) const { return (m_CoordRefSys); }
00278
00279 const COMPONENT& GetComponent (
00280 ) const { return (m_Pin); }
00281
00283 void GetName (
00284 const NAME id,
00285 RVC::OBJECTNAME& name
00286 ) const;
00287
00289 const MISTRING& GetQuery (
00290 ) const { return (m_Query); }
00291
00293 UINT8 GetXUnitCode (
00294 ) const { return (m_XUnitCode); }
00295
00297 UINT8 GetYUnitCode (
00298 ) const { return (m_YUnitCode); }
00299
00301 UINT8 GetZUnitCode (
00302 ) const { return (m_ZUnitCode); }
00303
00305 void SetCoordRefSys (
00306 const SPATREF::COORDREFSYS& crs
00307 ) { m_CoordRefSys = crs; }
00308
00309 void SetComponent (
00310 const COMPONENT& component
00311 ) { m_Pin = component; }
00312
00314 void SetName (
00315 const NAME id,
00316 const RVC::OBJECTNAME& name
00317 );
00318
00320 void SetQuery (
00321 const MISTRING& query
00322 ) { m_Query = query; }
00323
00325 void SetXUnitCode (
00326 const UINT8 unitcode
00327 ) { m_XUnitCode = unitcode; }
00328
00330 void SetYUnitCode (
00331 const UINT8 unitcode
00332 ) { m_YUnitCode = unitcode; }
00333
00335 void SetZUnitCode (
00336 const UINT8 unitcode
00337 ) { m_ZUnitCode = unitcode; }
00338
00339 private:
00340 #ifndef GENERATING_DOXYGEN_OUTPUT
00341 COMPONENT m_Pin;
00342 RVC::OBJECTNAME m_Names[NAME_Count];
00343 SPATREF::COORDREFSYS m_CoordRefSys;
00344 MISTRING m_Query;
00345 UINT8 m_XUnitCode;
00346 UINT8 m_YUnitCode;
00347 UINT8 m_ZUnitCode;
00348 #endif // GENERATING_DOXYGEN_OUTPUT
00349 };
00350
00352 class SHAPE_PARAMETERS : public SOURCE_PARAMETERS {
00353 public:
00354
00355 SHAPE_PARAMETERS (
00356 );
00357
00358 ~SHAPE_PARAMETERS (
00359 );
00360
00361 SHAPE_PARAMETERS& operator= (
00362 const SHAPE_PARAMETERS&
00363 );
00364
00365 const COMPONENT& GetComponent (
00366 ) const { return (m_Component); }
00367
00368 void SetComponent (
00369 const COMPONENT& component
00370 ) { m_Component = component; }
00371
00372 private:
00373 #ifndef GENERATING_DOXYGEN_OUTPUT
00374 COMPONENT m_Component;
00375 #endif // GENERATING_DOXYGEN_OUTPUT
00376 };
00377
00379 class DESTINATION_PARAMETERS {
00380 public:
00381
00382 DESTINATION_PARAMETERS (
00383 );
00384
00385 ~DESTINATION_PARAMETERS (
00386 );
00387
00388 RVC::IMAGE::CELLTYPE GetCellType (
00389 ) const { return m_CellType; }
00390
00391 UINT16 GetCompressionQualityRatio (
00392 ) const { return m_CompressionQualityRatio; }
00393
00394 RVC::RASTER::COMPTYPE GetCompressionType (
00395 ) const { return m_CompressionType; }
00396
00397 INT32 GetNumColumns (
00398 ) const { return m_NumColumns; }
00399
00400 INT32 GetNumLines (
00401 ) const { return m_NumLines; }
00402
00404 const TRANS2D_MAPGEN& GetTransformation (
00405 ) const { return m_Transformation; }
00406
00407 void SetCellType (
00408 const RVC::IMAGE::CELLTYPE CellType
00409 ) { m_CellType = CellType; }
00410
00411 void SetCompressionQualityRatio (
00412 const UINT16 CompressionQualityRatio
00413 ) { m_CompressionQualityRatio = CompressionQualityRatio; }
00414
00415 void SetCompressionType (
00416 const RVC::RASTER::COMPTYPE CompressionType
00417 );
00418 void SetNumColumns (
00419 const INT32 NumColumns
00420 ) { m_NumColumns = NumColumns; }
00421
00422 void SetNumLines (
00423 const INT32 NumLines
00424 ) { m_NumLines = NumLines; }
00425
00427 void SetTransformation (
00428 const TRANS2D_MAPGEN& transformation
00429 );
00430
00431 private:
00432
00433 #ifndef GENERATING_DOXYGEN_OUTPUT
00434 INT32 m_NumLines;
00435 INT32 m_NumColumns;
00436 RVC::IMAGE::CELLTYPE m_CellType;
00437 TRANS2D_MAPGEN m_Transformation;
00438 RVC::RASTER::COMPTYPE m_CompressionType;
00439 UINT16 m_CompressionQualityRatio;
00440
00441 #endif // GENERATING_DOXYGEN_OUTPUT
00442 };
00443
00445 class METHOD_PARAMETERS {
00446 public:
00447
00448 METHOD_PARAMETERS (
00449 const METHOD method
00450 );
00451
00452 virtual ~METHOD_PARAMETERS (
00453 );
00454
00456 UINT16 GetBlankDistance (
00457 ) const { return (m_BlankDistance); }
00458
00460 METHOD GetMethod (
00461 ) const { return m_Method; }
00462
00464 void SetBlankDistance (
00465 UINT16 BlankDistance
00466 ) { m_BlankDistance = BlankDistance; }
00467
00468 private:
00469
00470 #ifndef GENERATING_DOXYGEN_OUTPUT
00471
00472 const METHOD m_Method;
00473 UINT16 m_BlankDistance;
00474
00475 METHOD_PARAMETERS (
00476 );
00477
00478 static METHOD Check (
00479 const METHOD method
00480 );
00481
00482 #endif // GENERATING_DOXYGEN_OUTPUT
00483
00484 };
00485
00487 class MINIMUMCURVATURE_PARAMETERS : public METHOD_PARAMETERS {
00488 public:
00489
00490 enum CURVATURE {
00491 CURVATURE_Linear = 0,
00492 CURVATURE_Logarithmic = 1
00493 };
00494
00495 enum DUPLICATE {
00496 DUPLICATE_First = 0,
00497 DUPLICATE_Minimum,
00498 DUPLICATE_Maximum,
00499 DUPLICATE_Last
00500 };
00501
00502 enum INITIALIZATION {
00503 INITIALIZATION_InverseDistance = 0,
00504 INITIALIZATION_Profiles = 1
00505 };
00506
00507 enum GRIDRATIO {
00508 GRIDRATIO_1 = 1,
00509 GRIDRATIO_2 = 2,
00510 GRIDRATIO_4 = 4,
00511 GRIDRATIO_8 = 8,
00512 GRIDRATIO_16 = 16
00513 };
00514
00515 enum SEARCHAREA {
00516 SEARCHAREA_Circle = 0,
00517 SEARCHAREA_Square = 1,
00518 SEARCHAREA_Diamond = 2
00519 };
00520
00521 MINIMUMCURVATURE_PARAMETERS (
00522 );
00523
00524 double GetAllowedVariation (
00525 ) const { return m_AllowedVariation; }
00526
00527 CURVATURE GetCurvature (
00528 ) const { return m_Curvature; }
00529
00530 DUPLICATE GetDuplicateHandling (
00531 ) const { return (m_DuplicateHandling); }
00532
00533 GRIDRATIO GetGridRatio (
00534 ) const { return m_GridRatio; }
00535
00536 INITIALIZATION GetInitialization (
00537 ) const { return m_Initialization; }
00538
00539 int GetDistanceUnit (
00540 ) const { return m_DistanceUnit; }
00541
00542 double GetMatchingTolerance (
00543 ) const { return m_MatchingTolerance; }
00544
00545 INT32 GetMaximumIterations (
00546 ) const { return m_MaximumIterations; }
00547
00548 double GetMinimumMatches (
00549 ) const { return m_MinimumMatches; }
00550
00551 SEARCHAREA GetSearchArea (
00552 ) const { return m_SearchArea; }
00553
00554 double GetSearchDistance (
00555 ) const { return m_SearchDistance; }
00556
00557 double GetTension (
00558 ) const { return m_Tension; }
00559
00560 double GetWeightingPower (
00561 ) const { return m_WeightingPower; }
00562
00563 double SetAllowedVariation (
00564 const double variation
00565 ) { m_AllowedVariation = MAX(0.0, variation); return m_AllowedVariation; }
00566
00567 void SetCurvature (
00568 const CURVATURE curvature
00569 ) { m_Curvature = curvature; }
00570
00571 void SetDuplicateHandling (
00572 DUPLICATE DuplicateHandling
00573 ) { m_DuplicateHandling = DuplicateHandling; }
00574
00575 void SetGridRatio (
00576 const GRIDRATIO gridratio
00577 ) { m_GridRatio = gridratio; }
00578
00579 void SetInitialization (
00580 const INITIALIZATION initialization
00581 ) { m_Initialization = initialization; }
00582
00583 void SetDistanceUnit (
00584 const int unit
00585 ) { m_DistanceUnit = unit; }
00586
00587 double SetMatchingTolerance (
00588 const double tolerance
00589 ) { m_MatchingTolerance = MAX(tolerance, 0.0); return m_MatchingTolerance; }
00590
00591 INT32 SetMaximumIterations (
00592 const INT32 iterations
00593 ) { m_MaximumIterations = bound(iterations, 1, 1000); return m_MaximumIterations; }
00594
00595 double SetMinimumMatches (
00596 const double matches
00597 ) { m_MinimumMatches = bound(matches,10.0, 100.0); return m_MinimumMatches; }
00598
00599 void SetSearchArea (
00600 const SEARCHAREA area
00601 ) { m_SearchArea = area; }
00602
00603 double SetSearchDistance (
00604 const double distance
00605 ) { m_SearchDistance = bound(distance, DBL_MIN, DBL_MAX); return m_SearchDistance; }
00606
00607 double SetTension (
00608 const double tension
00609 ) { m_Tension = bound(tension, 0.0, 1.0); return m_Tension; }
00610
00611 double SetWeightingPower (
00612 const double power
00613 ) { m_WeightingPower = bound(power, 1.0, 20.0); return m_WeightingPower; }
00614
00615 private:
00616
00617 #ifndef GENERATING_DOXYGEN_OUTPUT
00618 CURVATURE m_Curvature;
00619 GRIDRATIO m_GridRatio;
00620 INITIALIZATION m_Initialization;
00621 DUPLICATE m_DuplicateHandling;
00622 SEARCHAREA m_SearchArea;
00623 INT32 m_MaximumIterations;
00624 int m_DistanceUnit;
00625 double m_AllowedVariation;
00626 double m_MatchingTolerance;
00627 double m_MinimumMatches;
00628 double m_SearchDistance;
00629 double m_Tension;
00630 double m_WeightingPower;
00631 #endif // GENERATING_DOXYGEN_OUTPUT
00632 };
00633
00634
00636 class UNIVARIATECURVE_PARAMETERS : public METHOD_PARAMETERS {
00637 public:
00638
00639 enum INTERPOLATION {
00640 INTERPOLATION_Linear = 0,
00641 INTERPOLATION_Cubic = 1,
00642 INTERPOLATION_Hermite = 2
00643 };
00644
00645 enum SLOPE {
00646 SLOPE_Linear = 0,
00647 SLOPE_Quadratic = 1
00648 };
00649
00650 UNIVARIATECURVE_PARAMETERS (
00651 );
00652
00653 SLOPE GetSlope (
00654 ) const { return m_Slope; }
00655
00656 INTERPOLATION GetInterpolation (
00657 ) const { return m_Interpolation; }
00658
00659 void SetSlope (
00660 const SLOPE slope
00661 ) { m_Slope = slope; }
00662
00663 void SetInterpolation (
00664 const INTERPOLATION interpolation
00665 ) {m_Interpolation = interpolation; }
00666
00667 private:
00668
00669 #ifndef GENERATING_DOXYGEN_OUTPUT
00670 INTERPOLATION m_Interpolation;
00671 SLOPE m_Slope;
00672 #endif // GENERATING_DOXYGEN_OUTPUT
00673 };
00674
00675
00677 class INVERSEDISTANCE_PARAMETERS : public METHOD_PARAMETERS {
00678 public:
00679
00680 enum SEARCHAREA {
00681 SEARCHAREA_Circle = 0,
00682 SEARCHAREA_Square = 1,
00683 SEARCHAREA_Diamond = 2
00684 };
00685
00686 INVERSEDISTANCE_PARAMETERS (
00687 );
00688
00689 int GetDistanceUnit (
00690 ) const { return m_DistanceUnit; }
00691
00692 SEARCHAREA GetSearchArea (
00693 ) const { return m_SearchArea; }
00694
00695 double GetSearchDistance (
00696 ) const { return m_SearchDistance; }
00697
00698 double GetWeightingPower (
00699 ) const { return m_WeightingPower; }
00700
00701 void SetDistanceUnit (
00702 const int unit
00703 ) { m_DistanceUnit = unit; }
00704
00705 void SetSearchArea (
00706 const SEARCHAREA area
00707 ) { m_SearchArea = area; }
00708
00709 double SetSearchDistance (
00710 const double distance
00711 ) { m_SearchDistance = bound(distance, DBL_MIN, DBL_MAX); return m_SearchDistance; }
00712
00713 double SetWeightingPower (
00714 const double power
00715 ) { m_WeightingPower = bound(power, 1.0, 20.0); return m_WeightingPower; }
00716
00717 private:
00718
00719 #ifndef GENERATING_DOXYGEN_OUTPUT
00720 double m_SearchDistance;
00721 int m_DistanceUnit;
00722 SEARCHAREA m_SearchArea;
00723 double m_WeightingPower;
00724 #endif // GENERATING_DOXYGEN_OUTPUT
00725 };
00726
00727
00729 class PROFILES_PARAMETERS : public METHOD_PARAMETERS {
00730 public:
00731
00732 PROFILES_PARAMETERS (
00733 );
00734
00735 int GetDistanceUnit (
00736 ) const { return m_DistanceUnit; }
00737
00738 double GetSearchDistance (
00739 ) const { return m_SearchDistance; }
00740
00741 void SetDistanceUnit (
00742 const int unit
00743 ) { m_DistanceUnit = unit; }
00744
00745 double SetSearchDistance (
00746 const double distance
00747 ) { m_SearchDistance = bound(distance, DBL_MIN, DBL_MAX); return m_SearchDistance; }
00748
00749
00750 private:
00751
00752 #ifndef GENERATING_DOXYGEN_OUTPUT
00753 double m_SearchDistance;
00754 int m_DistanceUnit;
00755 #endif // GENERATING_DOXYGEN_OUTPUT
00756 };
00757
00758
00760 class POLYNOMIAL_PARAMETERS : public METHOD_PARAMETERS {
00761 public:
00762
00763 POLYNOMIAL_PARAMETERS (
00764 );
00765
00766 UINT8 GetOrder (
00767 ) const { return m_Order; }
00768
00769 bool GetSaveCoefficients (
00770 ) const { return m_SaveCoefficients; }
00771
00772 UINT8 SetOrder (
00773 const UINT8 order
00774 ) { m_Order = bound(order, 1, 20); return m_Order; }
00775
00776 void SetSaveCoefficients (
00777 const bool save
00778 ) { m_SaveCoefficients = save; }
00779
00780 private:
00781
00782 #ifndef GENERATING_DOXYGEN_OUTPUT
00783 UINT8 m_Order;
00784 bool m_SaveCoefficients;
00785 #endif // GENERATING_DOXYGEN_OUTPUT
00786 };
00787
00788
00790 class KRIGING_PARAMETERS : public METHOD_PARAMETERS {
00791 public:
00792
00793
00794 KRIGING_PARAMETERS (
00795 );
00796
00797 const KRIGING& GetKriging (
00798 ) const;
00799
00800 KRIGING& GetKriging (
00801 );
00802
00803 bool GetMakeDrift (
00804 ) const { return m_MakeStandardError; }
00805
00806 bool GetMakeStandardError (
00807 ) const { return m_MakeDrift; }
00808
00809 void SetMakeDrift (
00810 const bool make
00811 ) { m_MakeStandardError = make; }
00812
00813 void SetMakeStandardError (
00814 const bool make
00815 ) { m_MakeDrift = make; }
00816
00817
00818 private:
00819
00820 #ifndef GENERATING_DOXYGEN_OUTPUT
00821 KRIGING m_Kriging;
00822 bool m_MakeStandardError;
00823 bool m_MakeDrift;
00824 #endif // GENERATING_DOXYGEN_OUTPUT
00825 };
00826
00827
00829 class TRIANGLEINTERPOLATION_PARAMETERS : public METHOD_PARAMETERS {
00830 public:
00831
00832 enum INTERPOLATION {
00833 INTERPOLATION_Linear = 0,
00834 INTERPOLATION_Quintic = 1,
00835 INTERPOLATION_ModifiedQuintic = 2,
00836 INTERPOLATION_Nonic = 3
00837 };
00838
00839 TRIANGLEINTERPOLATION_PARAMETERS (
00840 );
00841
00842 INTERPOLATION GetInterpolation (
00843 ) const { return m_Interpolation; }
00844
00845 void SetInterpolation (
00846 const INTERPOLATION interpolation
00847 ) { m_Interpolation = interpolation; }
00848
00849 private:
00850
00851 #ifndef GENERATING_DOXYGEN_OUTPUT
00852 INTERPOLATION m_Interpolation;
00853 #endif // GENERATING_DOXYGEN_OUTPUT
00854 };
00855
00857 class BIDIRECTIONAL_PARAMETERS : public METHOD_PARAMETERS {
00858 public:
00859
00860 enum DIRECTIONTYPE {
00861 DIRECTIONTYPE_Manual = 0,
00862 DIRECTIONTYPE_Auto = 1
00863 };
00864
00865 BIDIRECTIONAL_PARAMETERS (
00866 );
00867
00868 POLYLINE::SPLINE GetAcrossLineSplineType (
00869 ) const { return m_AcrossLineSplineType; }
00870
00871 POLYLINE::SPLINE GetAlongLineSplineType (
00872 ) const { return m_AlongLineSplineType; }
00873
00874 double GetAzimuth (
00875 ) const { return m_Azimuth; }
00876
00877 DIRECTIONTYPE GetDirectionType (
00878 ) const { return m_DirectionType; }
00879
00880 void SetAcrossLineSplineType (
00881 const POLYLINE::SPLINE spline
00882 ) { m_AcrossLineSplineType = spline; }
00883
00884 void SetAlongLineSplineType (
00885 const POLYLINE::SPLINE spline
00886 ) { m_AlongLineSplineType = spline; }
00887
00888 void SetAzimuth (
00889 const double azimuth
00890 ) { m_Azimuth = azimuth; }
00891
00892 void SetDirectionType (
00893 const DIRECTIONTYPE type
00894 ) { m_DirectionType = type; }
00895
00896 private:
00897
00898 #ifndef GENERATING_DOXYGEN_OUTPUT
00899 POLYLINE::SPLINE m_AlongLineSplineType;
00900 POLYLINE::SPLINE m_AcrossLineSplineType;
00901 DIRECTIONTYPE m_DirectionType;
00902 double m_Azimuth;
00903 #endif // GENERATING_DOXYGEN_OUTPUT
00904 };
00905
00907 class GEOMETRIC_ITERATOR {
00908 public:
00909
00912 GEOMETRIC_ITERATOR (
00913 ) {
00914 }
00915
00917 virtual ~GEOMETRIC_ITERATOR (
00918 ) {}
00919
00921 GEOMETRIC_ITERATOR& operator++ (
00922 ) { return (v_Increment()); }
00923
00925 INT64 GetElementID (
00926 ) const { return (v_GetElementID()); }
00927
00929 double GetPosition (
00930 ) const { return (v_GetPosition()); }
00931
00933 bool IsDone (
00934 ) const { return (v_IsDone()); }
00935
00938 int Restart (
00939 ) { return (v_Restart()); }
00940
00941 private:
00942 #ifndef GENERATING_DOXYGEN_OUTPUT
00945 virtual INT64 v_GetElementID (
00946 ) const { return -1; }
00947
00950 virtual double v_GetPosition (
00951 ) const { return 1.0; }
00952
00954 virtual GEOMETRIC_ITERATOR& v_Increment () = 0;
00955
00957 virtual bool v_IsDone () const = 0;
00958
00962 virtual ERRVALUE v_Restart (
00963 ) { return false; }
00964
00965 GEOMETRIC_ITERATOR (const GEOMETRIC_ITERATOR& rhs);
00966 GEOMETRIC_ITERATOR& operator=(const GEOMETRIC_ITERATOR& rhs);
00967 #endif // GENERATING_DOXYGEN_OUTPUT
00968 };
00969
00971 class GEOMETRIC_ITERATOR_POINT : public GEOMETRIC_ITERATOR {
00972 public:
00973
00975 explicit GEOMETRIC_ITERATOR_POINT (
00976 DIMENSION dim = DIMENSION_2D
00977 ) : m_Dimension(dim) {}
00978
00980 virtual ~GEOMETRIC_ITERATOR_POINT (
00981 ) {}
00982
00983 GEOMETRIC_ITERATOR_POINT& operator=(
00984 const GEOMETRIC_ITERATOR_POINT& rhs
00985 ) { if (this != &rhs) { m_Dimension = rhs.m_Dimension; } return (*this); }
00986
00988 const DPOINT3D& operator* (
00989 ) const { return (m_Point); }
00990
00992 const DPOINT3D* operator-> (
00993 ) const { return (&m_Point); }
00994
00995 protected:
00996 DPOINT3D m_Point;
00997
00998 DIMENSION GetDimension (
00999 ) const { return (m_Dimension); }
01000
01001 private:
01002 #ifndef GENERATING_DOXYGEN_OUTPUT
01003 DIMENSION m_Dimension;
01004 #endif // GENERATING_DOXYGEN_OUTPUT
01005 };
01006
01008 class GEOMETRIC_ITERATOR_LINE : public GEOMETRIC_ITERATOR {
01009 public:
01010
01012 explicit GEOMETRIC_ITERATOR_LINE (
01013 DIMENSION dim = DIMENSION_2D
01014 ) : m_Dimension(dim), m_Polyline(false, dim) {}
01015
01017 virtual ~GEOMETRIC_ITERATOR_LINE (
01018 ) {}
01019
01020 GEOMETRIC_ITERATOR_LINE& operator=(
01021 const GEOMETRIC_ITERATOR_LINE& rhs
01022 ) { if (this != &rhs) { m_Dimension = rhs.m_Dimension; } return (*this); }
01023
01025 const POLYLINE& operator* (
01026 ) const { return (m_Polyline); }
01027
01029 const POLYLINE* operator-> (
01030 ) const { return (&m_Polyline); }
01031
01032 protected:
01033 POLYLINE m_Polyline;
01034
01035 DIMENSION GetDimension (
01036 ) const { return (m_Dimension); }
01037
01038 private:
01039 #ifndef GENERATING_DOXYGEN_OUTPUT
01040 DIMENSION m_Dimension;
01041 #endif // GENERATING_DOXYGEN_OUTPUT
01042 };
01043
01044
01045 class GEOMETRIC_SOURCE {
01046 public:
01047
01048 GEOMETRIC_SOURCE (
01049 ) {}
01050
01051 virtual ~GEOMETRIC_SOURCE (
01052 ) {}
01053
01054 enum COMPONENT {
01055 COMPONENT_Point = 0,
01056 COMPONENT_Line = 1,
01057 COMPONENT_SubRegion = 2
01058 };
01059
01060 bool IsComponentAvailable (
01061 const COMPONENT component
01062 ) const { return v_IsComponentAvailable(component); }
01063
01064 GEOMETRIC_ITERATOR_POINT* GetPoints (
01065 ) { return v_GetPoints(); }
01066
01067 GEOMETRIC_ITERATOR_LINE* GetLines (
01068 ) { return v_GetLines(); }
01069
01070 private:
01071 #ifndef GENERATING_DOXYGEN_OUTPUT
01072 virtual bool v_IsComponentAvailable (const COMPONENT component) const = 0;
01073 virtual GEOMETRIC_ITERATOR_POINT* v_GetPoints() = 0;
01074 virtual GEOMETRIC_ITERATOR_LINE* v_GetLines() = 0;
01075 #endif // GENERATING_DOXYGEN_OUTPUT
01076 };
01077
01079 static ERRVALUE DoBlanking (
01080 const RVC::OBJITEM& ObjItemSrc,
01081 const RVC::OBJITEM& ObjItemTgt,
01082 const SOURCE_PARAMETERS& SrcParameters,
01083 const DESTINATION_PARAMETERS& DestParameters,
01084 UINT16 BlankDistance
01085 );
01086
01088 static ERRVALUE Process (
01089 const RVC::OBJITEM& SrcObjItem,
01090 RVC::OBJITEM& DestObjItem,
01091 const SOURCE_PARAMETERS* SrcParameters,
01092 const METHOD_PARAMETERS* MethodParameters,
01093 const DESTINATION_PARAMETERS& DestParameters
01094 );
01095
01097 static ERRVALUE ProcessMinimumCurvature (
01098 const RVC::OBJITEM& SrcObjItem,
01099 RVC::OBJITEM& DestObjItem,
01100 const SOURCE_PARAMETERS* SrcParameters,
01101 const MINIMUMCURVATURE_PARAMETERS& MinimumCurvatureParameters,
01102 const DESTINATION_PARAMETERS& DestParameters
01103 );
01104
01106 static ERRVALUE ProcessUnivariateCurve (
01107 const RVC::OBJITEM& SrcObjItem,
01108 RVC::OBJITEM& DestObjItem,
01109 const SOURCE_PARAMETERS* SrcParameters,
01110 const UNIVARIATECURVE_PARAMETERS& UnivariateCurveParameters,
01111 const DESTINATION_PARAMETERS& DestParameters
01112 );
01113
01115 static ERRVALUE ProcessInverseDistance (
01116 const RVC::OBJITEM& SrcObjItem,
01117 RVC::OBJITEM& DestObjItem,
01118 const SOURCE_PARAMETERS* SrcParameters,
01119 const INVERSEDISTANCE_PARAMETERS& InverseDistanceParameters,
01120 const DESTINATION_PARAMETERS& DestParameters
01121 );
01122
01124 static ERRVALUE ProcessProfiles (
01125 const RVC::OBJITEM& SrcObjItem,
01126 RVC::OBJITEM& DestObjItem,
01127 const SOURCE_PARAMETERS* SrcParameters,
01128 const PROFILES_PARAMETERS& ProfilesParameters,
01129 const DESTINATION_PARAMETERS& DestParameters
01130 );
01131
01133 static ERRVALUE ProcessPolynomial (
01134 const RVC::OBJITEM& SrcObjItem,
01135 RVC::OBJITEM& DestObjItem,
01136 const SOURCE_PARAMETERS* SrcParameters,
01137 const POLYNOMIAL_PARAMETERS& PolynomialParameters,
01138 const DESTINATION_PARAMETERS& DestParameters
01139 );
01140
01142 static ERRVALUE ProcessKriging (
01143 const RVC::OBJITEM& SrcObjItem,
01144 RVC::OBJITEM& DestObjItem,
01145 const SOURCE_PARAMETERS* SrcParameters,
01146 const KRIGING_PARAMETERS& KrigingParameters,
01147 const DESTINATION_PARAMETERS& DestParameters
01148 );
01149
01151 static ERRVALUE ProcessTriangleInterpolation (
01152 const RVC::OBJITEM& SrcObjItem,
01153 RVC::OBJITEM& DestObjItem,
01154 const SOURCE_PARAMETERS* SrcParameters,
01155 const TRIANGLEINTERPOLATION_PARAMETERS& TriangleInterpolationParameters,
01156 const DESTINATION_PARAMETERS& DestParameters
01157 );
01158
01160 static ERRVALUE ProcessBidirectional (
01161 const RVC::OBJITEM& SrcObjItem,
01162 RVC::OBJITEM& DestObjItem,
01163 const SOURCE_PARAMETERS* SrcParameters,
01164 const BIDIRECTIONAL_PARAMETERS& BidirectionalParameters,
01165 const DESTINATION_PARAMETERS& DestParameters
01166 );
01167
01169 static ERRVALUE GetPoints (
01170 const RVC::OBJITEM& SrcObjItem,
01171 const SOURCE_PARAMETERS* SrcParameters,
01172 POLYLINE& polyline
01173 );
01174
01176 static RVC::OP::SURFACEFITTING::GEOMETRIC_SOURCE* GetGeometricSource (
01177 const RVC::OBJITEM& SrcObjItem,
01178 const SOURCE_PARAMETERS* SrcParameters
01179 );
01180
01182 static ERRVALUE MakeDestination (
01183 RVC::OBJITEM& DestObjItem,
01184 const RVC::OP::SURFACEFITTING::DESTINATION_PARAMETERS& DestParameters,
01185 RVC::RASTER& raster
01186 );
01187
01189 static ERRVALUE GetTransformation (
01190 const RVC::OBJITEM& SrcObjItem,
01191 const SOURCE_PARAMETERS* SrcParameters,
01192 TRANS2D_MAPGEN& transformation
01193 );
01194
01195 private:
01196
01197 #ifndef GENERATING_DOXYGEN_OUTPUT
01198 static ERRVALUE GetVectorPoints (const RVC::OBJITEM& SrcObjItem, const VECTOR_PARAMETERS& VectorParameters, POLYLINE& polyline);
01199 static ERRVALUE GetTablePoints (const RVC::OBJITEM& SrcObjItem, const TABLE_PARAMETERS& TableParameters, POLYLINE& polyline);
01200 static ERRVALUE GetTINPoints (const RVC::OBJITEM& SrcObjItem, const TIN_PARAMETERS& TINParameters, POLYLINE& polyline);
01201 static ERRVALUE GetShapePoints (const RVC::OBJITEM& SrcObjItem, const SHAPE_PARAMETERS& ShapeParameters, POLYLINE& polyline);
01202 #endif // GENERATING_DOXYGEN_OUTPUT
01203
01204 };
01205
01206 }
01207 }
01208
01209
01210 #endif // INC_RVC_OPSURFACEFITTING_H