com.supermap.data

Class Transformation



  • public class Transformation
    extends InternalHandleDisposable
    Data registration class. It provides data registration for raster dataset, image dataset, vector dataset, geometry object and the set of 2D (x,y) coordinates.

    Data registration is the process to correct the position and unifying the coordinates of the dataset with reference to another dataset. All the coordinates of pixels of the image will be transfered to correct the deformation after the method of registration and control point is determined.

    • Constructor Detail

      • Transformation

        public Transformation()
        Constructs a new Transformation object.
      • Transformation

        public Transformation(Transformation transformation)
        Initializes a new instance according to the specified Transformation object.
        Parameters:
        transformation - the specified Transformation object.
      • Transformation

        public Transformation(Point2Ds originalControlPoints,
                              Point2Ds targetControlPoints,
                              TransformationMode transformMode)
        Initializes a new Transformation object according to the given arguments.
        Parameters:
        originalControlPoints - The selected control point of the layer to be registered.
        targetControlPoints - The selected control point of the reference layer.
        transformMode - Data registration mode. Two points at least for rectangle registration. Four points at least for linear registration. Seven points at least for polynomial registration
    • Method Detail

      • getOriginalControlPoints

        public Point2Ds getOriginalControlPoints()
        Returns the selected control point of the layer to be registered.
        Returns:
        The selected control point of the layer to be registered.
      • transform

        public boolean transform(Point2Ds transformPoint2Ds)
        Registers the vector dataset.

        The method is operated on original dataset, point,line,surface dataset, text dataset, CAD dataset and network dataset are supported. For CAD dataset, only offset registration and rectangle registration are supported.

        Parameters:
        transformPoint2Ds - The vector dataset to be registered.
        Returns:
        Returns true if successful; otherwise, false.
      • setOriginalControlPoints

        public boolean setOriginalControlPoints(Point2Ds points)
        Sets the selected control point in the layer to be registered.
        Parameters:
        points - The selected control point of the layer to be registered.
        Returns:
        a boolean, returns true if successful; otherwise, false.
      • getTargetControlPoints

        public Point2Ds getTargetControlPoints()
        Returns the selected control point of the reference layer.
        Returns:
        the selected control point of the reference layer.
      • setTargetControlPoints

        public boolean setTargetControlPoints(Point2Ds points)
        Sets the selected control point in the reference layer.
        Parameters:
        points - The selected control point of the reference layer.
        Returns:
        a boolean, returns true if successful; otherwise, false.
      • getTransformMode

        public TransformationMode getTransformMode()
        Returns the registration mode.
        Returns:
        The registration mode.
      • setTransformMode

        public void setTransformMode(TransformationMode transformMode)
        Sets the registration mode.
        Parameters:
        transformMode - Georeferencing mode.
      • dispose

        public void dispose()
        Release the resource occupy by this object.