Open Inventor Release 2024.1.1
 
Loading...
Searching...
No Matches
SbProj4Projection Class Reference

Cartographic (PROJ4) projection class. More...

#include <Inventor/projection/SbProj4Projection.h>

+ Inheritance diagram for SbProj4Projection:

Public Types

enum  CoordinateSystem {
  GEOCENTRIC = 0 ,
  GEODETIC ,
  NUM_COORDINATE_SYSTEMS
}
 Available coordinate systems. More...
 
enum  PredefinedEllipsoid {
  SPHERE = 0 ,
  AIRY ,
  AIRYM ,
  ANDRAE ,
  APL ,
  AUST_SA ,
  BESSEL ,
  BESS_NAM ,
  CLRK66 ,
  CLRK80 ,
  CPM ,
  DELMBR ,
  ENGELIS ,
  EVRST30 ,
  EVRST48 ,
  EVRST56 ,
  EVRST69 ,
  EVRSTSS ,
  FSCHR60 ,
  FSCHR60M ,
  FSCHR68 ,
  GRS67 ,
  GRS80 ,
  HELMERT ,
  HOUGH ,
  IAU76 ,
  INTL ,
  KAULA ,
  KRASS ,
  LERCH ,
  MERIT ,
  MPRTS ,
  NEW_INTL ,
  NWL9D ,
  PLESSIS ,
  SE_ASIA ,
  SGS85 ,
  WALBECK ,
  WGS60 ,
  WGS66 ,
  WGS72 ,
  WGS84 ,
  NUM_ELLIPSOIDS
}
 Available ellipsoids. More...
 
enum  Projection {
  CASSINI ,
  EQUAL_AREA_CYLINDRICAL ,
  COLLIGNON ,
  CRASTER_PARABOLIC ,
  ECKERT_I ,
  ECKERT_II ,
  ECKERT_III ,
  ECKERT_IV ,
  ECKERT_V ,
  ECKERT_VI ,
  EQUIDISTANT_CYLINDRICAL ,
  FAHEY ,
  FOUCAUT_SINUSOIDAL ,
  GALL ,
  GEOCENTRIC_PROJ ,
  HATANO_ASYMMETRICAL_EQUAL_AREA ,
  KAVRAISKY_VII ,
  KROVAK ,
  LAMBERT_AZIMUTHAL_EQUAL_AREA ,
  LAT_LONG ,
  LONG_LAT ,
  LAMBERT_EQUAL_AREA_CONIC ,
  LOXIMUTHAL ,
  MCBRYDE_THOMAS_FLAT_POLE_SINE ,
  MCBRYDE_THOMAS_FLAT_POLAR_PARABOLIC ,
  MCBRYDE_THOMAS_FLAT_POLAR_QUARTIC ,
  MCBRYDE_THOMAS_FLAT_POLAR_SINUSOIDAL ,
  MERCATOR ,
  MILLER_CYLINDRICAL ,
  MOLLWEIDE ,
  NELL ,
  NELL_HAMMER ,
  OBLIQUE_CYLINDRICAL_EQUAL_AREA ,
  POLYCONIC ,
  PUTNINS_P1 ,
  PUTNINS_P2 ,
  PUTNINS_P3_2 ,
  PUTNINS_P4_2 ,
  PUTNINS_P5 ,
  PUTNINS_P5_2 ,
  PUTNINS_P6 ,
  PUTNINS_P6_2 ,
  ROBINSON ,
  SINUSOIDAL ,
  SWISS_OBL_MERCATOR ,
  OBLIQUE_STEREOGRAPHIC_ALTERNATIVE ,
  TRANSVERSE_CYLINDRICAL_EQUAL_AREA ,
  TRANSVERSE_MERCATOR ,
  UNIVERSAL_POLAR_STEREOGRAPHIC ,
  UNIVERSAL_TRANSVERSE_MERCATOR ,
  VAN_DER_GRINTEN_I ,
  WAGNER_I ,
  WAGNER_II ,
  WAGNER_III ,
  WAGNER_IV ,
  WAGNER_V ,
  WAGNER_VI ,
  WERENSKIOLD_I ,
  WINKEL_I ,
  WINKEL_TRIPEL ,
  NUM_PROJ4_PROJECTIONS
}
 Available projections. More...
 

Public Member Functions

 SbProj4Projection ()
 Constructor.
 
 SbProj4Projection (SoProjection *node)
 Constructor.
 
 SbProj4Projection (const SbProj4Projection &proj)
 Copy constructor.
 
