# ST_YMAX

Extracts the maximum value of the `y` coordinates from the supplied geometry. For `geo_point` or `geo_shape` types, this is equivalent to extracting the maximum latitude value.

## Syntax

`ST_YMAX(point)`

### Parameters

#### point

Expression of type `geo_point`, `geo_shape`, `cartesian_point`, or `cartesian_shape`. If the value is `null`, the function returns `null`.

## Examples

Calculate the minimum and maximum x and y coordinates for the city boundary of the airport with abbreviation "CPH":

```esql
FROM airport_city_boundaries
| WHERE abbrev == "CPH"
| EVAL envelope = ST_ENVELOPE(city_boundary)
| EVAL xmin = ST_XMIN(envelope), xmax = ST_XMAX(envelope), ymin = ST_YMIN(envelope), ymax = ST_YMAX(envelope)
| KEEP abbrev, airport, xmin, xmax, ymin, ymax
```

**This example extracts the envelope of the city boundary geometry, then calculates the minimum and maximum x and y coordinates, including the maximum y (latitude) using `ST_YMAX`.**

## Limitations

Spatial types such as `geo_point`, `geo_shape`, `cartesian_point`, and `cartesian_shape` are not supported in the `SORT` processing command. Attempting to sort on these types will result in an error.