# utmzone

UTM zone from latitude and longitude

## Syntax

``zone = utmzone``
``zone = utmzone(lat,lon)``
``[latlim,lonlim] = utmzone(queryZone)``

## Description

````zone = utmzone` opens the Pick UTM Zone dialog box, which enables you to interactively identify a Universal Transverse Mercator (UTM) zone from a world map.```

example

````zone = utmzone(lat,lon)` identifies the UTM zone that contains the latitude-longitude coordinates specified by `lat` and `lon`. When you specify the coordinates of more than one point, the function identifies the UTM zone using the geographic mean of the points.```

example

````[latlim,lonlim] = utmzone(queryZone)` identifies the latitude and longitude limits of the UTM zone `queryZone`.```

## Examples

collapse all

Specify the geographic coordinates of the MathWorks Lakeside Campus in Natick, MA. Then, find the UTM zone that contains the coordinates.

```lat = 42.3013; lon = -71.3782; zone = utmzone(lat,lon)```
```zone = '19T' ```

Identify the latitude and longitude limits of UTM zone `19F`, which contains the southern tip of South America. Specify the UTM zone using a zone number and latitude band letter.

`[latlim,lonlim] = utmzone("19F")`
```latlim = 1×2 -56 -48 ```
```lonlim = 1×2 -72 -66 ```

## Input Arguments

collapse all

Latitude coordinates in degrees, specified as scalar, vector, or matrix. Each latitude coordinate must be in the range [–80, 84].

• When `lat` and `lon` define a single point, the `utmzone` function finds the UTM zone containing the point.

• When `lat` and `lon` define multiple points, the `utmzone` function finds the UTM zone containing the geographic mean of the points.

The sizes of `lat` and `lon` must match.

Data Types: `single` | `double`

Longitude coordinates in degrees, specified as scalar, vector, or matrix. Each longitude coordinate must be in the range [–180, 180].

• When `lat` and `lon` define a single point, the `utmzone` function finds the UTM zone containing the point.

• When `lat` and `lon` define multiple points, the `utmzone` function finds the UTM zone containing the geographic mean of the points.

The sizes of `lat` and `lon` must match.

Data Types: `single` | `double`

UTM zone, specified as a character vector or a string scalar in one of these forms:

• Zone number — An integer between `1` and `60`, such as `"19"`.

• Zone number and latitude band letter — An integer between `1` and `60` followed by a letter between `C` and `X` (excluding `I` and `O`), such as `"19T"`. The letters are case-insensitive.

The letters `N` and `S` refer to latitude band letters, not the northern or southern hemispheres.

Data Types: `char` | `string`

## Output Arguments

collapse all

UTM zone, returned as a character vector. The UTM zone returned by the `utmzone` function contains a zone number and a latitude band letter.

• When `lat` and `lon` are scalars, `zone` is the UTM zone that contains the coordinates.

• When `lat` and `lon` are vectors or matrices, `zone` is the UTM zone that contains the geographic mean of the coordinates.

The letters `N` and `S` refer to latitude band letters, not the northern or southern hemispheres.

Data Types: `char`

Latitude limits of the UTM zone, returned as a two-element vector.

Data Types: `double`

Longitude limits of the UTM zone, returned as a two-element vector.

Data Types: `double`

## Limitations

With the exception of a few zones in northern Europe, the UTM system of projections divides the globe into uniform zones. The `utmzone` function does not account for these exceptions.

## Version History

Introduced before R2006a

expand all