# longitudeToIntrinsicX

Convert from longitude to intrinsic x coordinates

## Syntax

``xIntrinsic = longitudeToIntrinsicX(R,lon)``

## Description

example

````xIntrinsic = longitudeToIntrinsicX(R,lon)` returns the x-coordinate in the intrinsic coordinate system corresponding to longitude `lon` in the geographic coordinate system, based on the relationship defined by geographic raster `R`.```

## Examples

collapse all

Import a GeoTIFF image [1] of the Gulf of Mexico as an array and a `GeographicCellsReference` object. Find the intrinsic $\mathit{x}$-coordinate corresponding to a longitude of `-90.0226` degrees.

```[Z,R] = readgeoraster('katrina.tif'); xIntrinsic = longitudeToIntrinsicX(R,-90.0226)```
```xIntrinsic = 341.0619 ```

The result means that coordinates with a longitude of `-90.0226` degrees fall between columns 341 and 342 of the posting points.

[1] The image used in this example is derived from imagery obtained from the NASA Goddard Scientific Visualization Studio (SVS) Image Server.

## Input Arguments

collapse all

Longitude coordinates, specified as a numeric array. `lon` coordinates can be outside the bounds of the raster `R`.

Data Types: `single` | `double`

## Output Arguments

collapse all

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

When `lon`(k) is outside the bounds of raster `R`, `xIntrinsic`(k) is extrapolated in the intrinsic coordinate system. Elements of `lon` with value `NaN` map to `NaN` in `xIntrinsic`.

Data Types: `double`