# Documentation

## Syntax

• ``````[latlim,lonlim] = geoquadline(lat,lon)``````
example

## Description

example

``````[latlim,lonlim] = geoquadline(lat,lon)``` returns the limits of the tightest possible geographic quadrangle that bounds a line connecting vertices with geographic coordinates specified by `lat` and `lon`. ```

## Examples

collapse all

### Bounding Quadrangle for the Brahmaputra River.

Read shape data and then create a bounding box around the line.

```brahmaputra = shaperead('worldrivers.shp','Selector',{@(name) strcmp(name,'Brahmaputra'), 'Name'}, 'UseGeoCoords',true); [latlim, lonlim] = geoquadline(brahmaputra.Lat, brahmaputra.Lon) ```
```latlim = 23.8285 30.3831 lonlim = 81.8971 95.4970```

## Input Arguments

collapse all

### `lat` — Latitudes along a linevector

Latitudes along a line, specified as a vector representing an ordered sequences of vertices, in units of degrees. The line may be broken into multiple parts, delimited by values of `NaN`.

Data Types: `single` | `double`

### `lon` — Longitudes along a linevector

Longitudes along a line, specified as a vector representing an ordered sequences of vertices, in units of degrees. The line may be broken into multiple parts, delimited by values of `NaN`.

Data Types: `single` | `double`

## Output Arguments

collapse all

### `latlim` — Latitude limits1–by-2 vector

Latitude limits of a geographic quadrangle, returned as a 1-by-2 vector of the form `[southern_limit northern_limit]`, in units of degrees. The elements are in ascending order, and both lie in the closed interval [-90 90].

### `lonlim` — Longitude limits1–by-2 vector

Longitude limits of a geographic quadrangle, returned as a 1-by-2 vector of the form `[western_limit eastern_limit]`, in units of degrees. The limits are wrapped to the interval [-180 180]. They are not necessarily in numerical ascending order.