virtual ~SbProj4Projection ()
 Destructor.
 
void setEllipsoid (SbProj4Projection::PredefinedEllipsoid ellipsoid)
 Set current ellipsoid.
 
SbProj4Projection::PredefinedEllipsoid getEllipsoid ()
 Get current ellipsoid.
 
void setEllipsoidIn (SbProj4Projection::PredefinedEllipsoid ellipsoid)
 Set current input ellipsoid.
 
SbProj4Projection::PredefinedEllipsoid getEllipsoidIn ()
 Get current input ellipsoid.
 
void setCoordinateSystem (SbProj4Projection::CoordinateSystem coordinateSystem)
 Set current coordinate system.
 
SbProj4Projection::CoordinateSystem getCoordinateSystem ()
 Get current coordinate system.
 
void setProjection (SbProj4Projection::Projection proj)
 Set current projection.
 
SbProj4Projection::Projection getProjection ()
 Get current projection .
 
void setProjectionIn (SbProj4Projection::Projection proj)
 Set current input projection.
 
SbProj4Projection::Projection getProjectionIn ()
 Get current input projection .
 
void setUTMZone (int zone)
 Set current UTM zone.
 
int getUTMZone ()
 Get current UTM zone.
 
void setUTMSouth (bool south)
 Set m_south (UTM)
 
bool isUTMSouth ()
 Get m_south (UTM)
 
void setRevertCoord (bool revertCoordNeeded)
 Set revertCoordNeeded.
 
bool isRevertCoordNeeded ()
 Get revertCoordNeeded.
 
virtual void init ()
 Initialisation.
 
virtual void exit ()
 Exit function.
 
virtual void inverse (SbVec3f &point)
 Inverse projection of one point.
 
void toGeodetic (SbVec3f &point)
 Transform the given coordinates from Geocentric coordinate system to Geodetic coordinate system .
 
void toGeocentric (SbVec3f &point)
 Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .
 
- Public Member Functions inherited from SbProjection
 SbProjection ()
 Constructor.
 
 SbProjection (SoProjection *node)
 Constructor.
 
 SbProjection (const SbProjection &proj)
 Copy constructor.
 
virtual ~SbProjection ()
 Destructor.
 
virtual bool getProjectedBoundingBox (SbBox3f &bbox)
 Return projected bounding box if available.
 
void project (SbVec3f &point)
 Apply the complete computation (matrix, pre-projection, projection, post-projection) to one point.
 
void project (int numPoints, float *points)
 Apply the complete computation to a set of points.
 
void project (int32_t numCoords, const SbVec3f *coords, SbVec3f *projectedCoords)
 Apply the complete computation to a set of coordinates.
 
SoProjectiongetProjectionNode () const
 Return associated projection node.
 
virtual void setParameter (int parameterId, const SbString &parameterString)
 Set string parameter.
 
virtual void setParameter (int parameterId, const float &parameterFloat)
 Set float parameter.
 
void setNumStringParameters (int numParameters)
 Set number of string parameters to use.
 
void setNumFloatParameters (int numParameters)
 Set number of float parameters to use.
 
int getNumStringParameters () const
 Get number of used string parameters.
 
int getNumFloatParameters () const
 Get number of used float parameters.
 
SbBool getParameter (int pos, SbString &parameter) const
 Get string parameter at position pos.
 
SbBool getParameter (int pos, float &parameter) const
 Get float parameter at position pos.
 

Static Public Member Functions

static SbString getEllipsoidString (SbProj4Projection::PredefinedEllipsoid ellipsoid)
 Get PROJ.4 ellipsoid string.
 
static SbString getProjectionString (SbProj4Projection::Projection proj)
 Get internal PROJ.4 projection string.
 
static SbString getProjectionName (SbProj4Projection::Projection proj)
 Get projection name description.
 

Detailed Description

Cartographic (PROJ4) projection class.

