VTK  9.2.5
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-------------------------------------------------------------------------*/
32#ifndef vtkGeoProjection_h
33#define vtkGeoProjection_h
34
35#include "vtkGeovisCoreModule.h" // For export macro
36#include "vtkObject.h"
37
38struct PJconsts;
39typedef struct PJconsts PJ;
40typedef PJ* projPJ;
41
42class VTKGEOVISCORE_EXPORT vtkGeoProjection : public vtkObject
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53
59 static const char* GetProjectionName(int projection);
60
65 static const char* GetProjectionDescription(int projection);
66
68
74 vtkSetStringMacro(Name);
75 vtkGetStringMacro(Name);
77
82 int GetIndex();
83
88 const char* GetDescription();
89
91
95 vtkSetMacro(CentralMeridian, double);
96 vtkGetMacro(CentralMeridian, double);
98
108
113 void SetOptionalParameter(const char* key, const char* value);
114
118 void RemoveOptionalParameter(const char*);
119
124
128 const char* GetOptionalParameterKey(int index);
129
133 const char* GetOptionalParameterValue(int index);
134
139
141
149 vtkSetStringMacro(PROJ4String);
150 vtkGetStringMacro(PROJ4String);
152
153protected:
156
163 virtual int UpdateProjection();
164
165 char* Name;
170
171private:
172 vtkGeoProjection(const vtkGeoProjection&) = delete;
173 void operator=(const vtkGeoProjection&) = delete;
174
175 class vtkInternals;
176 vtkInternals* Internals;
177};
178
179#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:40
abstract base class for most VTK objects
Definition: vtkObject.h:63
struct PJconsts PJ
PJ * projPJ
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287