Class SbProj4Projection

  • public class SbProj4Projection
    extends SbProjection
    Cartographic (PROJ4) projection class. This class performs a cartographic projection using the PROJ.4 Cartographic Projections Library ( see )

    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).


    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
    • Constructor Detail

      • SbProj4Projection

        public SbProj4Projection​(SoProjection node)
      • SbProj4Projection

        public SbProj4Projection()
      • SbProj4Projection

        public SbProj4Projection​(SbProj4Projection proj)
        Copy constructor.