Class DefaultMathTransformFactory.Context

    • Constructor Detail

      • Context

        public Context()
        Creates a new context with all properties initialized to null.
    • Method Detail

      • setSource

        public void setSource​(CoordinateSystem cs)
        Sets the source coordinate system to the given value. The source ellipsoid is unconditionally set to null.
        Parameters:
        cs - the coordinate system to set as the source (can be null).
      • setSource

        public void setSource​(EllipsoidalCS cs,
                              Ellipsoid ellipsoid)
        Sets the source coordinate system and its associated ellipsoid to the given value.
        Design note: ellipsoidal coordinate systems and ellipsoids are associated indirectly, through a geodetic CRS. However this method expects those two components to be given explicitly instead than inferring them from a Coordinate­Reference­System for making clear that Math­Transform­Factory does not perform any geodetic datum analysis. For coordinate operations that take datum changes in account (including change of prime meridian), see Default­Coordinate­Operation­Factory. This policy helps to enforce a separation of concerns.
        Parameters:
        cs - the coordinate system to set as the source, or null.
        ellipsoid - the ellipsoid associated to the given coordinate system, or null.
      • setTarget

        public void setTarget​(CoordinateSystem cs)
        Sets the target coordinate system to the given value. The target ellipsoid is unconditionally set to null.
        Parameters:
        cs - the coordinate system to set as the target (can be null).
      • setTarget

        public void setTarget​(EllipsoidalCS cs,
                              Ellipsoid ellipsoid)
        Sets the target coordinate system and its associated ellipsoid to the given value.
        Parameters:
        cs - the coordinate system to set as the source, or null.
        ellipsoid - the ellipsoid associated to the given coordinate system, or null.
      • getSourceCS

        public CoordinateSystem getSourceCS()
        Returns the source coordinate system, or null if unspecified.
        Returns:
        the source coordinate system, or null.
      • getSourceEllipsoid

        public Ellipsoid getSourceEllipsoid()
        Returns the ellipsoid of the source ellipsoidal coordinate system, or null if it does not apply. This information is valid only if get­Source­CS() returns an instance of Ellipsoidal­CS.
        Returns:
        the ellipsoid of the source ellipsoidal coordinate system, or null if it does not apply.
      • getTargetCS

        public CoordinateSystem getTargetCS()
        Returns the target coordinate system, or null if unspecified.
        Returns:
        the target coordinate system, or null.
      • getTargetEllipsoid

        public Ellipsoid getTargetEllipsoid()
        Returns the ellipsoid of the target ellipsoidal coordinate system, or null if it does not apply. This information is valid only if get­Target­CS() returns an instance of Ellipsoidal­CS.
        Returns:
        the ellipsoid of the target ellipsoidal coordinate system, or null if it does not apply.