VTK  9.0.1
vtkGeoProjection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoProjection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
29 #ifndef vtkGeoProjection_h
30 #define vtkGeoProjection_h
31 
32 #include "vtkGeovisCoreModule.h" // For export macro
33 #include "vtkObject.h"
34 
35 struct PJconsts;
36 typedef struct PJconsts PJ;
37 typedef PJ* projPJ;
38 
39 class VTKGEOVISCORE_EXPORT vtkGeoProjection : public vtkObject
40 {
41 public:
42  static vtkGeoProjection* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44  vtkTypeMacro(vtkGeoProjection, vtkObject);
45 
49  static int GetNumberOfProjections();
50 
56  static const char* GetProjectionName(int projection);
57 
62  static const char* GetProjectionDescription(int projection);
63 
65 
71  vtkSetStringMacro(Name);
72  vtkGetStringMacro(Name);
74 
79  int GetIndex();
80 
85  const char* GetDescription();
86 
88 
92  vtkSetMacro(CentralMeridian, double);
93  vtkGetMacro(CentralMeridian, double);
95 
105 
110  void SetOptionalParameter(const char* key, const char* value);
111 
115  void RemoveOptionalParameter(const char*);
116 
121 
125  const char* GetOptionalParameterKey(int index);
126 
131 
136 
138 
146  vtkSetStringMacro(PROJ4String);
147  vtkGetStringMacro(PROJ4String);
149 
150 protected:
152  ~vtkGeoProjection() override;
153 
160  virtual int UpdateProjection();
161 
162  char* Name;
166  char* PROJ4String;
167 
168 private:
169  vtkGeoProjection(const vtkGeoProjection&) = delete;
170  void operator=(const vtkGeoProjection&) = delete;
171 
172  class vtkInternals;
173  vtkInternals* Internals;
174 };
175 
176 #endif // vtkGeoProjection_h
vtkGeoProjection::GetOptionalParameterValue
const char * GetOptionalParameterValue(int index)
Return the number of optional parameters.
vtkGeoProjection::~vtkGeoProjection
~vtkGeoProjection() override
vtkX3D::value
@ value
Definition: vtkX3D.h:226
vtkGeoProjection::PROJ4String
char * PROJ4String
Definition: vtkGeoProjection.h:166
vtkX3D::key
@ key
Definition: vtkX3D.h:263
vtkGeoProjection::GetProjection
projPJ GetProjection()
Return a pointer to the PROJ.4 data structure describing this projection.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkGeoProjection::GetOptionalParameterKey
const char * GetOptionalParameterKey(int index)
Return the number of optional parameters.
vtkGeoProjection::GetProjectionName
static const char * GetProjectionName(int projection)
Returns the name of one of the projections supported by this class.
vtkGeoProjection::GetNumberOfOptionalParameters
int GetNumberOfOptionalParameters()
Return the number of optional parameters.
vtkGeoProjection::ProjectionMTime
vtkMTimeType ProjectionMTime
Definition: vtkGeoProjection.h:165
PJ
struct PJconsts PJ
Definition: vtkGeoProjection.h:36
vtkGeoProjection::UpdateProjection
virtual int UpdateProjection()
Determine whether the current projection structure has any changes pending and apply them if necessar...
vtkGeoProjection::SetOptionalParameter
void SetOptionalParameter(const char *key, const char *value)
Add an optional parameter to the projection that will be computed or replace it if already present.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkGeoProjection::ClearOptionalParameters
void ClearOptionalParameters()
Clear all optional parameters.
vtkGeoProjection::RemoveOptionalParameter
void RemoveOptionalParameter(const char *)
Remove an optional parameter to the projection that will be computed.
vtkGeoProjection::New
static vtkGeoProjection * New()
vtkObject.h
vtkGeoProjection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkGeoProjection::GetNumberOfProjections
static int GetNumberOfProjections()
Returns the number of projections that this class offers.
vtkGeoProjection::GetDescription
const char * GetDescription()
Get the description of a projection.
projPJ
PJ * projPJ
Definition: vtkGeoProjection.h:37
vtkGeoProjection::GetProjectionDescription
static const char * GetProjectionDescription(int projection)
Returns a description of one of the projections supported by this class.
vtkGeoProjection
Represent a projection from a sphere to a plane.
Definition: vtkGeoProjection.h:40
vtkGeoProjection::GetIndex
int GetIndex()
Return the index of the current projection's type in the list of all projection types.
vtkGeoProjection::vtkGeoProjection
vtkGeoProjection()
vtkGeoProjection::Name
char * Name
Definition: vtkGeoProjection.h:162
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkGeoProjection::Projection
projPJ Projection
Definition: vtkGeoProjection.h:164
vtkGeoProjection::CentralMeridian
double CentralMeridian
Definition: vtkGeoProjection.h:163
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293