VTK  9.3.20240424
vtkGeoProjection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3// SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
16#ifndef vtkGeoProjection_h
17#define vtkGeoProjection_h
18
19#include "vtkGeovisCoreModule.h" // For export macro
20#include "vtkObject.h"
21
22struct PJconsts;
23typedef struct PJconsts PJ;
24typedef PJ* projPJ;
25
26VTK_ABI_NAMESPACE_BEGIN
27
28class VTKGEOVISCORE_EXPORT vtkGeoProjection : public vtkObject
29{
30public:
32 void PrintSelf(ostream& os, vtkIndent indent) override;
34
39
45 static const char* GetProjectionName(int projection);
46
51 static const char* GetProjectionDescription(int projection);
52
54
60 vtkSetStringMacro(Name);
61 vtkGetStringMacro(Name);
63
68 int GetIndex();
69
74 const char* GetDescription();
75
77
81 vtkSetMacro(CentralMeridian, double);
82 vtkGetMacro(CentralMeridian, double);
84
94
99 void SetOptionalParameter(const char* key, const char* value);
100
104 void RemoveOptionalParameter(const char*);
105
110
114 const char* GetOptionalParameterKey(int index);
115
119 const char* GetOptionalParameterValue(int index);
120
125
127
135 vtkSetStringMacro(PROJ4String);
136 vtkGetStringMacro(PROJ4String);
138
139protected:
142
149 virtual int UpdateProjection();
150
151 char* Name;
156
157private:
158 vtkGeoProjection(const vtkGeoProjection&) = delete;
159 void operator=(const vtkGeoProjection&) = delete;
160
161 class vtkInternals;
162 vtkInternals* Internals;
163};
164
165VTK_ABI_NAMESPACE_END
166#endif // vtkGeoProjection_h
Represent a projection from a sphere to a plane.
int GetIndex()
Return the index of the current projection's type in the list of all projection types.
virtual int UpdateProjection()
Determine whether the current projection structure has any changes pending and apply them if necessar...
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.
~vtkGeoProjection() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static int GetNumberOfProjections()
Returns the number of projections that this class offers.
void RemoveOptionalParameter(const char *)
Remove an optional parameter to the projection that will be computed.
static const char * GetProjectionName(int projection)
Returns the name of one of the projections supported by this class.
vtkMTimeType ProjectionMTime
const char * GetDescription()
Get the description of a projection.
void ClearOptionalParameters()
Clear all optional parameters.
static const char * GetProjectionDescription(int projection)
Returns a description of one of the projections supported by this class.
int GetNumberOfOptionalParameters()
Return the number of optional parameters.
static vtkGeoProjection * New()
const char * GetOptionalParameterValue(int index)
Return the number of optional parameters.
projPJ GetProjection()
Return a pointer to the PROJ.4 data structure describing this projection.
const char * GetOptionalParameterKey(int index)
Return the number of optional parameters.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
struct PJconsts PJ
PJ * projPJ
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270