# worldToIntrinsic

Transform planar world to intrinsic coordinates

## Syntax

``[xIntrinsic,yIntrinsic] = worldToIntrinsic(R,xWorld,yWorld)``

## Description

example

````[xIntrinsic,yIntrinsic] = worldToIntrinsic(R,xWorld,yWorld)` returns the intrinsic coordinates corresponding to planar world coordinates (`xWorld`, `yWorld`) in map raster `R`. If a point is outside the bounds of `R`, then `worldToIntrinsic` extrapolates the `xIntrinsic` and `yIntrinsic` coordinates.```

## Examples

collapse all

Import a GeoTIFF image [1] of Boston as an array and a `MapCellsReference` object. Find the intrinsic coordinates corresponding to the world $\mathit{x}$- and $\mathit{y}$-coordinates of `776500` and `2956600` survey feet, respectively.

```[Z,R] = readgeoraster('boston.tif'); [xIntrinsic,yIntrinsic] = worldToIntrinsic(R,776500,2956600)```
```xIntrinsic = 3.7136e+03 ```
```yIntrinsic = 1.2119e+03 ```

The result means that the world coordinates fall close to the center of the cell corresponding to column 3713 and row 1211 of the array.

You can reverse the operation by using the `intrinsicToWorld` function.

`[xWorld,yWorld] = intrinsicToWorld(R,xIntrinsic,yIntrinsic)`
```xWorld = 776500 ```
```yWorld = 2956600 ```

## Input Arguments

collapse all

x-coordinates in the world coordinate system, specified as a numeric array. `xWorld` coordinates can be outside the bounds of the raster `R`.

Data Types: `single` | `double`

y-coordinates in the world coordinate system, specified as a numeric array. `yWorld` is the same size as `xWorld`. `yWorld` coordinates can be outside the bounds of the raster `R`.

Data Types: `single` | `double`

## Output Arguments

collapse all

x-coordinates in the intrinsic coordinate system, returned as a numeric array. `xIntrinsic` is the same size as `xWorld`.

When `xWorld`(k) is outside the bounds of raster `R`, `xIntrinsic`(k) is extrapolated in the intrinsic coordinate system.

Data Types: `double`

y-coordinates in the intrinsic coordinate system, returned as a numeric array. `yIntrinsic` is the same size as `xWorld`.

When `yWorld`(k) outside the bounds of raster `R`, `yIntrinsic`(k) is extrapolated in the intrinsic coordinate system.

Data Types: `double`

## Version History

Introduced in R2013b