[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [util](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util) / [Transformation](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation) / Transformation

# Class: Transformation

[util](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util).[Transformation](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation).Transformation

Create transformation matrix

## Table of contents

Constructors
| [new Transformation()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.transformation.transformation.md#new transformation()) | [new Transformation(properties)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.transformation.transformation.md#new transformation(properties)) | [new Transformation(tr)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.transformation.transformation.md#new transformation(tr)) |
|  --- | --- | --- |
| [new Transformation(xx, yx, xy, yy, dx, dy)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.util.transformation.transformation.md#new transformation(xx, yx, xy, yy, dx, dy)) |


Methods
| [clone](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#clone) | [concatenate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#concatenate) | [createInverse](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#createinverse) |
|  --- | --- | --- |
| [fastEquals](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#fastequals) | [getAngle](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getangle) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getclassname) |
| [getDeterminant](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getdeterminant) | [getLengthToXRatioAt](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getlengthtoxratioat) | [getLengthToYRatioAt](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getlengthtoyratioat) |
| [getProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getproperties) | [getScaleX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getscalex) | [getScaleY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getscaley) |
| [getShearX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getshearx) | [getShearY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getsheary) | [getTranslate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#gettranslate) |
| [getTranslateX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#gettranslatex) | [getTranslateY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#gettranslatey) | [inverseTransform](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#inversetransform) |
| [inverseTransformDimension](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#inversetransformdimension) | [inverseTransformPoint](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#inversetransformpoint) | [inverseTransformRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#inversetransformrect) |
| [inverseTransformXY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#inversetransformxy) | [isIdentity](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#isidentity) | [isRotated](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#isrotated) |
| [preConcatenate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#preconcatenate) | [rotate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#rotate) | [scale](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#scale) |
| [setPointsToPointsTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#setpointstopointstransformation) | [setProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#setproperties) | [setRectToRectTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#setrecttorecttransformation) |
| [setScale](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#setscale) | [setToIdentity](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#settoidentity) | [setTransformation](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#settransformation) |
| [setTranslate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#settranslate) | [shear](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#shear) | [toString](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#tostring) |
| [transform](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transform) | [transformDimension](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformdimension) | [transformPath](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformpath) |
| [transformPoint](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformpoint) | [transformPoints](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformpoints) | [transformPolygon](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformpolygon) |
| [transformRect](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformrect) | [transformX](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformx) | [transformXY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformxy) |
| [transformY](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#transformy) | [translate](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#translate) | [canCreatePointsToPointsInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#cancreatepointstopointsinstance) |
| [canCreateRectToRectInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#cancreaterecttorectinstance) | [divide](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#divide) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getclassname-1) |
| [getPointsToPointsInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getpointstopointsinstance) | [getRectToRectInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getrecttorectinstance) | [getRotateInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getrotateinstance) |
| [getScaleInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getscaleinstance) | [getSegmentToSegmentInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getsegmenttosegmentinstance) | [getShearInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#getshearinstance) |
| [getTranslateInstance](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#gettranslateinstance) | [multiply](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation#multiply) |


Css Properties
| Name  | Type  | Description |
|  --- | --- | --- |
| `dx` | `number` | X axis translation |
| `dy` | `number` | Y axis translation |
| `xx` | `number` | X scale |
| `xy` | `number` | Xy skew |
| `yx` | `number` | Yx skew |
| `yy` | `number` | Y scale |


## Contents

Constructors
#### new Transformation()

• **new Transformation**()

Creates identity matrix

#### new Transformation(properties)

• **new Transformation**(`properties`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `properties` | [`Properties`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation#properties) | object to copy |


#### new Transformation(tr)

• **new Transformation**(`tr`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `tr` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | Transformation instance to copy |


#### new Transformation(xx, yx, xy, yy, dx, dy)

• **new Transformation**(`xx`, `yx`, `xy`, `yy`, `dx`, `dy`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `xx` | `number` | x scale |
| `yx` | `number` | yx skew |
| `xy` | `number` | xy skew |
| `yy` | `number` | y scale |
| `dx` | `number` | x axis translation |
| `dy` | `number` | y axis translation |


Methods
#### clone

▸ **clone**(): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Return clone object.

#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

a copy of this transformation

#### concatenate

▸ **concatenate**(`Tx`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Concatenates Tx to transformation

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Tx` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | transformation |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### createInverse

▸ **createInverse**(): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Create inverse transformation

#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

#### fastEquals

▸ **fastEquals**(`Tx`): `boolean`

Return true if transformation are identical

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Tx` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | transformation |


#### Returns

`boolean`

#### getAngle

▸ **getAngle**(): `number`

Gets rotation angle
Note: only for transformation without skewing

#### Returns

`number`

rotation angle

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### getDeterminant

▸ **getDeterminant**(): `number`

Returns matrix determinant

#### Returns

`number`

#### getLengthToXRatioAt

▸ **getLengthToXRatioAt**(): `number`

Return length to X ratio

#### Returns

`number`

#### getLengthToYRatioAt

▸ **getLengthToYRatioAt**(): `number`

Return length to Y ratio

#### Returns

`number`

#### getProperties

▸ **getProperties**(): [`Properties`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation#properties)

Gets all the properties pertaining to this object

#### Returns

[`Properties`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation#properties)

An object containing the properties to set

#### getScaleX

▸ **getScaleX**(): `number`

Returns X Scale(xx)

#### Returns

`number`

#### getScaleY

▸ **getScaleY**(): `number`

Returns Y Scale(yy)

#### Returns

`number`

#### getShearX

▸ **getShearX**(): `number`

Returns X sheer (xy)

#### Returns

`number`

#### getShearY

▸ **getShearY**(): `number`

Returns Y sheer (yx)

#### Returns

`number`

#### getTranslate

▸ **getTranslate**(): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Returns translation in both X & Y (dx, dy)

#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

#### getTranslateX

▸ **getTranslateX**(): `number`

Returns X translation (dx)

#### Returns

`number`

#### getTranslateY

▸ **getTranslateY**(): `number`

Returns Y translation (dy)

#### Returns

`number`

#### inverseTransform

▸ **inverseTransform**<`T`&gt;(`source`, `destination?`): `T`

Performs an inverse transform using points, rect or dimension

#### Type parameters

| Name | Type |
|  --- | --- |
| `T` | extends [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) |


#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | `T` | source rect |
| `Optional` `destination` | `T` | destination rect |


#### Returns

`T`

transformation from source to destination

#### inverseTransformDimension

▸ **inverseTransformDimension**(`sourceSize`, `targetSize?`): [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

Inverse transforms the specified dimension

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `sourceSize` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | the point to be inverse transformed |
| `Optional` `targetSize` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | the size to hold the transformed point |


#### Returns

[`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

the result of the inverse transform.

#### inverseTransformPoint

▸ **inverseTransformPoint**(`sourcePoint`, `destinationPoint?`): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Inverse transforms the specified point

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `sourcePoint` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | source point to transform |
| `Optional` `destinationPoint` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | optional destination point |


#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

the result of the inverse transform.

#### inverseTransformRect

▸ **inverseTransformRect**(`source`, `destination?`): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Inverse transform rectangle

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | source rectangle |
| `Optional` `destination` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangle |


#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

the transformed rect

#### inverseTransformXY

▸ **inverseTransformXY**(`x`, `y`): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Inverse transform point defined by two coordinates X and Y

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |


#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

#### isIdentity

▸ **isIdentity**(): `boolean`

Is identity transformation

#### Returns

`boolean`

is this identity transformation.

#### isRotated

▸ **isRotated**(): `boolean`

Is rotated transformation

#### Returns

`boolean`

rotation flag

#### preConcatenate

▸ **preConcatenate**(`Tx`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Pre-concatenates transformation matrix with Tx

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Tx` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | transformation |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### rotate

▸ **rotate**(`theta`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Rotate

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `theta` | `number` | angle to rotate |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### scale

▸ **scale**(`sx`, `sy`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Scale

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `sx` | `number` | scale factor along x coordinate |
| `sy` | `number` | scale factor along y coordinate |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setPointsToPointsTransformation

▸ **setPointsToPointsTransformation**(`src1`, `src2`, `src3`, `dst1`, `dst2`, `dst3`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets transformation based on three (source => destination) point pairs

**`Throws`**

Error if determinant === 0

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `src1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first source point |
| `src2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second source point |
| `src3` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | third source point |
| `dst1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first destination point |
| `dst2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second destination point |
| `dst3` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | third destination point |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setProperties

▸ **setProperties**(`properties?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets all the properties pertaining to this object

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `properties` | [`Properties`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.util#transformation#properties) | An object containing the properties to set |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setRectToRectTransformation

▸ **setRectToRectTransformation**(`source`, `destination`, `horizontalFlip?`, `verticalFlip?`, `aspectRatio?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets rect to rect transformation

**`Throws`**

if illegal source or destination rectangle

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | source rectangle |
| `destination` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangle |
| `Optional` `horizontalFlip` | `boolean` | horizontal flip |
| `Optional` `verticalFlip` | `boolean` | vertical flip |
| `Optional` `aspectRatio` | `boolean` | keeps aspect ratio |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setScale

▸ **setScale**(`xx`, `yy`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets X & Y Scale by xx and yy

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `xx` | `number` | x scale |
| `yy` | `number` | y scale |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setToIdentity

▸ **setToIdentity**(): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Resets this transform to the Identity transform.

#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setTransformation

▸ **setTransformation**(`xx`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets transformation

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `xx` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | Transformation |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

▸ **setTransformation**(`xx`, `yx`, `xy`, `yy`, `dx`, `dy`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets transformation

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `xx` | `number` | x scale |
| `yx` | `number` | yx skew |
| `xy` | `number` | xy skew |
| `yy` | `number` | y scale |
| `dx` | `number` | x axis translation |
| `dy` | `number` | y axis translation |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### setTranslate

▸ **setTranslate**(`dx`, `dy`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Sets X & Y translation by dx and dy

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `dx` | `number` | x offset |
| `dy` | `number` | y offset |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### shear

▸ **shear**(`shx`, `shy`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Applies a shear mapping to the transform

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `shx` | `number` | shear coefficient along x coordinate |
| `shy` | `number` | shear coefficient along y coordinate |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### toString

▸ **toString**(): `string`

Returns transformation parameters as one string

#### Returns

`string`

#### transform

▸ **transform**<`T`&gt;(`source`, `destination?`): `T`

Transforms from one point, rect, or dimension to another

#### Type parameters

| Name | Type |
|  --- | --- |
| `T` | extends [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath) | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) |


#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | `T` | origin to be transformed from |
| `Optional` `destination` | `T` | destination rectangle |


#### Returns

`T`

transformation from source to destination

▸ **transform**(`x`, `y`): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Transform point defined by two coordinates X and Y

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |


#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

#### transformDimension

▸ **transformDimension**(`sourceSize`, `targetSize?`): [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

Inverse transforms the specified dimension

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `sourceSize` | [`TextMetrics`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.textmetrics.textmetrics) | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | the point to be inverse transformed |
| `Optional` `targetSize` | [`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension) | the size to hold the transformed point |


#### Returns

[`Dimension`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.dimension.dimension)

the result of the transform.

#### transformPath

▸ **transformPath**(`srcPath`, `dstPath?`): [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath)

Transforms GraphicsPath

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `srcPath` | [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath) | source path to transform |
| `Optional` `dstPath` | [`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath) | transformed path |


#### Returns

[`GraphicsPath`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.renderer.graphicspath.graphicspath)

transformed path

#### transformPoint

▸ **transformPoint**(`src`, `dst?`): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Transform point

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `src` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | source point to transform |
| `Optional` `dst` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | optional returned transformed point |


#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

the transformed point

#### transformPoints

▸ **transformPoints**(`x`, `y`, `count`): `void`

Transform a set of point defined by two arrays

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number`[] | an array of x-coordinates |
| `y` | `number`[] | an array of y-coordinates |
| `count` | `number` | a count of point to transform |


#### Returns

`void`

#### transformPolygon

▸ **transformPolygon**(`source`, `destination?`): [`Polygon`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.polygon.polygon)

Transform polygon

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Polygon`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.polygon.polygon) | source polygon |
| `Optional` `destination` | [`Polygon`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.polygon.polygon) | destination polygon |


#### Returns

[`Polygon`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.polygon.polygon)

#### transformRect

▸ **transformRect**(`source`, `destination?`): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

Transform rectangle

**`Throws`**

if destination is readonly mode

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | source rectangle |
| `Optional` `destination` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangle |


#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

#### transformX

▸ **transformX**(`x`, `y`): `number`

Apply X transformation to x,y

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |


#### Returns

`number`

#### transformXY

▸ **transformXY**(`x`, `y`): [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

Transform point defined by two coordinates X and Y

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |


#### Returns

[`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point)

#### transformY

▸ **transformY**(`x`, `y`): `number`

Apply Y transformation to x,y

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |


#### Returns

`number`

#### translate

▸ **translate**(`tx`, `ty`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Translate

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `tx` | `number` | x offset along x coordinate |
| `ty` | `number` | y offset along y coordinate |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

this

#### canCreatePointsToPointsInstance

▸ `Static` **canCreatePointsToPointsInstance**(`src1`, `src2`, `src3`): `boolean`

Returns true if transformation can be created from provided source points

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `src1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first source point |
| `src2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second source point |
| `src3` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | third source point |


#### Returns

`boolean`

#### canCreateRectToRectInstance

▸ `Static` **canCreateRectToRectInstance**(`source`, `destination`): `boolean`

Return true if transformation can be created from source rectangle to destination rectangle.
Vertical or horizontal dimension can be empty

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | source rectangle |
| `destination` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangle |


#### Returns

`boolean`

#### divide

▸ `Static` **divide**(`a`, `b`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Divide two matrices

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `a` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | the first matrix |
| `b` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | the second matrix |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`

#### getPointsToPointsInstance

▸ `Static` **getPointsToPointsInstance**(`src1`, `src2`, `src3`, `dst1`, `dst2`, `dst3`, `destination?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Returns transformation based on three (source => destination) point pairs

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `src1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first source point |
| `src2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second source point |
| `src3` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | third source point |
| `dst1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first destination point |
| `dst2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second destination point |
| `dst3` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | third destination point |
| `Optional` `destination` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

#### getRectToRectInstance

▸ `Static` **getRectToRectInstance**(`source`, `destination`, `horizontalFlip?`, `verticalFlip?`, `aspectRatio?`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets rect to rect transformation

**`Throws`**

Error if source or destination is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `source` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | source rectangle |
| `destination` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | destination rectangle |
| `Optional` `horizontalFlip` | `boolean` | horizontal flip |
| `Optional` `verticalFlip` | `boolean` | vertical flip |
| `Optional` `aspectRatio` | `boolean` | keeps aspect ratio |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### getRotateInstance

▸ `Static` **getRotateInstance**(`theta`, `x`, `y`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets rotate instance

**`Throws`**

Error if x, y or theta is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `theta` | `number` | angle |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### getScaleInstance

▸ `Static` **getScaleInstance**(`scaleX`, `scaleY`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Get a new transformation instance based on scale values

**`Throws`**

Error if scaleX or scaleY is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `scaleX` | `number` | scale factor along x coordinate |
| `scaleY` | `number` | scale factor along y coordinate |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### getSegmentToSegmentInstance

▸ `Static` **getSegmentToSegmentInstance**(`from1`, `from2`, `to1`, `to2`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets segment to segment transformation

**`Throws`**

Error if source or destination is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `from1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first source segment point |
| `from2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second source segment point |
| `to1` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | first destination segment point |
| `to2` | [`Point`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.point.point) | second destination segment point |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

transformation that transforms point from1 => to1, and from2 => to2

#### getShearInstance

▸ `Static` **getShearInstance**(`shx`, `shy`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Get a new transformation instance based on shear values

**`Throws`**

Error if shx or shy is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `shx` | `number` | shear coefficient along x coordinate |
| `shy` | `number` | shear coefficient along y coordinate |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### getTranslateInstance

▸ `Static` **getTranslateInstance**(`x`, `y`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Gets translate instance

**`Throws`**

Error if x or y is null

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `x` | `number` | x coordinate |
| `y` | `number` | y coordinate |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation

#### multiply

▸ `Static` **multiply**(`a`, `b`, `dst?`): [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

Multiply two matrices

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `a` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | the first matrix |
| `b` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | the second matrix |
| `Optional` `dst` | [`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation) | destination transformation object |


#### Returns

[`Transformation`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.transformation.transformation)

new transformation