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
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 anSoProjection
node, those projections are automatically added in the order above, and you can choose the desired projection by using the corresponding id (refer toSoProjection
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SbProj4Projection.CoordinateSystems
Available coordinate systems.static class
SbProj4Projection.PredefinedEllipsoids
Available ellipsoids.static class
SbProj4Projection.Projections
Available 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.CoordinateSystems
getCoordinateSystem()
Get current coordinate system.SbProj4Projection.PredefinedEllipsoids
getEllipsoid()
Get current ellipsoid.SbProj4Projection.PredefinedEllipsoids
getEllipsoidIn()
Get current input ellipsoid.static java.lang.String
getEllipsoidString(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Get PROJ.4 ellipsoid string.SbProj4Projection.Projections
getProjection()
Get current projection .SbProj4Projection.Projections
getProjectionIn()
Get current input projection .static java.lang.String
getProjectionName(SbProj4Projection.Projections proj)
Get projection name description.static java.lang.String
getProjectionString(SbProj4Projection.Projections proj)
Get internal PROJ.4 projection string.int
getUTMZone()
Get current UTM zone.boolean
isRevertCoordNeeded()
Get revertCoordNeeded.boolean
isUTMSouth()
Get m_south (UTM)void
setCoordinateSystem(SbProj4Projection.CoordinateSystems coordinateSystem)
Set current coordinate system.void
setEllipsoid(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Set current ellipsoid.void
setEllipsoidIn(SbProj4Projection.PredefinedEllipsoids ellipsoid)
Set current input ellipsoid.void
setProjection(SbProj4Projection.Projections proj)
Set current projection.void
setProjectionIn(SbProj4Projection.Projections proj)
Set current input projection.void
setRevertCoord(boolean revertCoordNeeded)
Set revertCoordNeeded.void
setUTMSouth(boolean south)
Set m_south (UTM)void
setUTMZone(int zone)
Set current UTM zone.SbVec3f
toGeocentric()
Transform the given coordinates from Geodetic coordinate system to Geocentric coordinate system .SbVec3f
toGeodetic()
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.
-
-