Class SbProj4Projection
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.projection.SbProjection
-
- com.openinventor.inventor.projection.SbProj4Projection
-
public class SbProj4Projection extends SbProjection
Cartographic (PROJ4) projection class. This class performs a cartographic projection using the PROJ.4 Cartographic Projections Library ( seehttp://proj.maptools.org/ )To use this class as a projection, refer to the documentation of
SbProjectionclass.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
SbProjectionstring parameters:- parameter 0 : projection name
- parameter 1 : ellipsoid
- parameter 2 : units
- parameter 3 : longitude zero
The first
SbProjectionfloat 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
SbProj4Projectionobject with anSoProjectionnode, those projections are automatically added in the order above, and you can choose the desired projection by using the corresponding id (refer toSoProjectionnode).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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSbProj4Projection.CoordinateSystemsAvailable coordinate systems.static classSbProj4Projection.PredefinedEllipsoidsAvailable ellipsoids.static classSbProj4Projection.ProjectionsAvailable projections.-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SbProj4Projection()Constructor.SbProj4Projection(SoProjection node)Constructor.SbProj4Projection(SbProj4Projection proj)Copy constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SbProj4Projection.CoordinateSystemsgetCoordinateSystem()Get current coordinate system.SbProj4Projection.PredefinedEllipsoidsgetEllipsoid()Get current ellipsoid.SbProj4Projection.PredefinedEllipsoidsgetEllipsoidIn()Get current input ellipsoid.static java.lang.StringgetEllipsoidString(SbProj4Projection.PredefinedEllipsoids ellipsoid)Get PROJ.4 ellipsoid string.SbProj4Projection.ProjectionsgetProjection()Get current projection .SbProj4Projection.ProjectionsgetProjectionIn()Get current input projection .static java.lang.StringgetProjectionName(SbProj4Projection.Projections proj)Get projection name description.static java.lang.StringgetProjectionString(SbProj4Projection.Projections proj)Get internal PROJ.4 projection string.intgetUTMZone()Get current UTM zone.booleanisRevertCoordNeeded()Get revertCoordNeeded.booleanisUTMSouth()Get m_south (UTM)voidsetCoordinateSystem(SbProj4Projection.CoordinateSystems coordinateSystem)Set current coordinate system.voidsetEllipsoid(SbProj4Projection.PredefinedEllipsoids ellipsoid)Set current ellipsoid.voidsetEllipsoidIn(SbProj4Projection.PredefinedEllipsoids ellipsoid)Set current input ellipsoid.voidsetProjection(SbProj4Projection.Projections proj)Set current projection.voidsetProjectionIn(SbProj4Projection.Projections proj)Set current input projection.voidsetRevertCoord(boolean revertCoordNeeded)Set revertCoordNeeded.voidsetUTMSouth(boolean south)Set m_south (UTM)voidsetUTMZone(int zone)Set current UTM zone.SbVec3ftoGeocentric()Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .SbVec3ftoGeodetic()Transform the given coordinates from Geocentric coordinate system to Geodetic coordinate system .-
Methods inherited from class com.openinventor.inventor.projection.SbProjection
exit, getFloatParameter, getNumFloatParameters, getNumStringParameters, getProjectedBoundingBox, getProjectionNode, getStringParameter, init, inverse, project, setNumFloatParameters, setNumStringParameters, setParameter, setParameter
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SbProj4Projection
public SbProj4Projection(SoProjection node)
Constructor.
-
SbProj4Projection
public SbProj4Projection()
Constructor.
-
SbProj4Projection
public SbProj4Projection(SbProj4Projection proj)
Copy constructor.
-
-
Method Detail
-
setEllipsoidIn
public void setEllipsoidIn(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Set current input ellipsoid.
-
getProjectionString
public static java.lang.String getProjectionString(SbProj4Projection.Projections proj)
Get internal PROJ.4 projection string.
-
getEllipsoidString
public static java.lang.String getEllipsoidString(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Get PROJ.4 ellipsoid string.
-
getEllipsoidIn
public SbProj4Projection.PredefinedEllipsoids getEllipsoidIn()
Get current input ellipsoid.
-
setUTMZone
public void setUTMZone(int zone)
Set current UTM zone.
-
getEllipsoid
public SbProj4Projection.PredefinedEllipsoids getEllipsoid()
Get current ellipsoid.
-
getProjectionName
public static java.lang.String getProjectionName(SbProj4Projection.Projections proj)
Get projection name description.
-
setEllipsoid
public void setEllipsoid(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Set current ellipsoid.
-
toGeocentric
public SbVec3f toGeocentric()
Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .
-
setProjectionIn
public void setProjectionIn(SbProj4Projection.Projections proj)
Set current input projection.
-
isUTMSouth
public boolean isUTMSouth()
Get m_south (UTM)
-
getProjection
public SbProj4Projection.Projections getProjection()
Get current projection .
-
getUTMZone
public int getUTMZone()
Get current UTM zone.
-
getProjectionIn
public SbProj4Projection.Projections getProjectionIn()
Get current input projection .
-
setUTMSouth
public void setUTMSouth(boolean south)
Set m_south (UTM)
-
getCoordinateSystem
public SbProj4Projection.CoordinateSystems getCoordinateSystem()
Get current coordinate system.
-
toGeodetic
public SbVec3f toGeodetic()
Transform the given coordinates from Geocentric coordinate system to Geodetic coordinate system .
-
setCoordinateSystem
public void setCoordinateSystem(SbProj4Projection.CoordinateSystems coordinateSystem)
Set current coordinate system.
-
setRevertCoord
public void setRevertCoord(boolean revertCoordNeeded)
Set revertCoordNeeded.
-
setProjection
public void setProjection(SbProj4Projection.Projections proj)
Set current projection.
-
isRevertCoordNeeded
public boolean isRevertCoordNeeded()
Get revertCoordNeeded.
-
-