VTK  9.0.2
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 
48  vtkGetObjectMacro(SourceProjection, vtkGeoProjection);
50 
52 
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:
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
superclass for all geometric transformations
Represent a projection from a sphere to a plane.
A transformation between two geographic coordinate systems.
void TransformPoints(vtkPoints *src, vtkPoints *dst) override
Transform many points at once.
void Inverse() override
Invert the transformation.
void InternalTransformDerivative(const double in[3], double out[3], double derivative[3][3]) override
void SetSourceProjection(vtkGeoProjection *source)
The source geographic projection.
void InternalTransformPoint(const float in[3], float out[3]) override
This will calculate the transformation without calling Update.
vtkAbstractTransform * MakeTransform() override
Make another transform of the same type.
void InternalTransformDerivative(const float in[3], float out[3], float derivative[3][3]) override
This will transform a point and, at the same time, calculate a 3x3 Jacobian matrix that provides the ...
~vtkGeoTransform() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InternalTransformPoint(const double in[3], double out[3]) override
static int ComputeUTMZone(double *lonlat)
vtkGeoProjection * SourceProjection
void SetDestinationProjection(vtkGeoProjection *dest)
The target geographic projection.
static vtkGeoTransform * New()
static int ComputeUTMZone(double lon, double lat)
Computes Universal Transverse Mercator (UTM) zone given the longitude and latitude of the point.
vtkGeoProjection * DestinationProjection
void InternalTransformPoints(double *ptsInOut, vtkIdType numPts, int stride)
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 3D points
Definition: vtkPoints.h:34
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
int vtkIdType
Definition: vtkType.h:338