This class performs a cartographic projection using the PROJ.4 Cartographic Projections Library ( see http://proj.maptools.org/ )

To use this class as a projection, refer to the documentation of SbProjection class.

By default, input points must be defined in the geodetic coordinate system :

  • x coordinate : longitudes degrees from -180 to 180
  • y coordinate : latitudes degrees from -90 to 90
  • z coordinate : meters

It is possible to define the input data in the geocentric coordinate system by calling setCoordinateSystem(GEOCENTRIC). The geocentric coordinate system is the earth coordinate system, where x, y and z coordinate are expressed in meters.

The PROJ.4 library parameters are stored as SbProjection string parameters:

  • parameter 0 : projection name
  • parameter 1 : ellipsoid
  • parameter 2 : units
  • parameter 3 : longitude zero

The first SbProjection float parameter is used to specify the z coordinate scaleRatio applied to the projected shapes.

The enumeration PredefinedEllipsoid defines the list of available ellipsoid. An ellispoid definition is a mathematical representation used to approximate the earth when computing projections. Calling setEllipsoid() sets the current ellipsoid used to compute projections.

Only projections with an inverse function defined are available.

The available projections are defined with the Projection enumeration. When using an SbProj4Projection object with an SoProjection node, those projections are automatically added in the order above, and you can choose the desired projection by using the corresponding id (refer to SoProjection node).

LIMITATIONS

It can happen that vertices of a projected shape cross other ones, depending on the chosen projection. Visually it results in a flipping effect.

SEE ALSO

SbProjection, SoProjection, SoGeoProjection

Definition at line 97 of file SbProj4Projection.h.

Member Enumeration Documentation

◆ CoordinateSystem

Available coordinate systems.

Enumerator
GEOCENTRIC 
GEODETIC 
NUM_COORDINATE_SYSTEMS 

Definition at line 105 of file SbProj4Projection.h.

◆ PredefinedEllipsoid

Available ellipsoids.

Enumerator
SPHERE 
AIRY 
AIRYM 
ANDRAE 
APL 
AUST_SA 
BESSEL 
BESS_NAM 
CLRK66 
CLRK80 
CPM 
DELMBR 
ENGELIS 
EVRST30 
EVRST48 
EVRST56 
EVRST69 
EVRSTSS 
FSCHR60 
FSCHR60M 
FSCHR68 
GRS67 
GRS80 
HELMERT 
HOUGH 
IAU76 
INTL 
KAULA 
KRASS 
LERCH 
MERIT 
MPRTS 
NEW_INTL 
NWL9D 
PLESSIS 
SE_ASIA 
SGS85 
WALBECK 
WGS60 
WGS66 
WGS72 
WGS84 
NUM_ELLIPSOIDS 

Definition at line 115 of file SbProj4Projection.h.

◆ Projection

Available projections.

Enumerator
CASSINI 
EQUAL_AREA_CYLINDRICAL 
COLLIGNON 
CRASTER_PARABOLIC 
ECKERT_I 
ECKERT_II 
ECKERT_III 
ECKERT_IV 
ECKERT_V 
ECKERT_VI 
EQUIDISTANT_CYLINDRICAL 
FAHEY 
FOUCAUT_SINUSOIDAL 
GALL 
GEOCENTRIC_PROJ 
HATANO_ASYMMETRICAL_EQUAL_AREA 
KAVRAISKY_VII 
KROVAK 
LAMBERT_AZIMUTHAL_EQUAL_AREA 
LAT_LONG 
LONG_LAT 
LAMBERT_EQUAL_AREA_CONIC 
LOXIMUTHAL 
MCBRYDE_THOMAS_FLAT_POLE_SINE 
MCBRYDE_THOMAS_FLAT_POLAR_PARABOLIC 
MCBRYDE_THOMAS_FLAT_POLAR_QUARTIC 
MCBRYDE_THOMAS_FLAT_POLAR_SINUSOIDAL 
MERCATOR 
MILLER_CYLINDRICAL 
MOLLWEIDE 
NELL 
NELL_HAMMER 
OBLIQUE_CYLINDRICAL_EQUAL_AREA 
POLYCONIC 
PUTNINS_P1 
PUTNINS_P2 
PUTNINS_P3_2 
PUTNINS_P4_2 
PUTNINS_P5 
PUTNINS_P5_2 
PUTNINS_P6 
PUTNINS_P6_2 
ROBINSON 
SINUSOIDAL 
SWISS_OBL_MERCATOR 
OBLIQUE_STEREOGRAPHIC_ALTERNATIVE 
TRANSVERSE_CYLINDRICAL_EQUAL_AREA 
TRANSVERSE_MERCATOR 
UNIVERSAL_POLAR_STEREOGRAPHIC 
UNIVERSAL_TRANSVERSE_MERCATOR 
VAN_DER_GRINTEN_I 
WAGNER_I 
WAGNER_II 
WAGNER_III 
WAGNER_IV 
WAGNER_V 
WAGNER_VI 
WERENSKIOLD_I 
WINKEL_I 
WINKEL_TRIPEL 
NUM_PROJ4_PROJECTIONS 

Definition at line 165 of file SbProj4Projection.h.

Constructor & Destructor Documentation

◆ SbProj4Projection() [1/3]

SbProj4Projection::SbProj4Projection ( )

Constructor.

◆ SbProj4Projection() [2/3]

SbProj4Projection::SbProj4Projection ( SoProjection node)

Constructor.

◆ SbProj4Projection() [3/3]

SbProj4Projection::SbProj4Projection ( const SbProj4Projection proj)

Copy constructor.

◆ ~SbProj4Projection()

virtual SbProj4Projection::~SbProj4Projection ( )
virtual

Destructor.

Member Function Documentation

◆ exit()

virtual void SbProj4Projection::exit ( )
virtual

Exit function.

Reimplemented from SbProjection.

◆ getCoordinateSystem()

SbProj4Projection::CoordinateSystem SbProj4Projection::getCoordinateSystem ( )

Get current coordinate system.

◆ getEllipsoid()

SbProj4Projection::PredefinedEllipsoid SbProj4Projection::getEllipsoid ( )

Get current ellipsoid.

◆ getEllipsoidIn()

SbProj4Projection::PredefinedEllipsoid SbProj4Projection::getEllipsoidIn ( )

Get current input ellipsoid.

◆ getEllipsoidString()

static SbString SbProj4Projection::getEllipsoidString ( SbProj4Projection::PredefinedEllipsoid  ellipsoid)
static

Get PROJ.4 ellipsoid string.

◆ getProjection()

SbProj4Projection::Projection SbProj4Projection::getProjection ( )

Get current projection .

◆ getProjectionIn()

SbProj4Projection::Projection SbProj4Projection::getProjectionIn ( )

Get current input projection .

◆ getProjectionName()

static SbString SbProj4Projection::getProjectionName ( SbProj4Projection::Projection  proj)
static

Get projection name description.

◆ getProjectionString()

static SbString SbProj4Projection::getProjectionString ( SbProj4Projection::Projection  proj)
static

Get internal PROJ.4 projection string.

◆ getUTMZone()

int SbProj4Projection::getUTMZone ( )

Get current UTM zone.

◆ init()

virtual void SbProj4Projection::init ( )
virtual

Initialisation.

Reimplemented from SbProjection.

◆ inverse()

virtual void SbProj4Projection::inverse ( SbVec3f point)
virtual

Inverse projection of one point.

Reimplemented from SbProjection.

◆ isRevertCoordNeeded()

bool SbProj4Projection::isRevertCoordNeeded ( )
inline

Get revertCoordNeeded.

Definition at line 333 of file SbProj4Projection.h.

◆ isUTMSouth()

bool SbProj4Projection::isUTMSouth ( )

Get m_south (UTM)

◆ setCoordinateSystem()

void SbProj4Projection::setCoordinateSystem ( SbProj4Projection::CoordinateSystem  coordinateSystem)

Set current coordinate system.

◆ setEllipsoid()

void SbProj4Projection::setEllipsoid ( SbProj4Projection::PredefinedEllipsoid  ellipsoid)

Set current ellipsoid.

◆ setEllipsoidIn()

void SbProj4Projection::setEllipsoidIn ( SbProj4Projection::PredefinedEllipsoid  ellipsoid)

Set current input ellipsoid.

◆ setProjection()

void SbProj4Projection::setProjection ( SbProj4Projection::Projection  proj)

Set current projection.

◆ setProjectionIn()

void SbProj4Projection::setProjectionIn ( SbProj4Projection::Projection  proj)

Set current input projection.

◆ setRevertCoord()

void SbProj4Projection::setRevertCoord ( bool  revertCoordNeeded)
inline

Set revertCoordNeeded.

Definition at line 328 of file SbProj4Projection.h.

◆ setUTMSouth()

void SbProj4Projection::setUTMSouth ( bool  south)

Set m_south (UTM)

◆ setUTMZone()

void SbProj4Projection::setUTMZone ( int  zone)

Set current UTM zone.

◆ toGeocentric()

void SbProj4Projection::toGeocentric ( SbVec3f point)

Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .

◆ toGeodetic()

void SbProj4Projection::toGeodetic ( SbVec3f point)

Transform the given coordinates from Geocentric coordinate system to Geodetic coordinate system .


The documentation for this class was generated from the following file: