VTK  9.3.1
vtkGeoTransform.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
15 #ifndef vtkGeoTransform_h
16 #define vtkGeoTransform_h
17 
18 #include "vtkAbstractTransform.h"
19 #include "vtkGeovisCoreModule.h" // For export macro
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkGeoProjection;
23 
24 class VTKGEOVISCORE_EXPORT vtkGeoTransform : public vtkAbstractTransform
25 {
26 public:
27  static vtkGeoTransform* New();
28  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
32 
35  void SetSourceProjection(vtkGeoProjection* source);
36  vtkGetObjectMacro(SourceProjection, vtkGeoProjection);
38 
40 
43  void SetDestinationProjection(vtkGeoProjection* dest);
44  vtkGetObjectMacro(DestinationProjection, vtkGeoProjection);
46 
50  void TransformPoints(vtkPoints* src, vtkPoints* dst) override;
51 
55  void Inverse() override;
56 
58 
62  void InternalTransformPoint(const float in[3], float out[3]) override;
63  void InternalTransformPoint(const double in[3], double out[3]) override;
65 
67 
74  static int ComputeUTMZone(double lon, double lat);
75  static int ComputeUTMZone(double* lonlat) { return ComputeUTMZone(lonlat[0], lonlat[1]); }
77 
79 
86  const float in[3], float out[3], float derivative[3][3]) override;
88  const double in[3], double out[3], double derivative[3][3]) override;
90 
95 
96 protected:
98  ~vtkGeoTransform() override;
99 
100  void InternalTransformPoints(double* ptsInOut, vtkIdType numPts, int stride);
101 
104 
105 private:
106  vtkGeoTransform(const vtkGeoTransform&) = delete;
107  void operator=(const vtkGeoTransform&) = delete;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif // vtkGeoTransform_h
A transformation between two geographic coordinate systems.
Represent a projection from a sphere to a plane.
vtkGeoProjection * DestinationProjection
virtual void TransformPoints(vtkPoints *inPts, vtkPoints *outPts)
Apply the transformation to a series of points, and append the results to outPts. ...
virtual vtkAbstractTransform * MakeTransform()=0
Make another transform of the same type.
int vtkIdType
Definition: vtkType.h:315
vtkGeoProjection * SourceProjection
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
superclass for all geometric transformations
virtual void Inverse()=0
Invert the transformation.
static int ComputeUTMZone(double *lonlat)
Computes Universal Transverse Mercator (UTM) zone given the longitude and latitude of the point...
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
virtual void InternalTransformPoint(const float in[3], float out[3])=0
This will calculate the transformation without calling Update.
virtual void InternalTransformDerivative(const float in[3], float out[3], float derivative[3][3])=0
This will transform a point and, at the same time, calculate a 3x3 Jacobian matrix that provides the ...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent and manipulate 3D points
Definition: vtkPoints.h:28