Cartographic (PROJ4) projection class. More...
#include <Inventor/projection/SbProj4Projection.h>
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. | |
SoProjection * | getProjectionNode () const |
Return associated projection node. | |
virtual void | setParameter (int parameterId, const SbString ¶meterString) |
Set string parameter. | |
virtual void | setParameter (int parameterId, const float ¶meterFloat) |
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 ¶meter) const |
Get string parameter at position pos. | |
SbBool | getParameter (int pos, float ¶meter) 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. | |
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 :
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:
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.
SbProjection, SoProjection, SoGeoProjection
Definition at line 97 of file SbProj4Projection.h.
Available coordinate systems.
Enumerator | |
---|---|
GEOCENTRIC | |
GEODETIC | |
NUM_COORDINATE_SYSTEMS |
Definition at line 105 of file SbProj4Projection.h.
Available ellipsoids.
Definition at line 115 of file SbProj4Projection.h.
Available projections.
Definition at line 165 of file SbProj4Projection.h.
SbProj4Projection::SbProj4Projection | ( | ) |
Constructor.
SbProj4Projection::SbProj4Projection | ( | SoProjection * | node | ) |
Constructor.
SbProj4Projection::SbProj4Projection | ( | const SbProj4Projection & | proj | ) |
Copy constructor.
|
virtual |
Destructor.
|
virtual |
Exit function.
Reimplemented from SbProjection.
SbProj4Projection::CoordinateSystem SbProj4Projection::getCoordinateSystem | ( | ) |
Get current coordinate system.
SbProj4Projection::PredefinedEllipsoid SbProj4Projection::getEllipsoid | ( | ) |
Get current ellipsoid.
SbProj4Projection::PredefinedEllipsoid SbProj4Projection::getEllipsoidIn | ( | ) |
Get current input ellipsoid.
|
static |
Get PROJ.4 ellipsoid string.
SbProj4Projection::Projection SbProj4Projection::getProjection | ( | ) |
Get current projection .
SbProj4Projection::Projection SbProj4Projection::getProjectionIn | ( | ) |
Get current input projection .
|
static |
Get projection name description.
|
static |
Get internal PROJ.4 projection string.
int SbProj4Projection::getUTMZone | ( | ) |
Get current UTM zone.
|
virtual |
Initialisation.
Reimplemented from SbProjection.
|
virtual |
Inverse projection of one point.
Reimplemented from SbProjection.
|
inline |
Get revertCoordNeeded.
Definition at line 333 of file SbProj4Projection.h.
bool SbProj4Projection::isUTMSouth | ( | ) |
Get m_south (UTM)
void SbProj4Projection::setCoordinateSystem | ( | SbProj4Projection::CoordinateSystem | coordinateSystem | ) |
Set current coordinate system.
void SbProj4Projection::setEllipsoid | ( | SbProj4Projection::PredefinedEllipsoid | ellipsoid | ) |
Set current ellipsoid.
void SbProj4Projection::setEllipsoidIn | ( | SbProj4Projection::PredefinedEllipsoid | ellipsoid | ) |
Set current input ellipsoid.
void SbProj4Projection::setProjection | ( | SbProj4Projection::Projection | proj | ) |
Set current projection.
void SbProj4Projection::setProjectionIn | ( | SbProj4Projection::Projection | proj | ) |
Set current input projection.
|
inline |
Set revertCoordNeeded.
Definition at line 328 of file SbProj4Projection.h.
void SbProj4Projection::setUTMSouth | ( | bool | south | ) |
Set m_south (UTM)
void SbProj4Projection::setUTMZone | ( | int | zone | ) |
Set current UTM zone.
void SbProj4Projection::toGeocentric | ( | SbVec3f & | point | ) |
Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .
void SbProj4Projection::toGeodetic | ( | SbVec3f & | point | ) |
Transform the given coordinates from Geocentric coordinate system to Geodetic coordinate system .