00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00036 #ifndef __vtkGeoGraticule_h
00037 #define __vtkGeoGraticule_h
00038
00039 #include "vtkPolyDataAlgorithm.h"
00040
00041 class vtkPolyData;
00042
00043 class VTK_GEOVIS_EXPORT vtkGeoGraticule : public vtkPolyDataAlgorithm
00044 {
00045 public:
00046 static vtkGeoGraticule* New();
00047 virtual void PrintSelf( ostream& os, vtkIndent indent );
00048 vtkTypeMacro(vtkGeoGraticule,vtkPolyDataAlgorithm);
00049
00051
00052 vtkSetVector2Macro(LatitudeBounds,double);
00053 vtkGetVector2Macro(LatitudeBounds,double);
00055
00057
00058 vtkSetVector2Macro(LongitudeBounds,double);
00059 vtkGetVector2Macro(LongitudeBounds,double);
00061
00062
00063 enum LevelLimits {
00064 LEVEL_MIN = 0,
00065 LEVEL_MAX = 11,
00066 NUMBER_OF_LEVELS = ( LEVEL_MAX - LEVEL_MIN + 1 )
00067 };
00068
00069
00071
00072 vtkSetClampMacro(LatitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
00073 vtkGetMacro(LatitudeLevel,int);
00075
00077
00078 vtkSetClampMacro(LongitudeLevel,int,LEVEL_MIN,LEVEL_MAX);
00079 vtkGetMacro(LongitudeLevel,int);
00081
00083
00084 static double GetLatitudeDelta(int level)
00085 { return LatitudeLevelTics[level]; }
00087
00089
00090 static double GetLongitudeDelta(int level)
00091 { return LongitudeLevelTics[level]; }
00093
00095
00098 vtkSetMacro(GeometryType,int);
00099 vtkGetMacro(GeometryType,int);
00101
00102
00103 enum GeometryType {
00104 POLYLINES = 0x1,
00105 QUADRILATERALS = 0x2
00106 };
00107
00108
00109 protected:
00110 vtkGeoGraticule();
00111 virtual ~vtkGeoGraticule();
00112
00113 int GeometryType;
00114 double LatitudeBounds[2];
00115 double LongitudeBounds[2];
00116 int LatitudeLevel;
00117 int LongitudeLevel;
00118
00120
00121 static double LatitudeLevelTics[NUMBER_OF_LEVELS];
00122 static double LongitudeLevelTics[NUMBER_OF_LEVELS];
00124
00125 virtual int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00126
00127 void GenerateGraticule( vtkPolyData* output, double latbds[2], double lngbds[2] );
00128 int ComputeLineLevel( int ticId, int baseLevel, const double* levelIncrements );
00129
00130 private:
00131 vtkGeoGraticule( const vtkGeoGraticule& );
00132 void operator = ( const vtkGeoGraticule& );
00133 };
00134
00135 #endif // __vtkGeoGraticule_h