com.mapinfo.midev.coordsys.transform

## Class CoordTransform

- java.lang.Object
- - com.mapinfo.midev.coordsys.transform.CoordTransform

All Implemented Interfaces:
  IDirectPositionMutator

    public final class CoordTransform
    extends Object
    implements IDirectPositionMutator

Used to convert coordinates from one coordinate system to another.

### Constructor Summary

Constructors
Constructor and Description
`CoordTransform(CoordSys srcCoordSys, CoordSys destCoordSys)` Create a coordinate transform from one coordinate system to another.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isAffine()` Returns `true` if this CoordTransform is affine; `false` if not.
`boolean` `isIdentity()` Returns `true` if this CoordTransform is an identity transform; `false` if not.
`boolean` `isLinear()` Returns `true` if this CoordTransform is linear; `false` if not.
`DirectPosition` `transform(DirectPosition source, DirectPosition destination)` Returns the specified source `DirectPosition` transformed to the destination `CoordSys`.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CoordTransform

    public CoordTransform(CoordSys srcCoordSys,
                          CoordSys destCoordSys)

Create a coordinate transform from one coordinate system to another.

Parameters:
  `srcCoordSys` - Transform coordinates from this coordinate system.
  `destCoordSys` - Transform coordinates to this coordinate system.

### Method Detail

#### isAffine

    public boolean isAffine()

Returns `true` if this CoordTransform is affine; `false` if not.

Returns:
  `true` if this CoordTransform is affine; `false` if not.

#### isLinear

    public boolean isLinear()

Returns `true` if this CoordTransform is linear; `false` if not.

Returns:
  `true` if this CoordTransform is linear; `false` if not.

#### isIdentity

    public boolean isIdentity()

Returns `true` if this CoordTransform is an identity transform; `false` if not.

Returns:
  `true` if this CoordTransform is an identity transform; `false` if not.

#### transform

    public DirectPosition transform(DirectPosition source,
                                    DirectPosition destination)

Returns the specified source `DirectPosition` transformed to the destination `CoordSys`. The specified destination `DirectPosition` is also updated with the transformed coordinates and in fact is the same reference as returned by this method. The source and destination may be the same reference.

Specified by:
  `transform` in interface `IDirectPositionMutator`
Parameters:
  `source` - The `DirectPosition` to transform.
  `destination` - The `DirectPosition` to hold the transformed source `DirectPosition`. Also returned via the method.
Returns:
  the specified source `DirectPosition` transfered to the destination `CoordSys`.