00001 00027 #ifndef INC_MI32_REGIONGEN_H 00028 #define INC_MI32_REGIONGEN_H 00029 00030 #ifndef INC_MI32_RASTERGEN_H 00031 #include <mi32/rastergen.h> 00032 #endif 00033 00034 00035 #ifndef GENERATING_DOXYGEN_OUTPUT 00036 class REGION2D; 00037 namespace RVC { 00038 class GEOSPATIAL; 00039 } 00040 #endif 00041 00042 //===================================================================================================================== 00043 00045 class REGIONGEN { 00046 public: 00047 00049 REGIONGEN (); 00050 00052 virtual ~REGIONGEN (); 00053 00055 ERRVALUE Compute ( 00056 REGION2D& RegionResult 00057 ) const { return (v_Compute(RegionResult)); } 00058 00059 bool IsReturnMapCRS ( 00060 ) const { return (m_ReturnMapCRS); } 00061 00065 void SetReturnMapCRS ( 00066 bool ReturnMapCRS 00067 ) { m_ReturnMapCRS = ReturnMapCRS; } 00068 00069 protected: 00070 00073 ERRVALUE ConvertToMapCRS ( 00074 const RVC::GEOSPATIAL& ObjSource, 00075 REGION2D& RegionResult 00076 ) const; 00077 00078 private: 00079 #ifndef GENERATING_DOXYGEN_OUTPUT 00080 bool m_ReturnMapCRS; 00081 #endif 00082 00084 virtual ERRVALUE v_Compute ( 00085 REGION2D& RegionResult 00086 ) const = 0; 00087 }; 00088 00089 00090 //===================================================================================================================== 00091 00093 class REGIONGEN_RASTER_BINARY : public REGIONGEN { 00094 public: 00095 00097 REGIONGEN_RASTER_BINARY (); 00098 00100 ~REGIONGEN_RASTER_BINARY (); 00101 00103 const RVC::OBJITEM& GetSource ( 00104 ) const { return (m_ObjItemSource); } 00105 00107 void SetSource ( 00108 const RVC::OBJITEM& ObjItemSource 00109 ) { m_ObjItemSource = ObjItemSource; } 00110 00111 private: 00112 #ifndef GENERATING_DOXYGEN_OUTPUT 00113 00114 RVC::OBJITEM m_ObjItemSource; 00115 00116 ERRVALUE v_Compute ( 00117 REGION2D& RegionResult 00118 ) const; 00119 00120 #endif 00121 }; 00122 00123 00124 //===================================================================================================================== 00125 00127 class REGIONGEN_RASTER_NONULL : public REGIONGEN { 00128 public: 00129 00131 REGIONGEN_RASTER_NONULL (); 00132 00134 ~REGIONGEN_RASTER_NONULL (); 00135 00137 const RVC::OBJITEM& GetSource ( 00138 ) const { return (m_ObjItemSource); } 00139 00141 void SetSource ( 00142 const RVC::OBJITEM& ObjItemSource 00143 ) { m_ObjItemSource = ObjItemSource; } 00144 00145 private: 00146 #ifndef GENERATING_DOXYGEN_OUTPUT 00147 00148 RVC::OBJITEM m_ObjItemSource; 00149 00150 ERRVALUE v_Compute ( 00151 REGION2D& RegionResult 00152 ) const; 00153 00154 #endif 00155 }; 00156 00157 00158 //===================================================================================================================== 00159 00161 class REGIONGEN_RASTER_VALUES : public REGIONGEN { 00162 public: 00163 00165 REGIONGEN_RASTER_VALUES (); 00166 00168 ~REGIONGEN_RASTER_VALUES (); 00169 00171 double GetMaxDifference ( 00172 ) const { return (m_MaxDifference); } 00173 00175 const RVC::OBJITEM& GetSource ( 00176 ) const { return (m_ObjItemSource); } 00177 00179 const DOUBLE_ARRAY<double>& GetValues ( 00180 ) const { return (m_Values); } 00181 00183 void SetMaxDifference ( 00184 double MaxDifference 00185 ) { m_MaxDifference = MaxDifference; } 00186 00188 void SetSource ( 00189 const RVC::OBJITEM& ObjItemSource 00190 ) { m_ObjItemSource = ObjItemSource; } 00191 00194 void SetValue ( 00195 double value 00196 ); 00197 00200 void SetValues ( 00201 const DOUBLE_ARRAY<double>& values 00202 ); 00203 00206 void SetValues ( 00207 const double* values, 00208 int numvalues 00209 ); 00210 00211 private: 00212 #ifndef GENERATING_DOXYGEN_OUTPUT 00213 00214 RVC::OBJITEM m_ObjItemSource; 00215 DOUBLE_ARRAY<double> m_Values; 00216 double m_MaxDifference; 00217 00218 ERRVALUE v_Compute ( 00219 REGION2D& RegionResult 00220 ) const; 00221 00222 #endif 00223 }; 00224 00225 00226 //===================================================================================================================== 00227 00229 class REGIONGEN_RASTER_RANGES : public REGIONGEN { 00230 public: 00231 00233 REGIONGEN_RASTER_RANGES (); 00234 00236 ~REGIONGEN_RASTER_RANGES (); 00237 00239 const DOUBLE_ARRAY<DOUBLE_RANGE>& GetRanges ( 00240 ) const { return (m_Ranges); } 00241 00243 const RVC::OBJITEM& GetSource ( 00244 ) const { return (m_ObjItemSource); } 00245 00248 void SetRange ( 00249 const DOUBLE_RANGE& range 00250 ); 00251 00254 void SetRange ( 00255 double min, 00256 double max 00257 ); 00258 00261 void SetRanges ( 00262 const DOUBLE_ARRAY<DOUBLE_RANGE>& ranges 00263 ); 00264 00266 void SetSource ( 00267 const RVC::OBJITEM& ObjItemSource 00268 ) { m_ObjItemSource = ObjItemSource; } 00269 00270 private: 00271 #ifndef GENERATING_DOXYGEN_OUTPUT 00272 00273 RVC::OBJITEM m_ObjItemSource; 00274 DOUBLE_ARRAY<DOUBLE_RANGE> m_Ranges; 00275 00276 ERRVALUE v_Compute ( 00277 REGION2D& RegionResult 00278 ) const; 00279 00280 #endif 00281 }; 00282 00283 00284 //===================================================================================================================== 00285 00287 class REGIONGEN_RASTER_SEEDED : public REGIONGEN { 00288 public: 00289 00291 enum METHOD { 00292 METHOD_Solid, 00293 METHOD_Boundary 00294 }; 00295 00297 REGIONGEN_RASTER_SEEDED (); 00298 00300 ~REGIONGEN_RASTER_SEEDED (); 00301 00303 const DOUBLE_ARRAY<DPOINT2D>& GetBoundaryPoints ( 00304 ) const { return (m_BoundaryPoints); } 00305 00307 const DOUBLE_ARRAY<double>& GetBoundaryValues ( 00308 ) const { return (m_BoundaryValues); } 00309 00311 double GetMaxDifference ( 00312 ) const { return (m_MaxDifference); } 00313 00315 METHOD GetMethod ( 00316 ) const { return (m_Method); } 00317 00319 const SPATREF::COORDREFSYS& GetPointCRS ( 00320 ) const { return (m_PointCRS); } 00321 00323 const DOUBLE_ARRAY<DPOINT2D>& GetSeedPoints ( 00324 ) const { return (m_SeedPoints); } 00325 00327 const RVC::OBJITEM& GetSource ( 00328 ) const { return (m_ObjItemSource); } 00329 00333 void SetBoundaryPoints ( 00334 const DOUBLE_ARRAY<DPOINT2D>& BoundaryPoints 00335 ); 00336 00340 void SetBoundaryValue ( 00341 double value 00342 ); 00343 00347 void SetBoundaryValues ( 00348 const DOUBLE_ARRAY<double>& values 00349 ); 00350 00353 void SetMaxDifference ( 00354 double MaxDifference 00355 ) { m_MaxDifference = MaxDifference; } 00356 00359 void SetMethod ( 00360 METHOD Method 00361 ) { m_Method = Method; } 00362 00365 void SetPointCRS ( 00366 const SPATREF::COORDREFSYS& PointCRS 00367 ) { m_PointCRS = PointCRS; } 00368 00370 void SetSeedPoint ( 00371 const DPOINT2D& SeedPoint 00372 ); 00373 00375 void SetSeedPoints ( 00376 const DOUBLE_ARRAY<DPOINT2D>& SeedPoints 00377 ); 00378 00380 void SetSource ( 00381 const RVC::OBJITEM& ObjItemSource 00382 ) { m_ObjItemSource = ObjItemSource; } 00383 00384 private: 00385 #ifndef GENERATING_DOXYGEN_OUTPUT 00386 00387 class JOB; 00388 00389 RVC::OBJITEM m_ObjItemSource; 00390 DOUBLE_ARRAY<DPOINT2D> m_SeedPoints; 00391 SPATREF::COORDREFSYS m_PointCRS; 00392 DOUBLE_ARRAY<DPOINT2D> m_BoundaryPoints; 00393 DOUBLE_ARRAY<double> m_BoundaryValues; 00394 double m_MaxDifference; 00395 METHOD m_Method; 00396 00397 ERRVALUE v_Compute ( 00398 REGION2D& RegionResult 00399 ) const; 00400 00401 #endif 00402 }; 00403 00404 00405 //===================================================================================================================== 00406 00408 class REGIONGEN_VIEWSHED : public REGIONGEN, public RASTERGEN_VIEWSHED { 00409 public: 00410 00411 REGIONGEN_VIEWSHED ( 00412 ); 00413 00414 virtual ~REGIONGEN_VIEWSHED ( 00415 ); 00416 00417 private: 00418 #ifndef GENERATING_DOXYGEN_OUTPUT 00419 00420 ERRVALUE v_Compute ( 00421 REGION2D& RegionResult 00422 ) const; 00423 00424 #endif 00425 }; 00426 00427 //===================================================================================================================== 00428 00429 #endif // INC_MI32_REGIONGEN_H
1.6.1