Search Results for

    Show / Hide Table of Contents

    Class AffineTransformationFactory

    Supports creating AffineTransformations defined by various kinds of inputs and transformation mapping rules.

    Inheritance
    object
    AffineTransformationFactory
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Geometries.Utilities
    Assembly: NetTopologySuite.dll
    Syntax
    public static class AffineTransformationFactory

    Methods

    | Edit this page View Source

    CreateFromBaseLines(Coordinate, Coordinate, Coordinate, Coordinate)

    Creates an AffineTransformation defined by a mapping between two baselines. The computed transformation consists of:

    • a translation from the start point of the source baseline to the start point of the destination baseline,
    • a rotation through the angle between the baselines about the destination start point,
    • and a scaling equal to the ratio of the baseline lengths.
    If the source baseline has zero length, an identity transformation is returned.
    Declaration
    public static AffineTransformation CreateFromBaseLines(Coordinate src0, Coordinate src1, Coordinate dest0, Coordinate dest1)
    Parameters
    Type Name Description
    Coordinate src0

    The start point of the source baseline

    Coordinate src1

    The end point of the source baseline

    Coordinate dest0

    The start point of the destination baseline

    Coordinate dest1

    The end point of the destination baseline

    Returns
    Type Description
    AffineTransformation
    | Edit this page View Source

    CreateFromControlVectors(Coordinate, Coordinate)

    Creates an AffineTransformation defined by a single control vector. A control vector consists of a source point and a destination point, which is the image of the source point under the desired transformation. This produces a translation.

    Declaration
    public static AffineTransformation CreateFromControlVectors(Coordinate src0, Coordinate dest0)
    Parameters
    Type Name Description
    Coordinate src0

    The start point of the control vector

    Coordinate dest0

    The end point of the control vector

    Returns
    Type Description
    AffineTransformation

    The computed transformation

    | Edit this page View Source

    CreateFromControlVectors(Coordinate, Coordinate, Coordinate, Coordinate)

    Creates an AffineTransformation defined by a pair of control vectors. A control vector consists of a source point and a destination point, which is the image of the source point under the desired transformation. The computed transformation is a combination of one or more of a uniform scale, a rotation, and a translation (i.e. there is no shear component and no reflection)

    Declaration
    public static AffineTransformation CreateFromControlVectors(Coordinate src0, Coordinate src1, Coordinate dest0, Coordinate dest1)
    Parameters
    Type Name Description
    Coordinate src0
    Coordinate src1
    Coordinate dest0
    Coordinate dest1
    Returns
    Type Description
    AffineTransformation

    The computed transformation

    | Edit this page View Source

    CreateFromControlVectors(Coordinate, Coordinate, Coordinate, Coordinate, Coordinate, Coordinate)

    Creates a transformation from a set of three control vectors. A control vector consists of a source point and a destination point, which is the image of the source point under the desired transformation. Three control vectors allows defining a fully general affine transformation.

    Declaration
    public static AffineTransformation CreateFromControlVectors(Coordinate src0, Coordinate src1, Coordinate src2, Coordinate dest0, Coordinate dest1, Coordinate dest2)
    Parameters
    Type Name Description
    Coordinate src0
    Coordinate src1
    Coordinate src2
    Coordinate dest0
    Coordinate dest1
    Coordinate dest2
    Returns
    Type Description
    AffineTransformation

    The computed transformation

    | Edit this page View Source

    CreateFromControlVectors(Coordinate[], Coordinate[])

    Creates an AffineTransformation defined by a set of control vectors. Between one and three vectors must be supplied.

    Declaration
    public static AffineTransformation CreateFromControlVectors(Coordinate[] src, Coordinate[] dest)
    Parameters
    Type Name Description
    Coordinate[] src

    The source points of the vectors

    Coordinate[] dest

    The destination points of the vectors

    Returns
    Type Description
    AffineTransformation

    The computed transformation

    Exceptions
    Type Condition
    ArgumentException

    if the control vector arrays are too short, long or of different lengths

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX