Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoGeoProjection.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : G.TALLEC (Sep 2007)
22**=======================================================================*/
23
24
25#ifndef _SO_GEO_PROJECTION_
26#define _SO_GEO_PROJECTION_
27
28#include <Inventor/nodes/SoProjection.h>
29#include <Inventor/projection/SbProj4Projection.h>
30
32
88{
89
90 SO_NODE_HEADER(SoGeoProjection);
91
92public:
93
98
104
110
116
117private:
118
119 static void initClass();
120 static void exitClass();
121
126 static bool changeCoordSys( SbProj4Projection::CoordinateSystem originCoordSys, SbProj4Projection::CoordinateSystem destCoordSys, SbVec3f &coord );
127
128 // return static instance
129 static SoGeoProjection* getInstance();
130
131 void setProj( SbProj4Projection::Projection proj );
132
134
135 void setProjIn( SbProj4Projection::Projection proj );
136
137 void setUTMZone( int zone );
138
139 void setUTMSouth( bool south );
140
142
144
145 int getUTMZone();
146
147 bool isUTMSouth();
148
149 void setRevertCoord( bool revertCoordNeeded ) { m_proj4Projection->setRevertCoord( revertCoordNeeded ); };
150
151 bool isRevertCoordNeeded() { return m_proj4Projection->isRevertCoordNeeded(); };
152
156 static void ellipsoidChangedCB( void *data, SoSensor* );
157
158 static void coordinateChangedCB( void *data, SoSensor* );
159
160 static void projIdChangedCB( void *data, SoSensor* );
161
162 static void projectionChangedCB( void *data, SoSensor* );
163
164private:
165
166 //static instance for system coordinate change
167 static SoGeoProjection* m_geoProjection;
168
169 //Internal proj4 projection
170 SbProj4Projection* m_proj4Projection;
171
175 virtual ~SoGeoProjection();
176
177 //Called if projection type id has changed
178 SoFieldSensor* m_typeIdSensor;
179
180 // Field sensors
181 SoFieldSensor* m_projectionSensor;
182 SoFieldSensor* m_ellipsoidSensor;
183 SoFieldSensor* m_coordinateSensor;
184};
185
186#endif /* _SO_GEO_PROJECTION_ */
187
Cartographic (PROJ4) projection class.
CoordinateSystem
Available coordinate systems.
PredefinedEllipsoid
Available ellipsoids.
void setRevertCoord(bool revertCoordNeeded)
Set revertCoordNeeded.
bool isRevertCoordNeeded()
Get revertCoordNeeded.
Projection
Available projections.
3D vector class.
Definition SbVec.h:932
Sensor class that can be attached to Open Inventor fields.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Geospatial proje...
SoSFEnum projection
Current Projection.
SoGeoProjection()
Constructor.
SoSFEnum ellipsoid
Current ellipsoid.
SoSFEnum coordinateSystem
Current coordinate system.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Coordinate proje...
Field containing an enumerated value.
Definition SoSFEnum.h:89
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100