VTK  9.2.6
vtkGeoTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGeoTransform.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 -------------------------------------------------------------------------*/
28 #ifndef vtkGeoTransform_h
29 #define vtkGeoTransform_h
30 
31 #include "vtkAbstractTransform.h"
32 #include "vtkGeovisCoreModule.h" // For export macro
33 
34 class vtkGeoProjection;
35 
36 class VTKGEOVISCORE_EXPORT vtkGeoTransform : public vtkAbstractTransform
37 {
38 public:
39  static vtkGeoTransform* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  void SetSourceProjection(vtkGeoProjection* source);
48  vtkGetObjectMacro(SourceProjection, vtkGeoProjection);
50 
52 
55  void SetDestinationProjection(vtkGeoProjection* dest);
56  vtkGetObjectMacro(DestinationProjection, vtkGeoProjection);
58 
62  void TransformPoints(vtkPoints* src, vtkPoints* dst) override;
63 
67  void Inverse() override;
68 
70 
74  void InternalTransformPoint(const float in[3], float out[3]) override;
75  void InternalTransformPoint(const double in[3], double out[3]) override;
77 
79 
86  static int ComputeUTMZone(double lon, double lat);
87  static int ComputeUTMZone(double* lonlat) { return ComputeUTMZone(lonlat[0], lonlat[1]); }
89 
91 
98  const float in[3], float out[3], float derivative[3][3]) override;
100  const double in[3], double out[3], double derivative[3][3]) override;
102 
107 
108 protected:
109  vtkGeoTransform();
110  ~vtkGeoTransform() override;
111 
112  void InternalTransformPoints(double* ptsInOut, vtkIdType numPts, int stride);
113 
116 
117 private:
118  vtkGeoTransform(const vtkGeoTransform&) = delete;
119  void operator=(const vtkGeoTransform&) = delete;
120 };
121 
122 #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:332
vtkGeoProjection * SourceProjection
a simple class to control print indentation
Definition: vtkIndent.h:39
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:39