Returns the maximum X-coordinate value of a raster object.

## Syntax
```
HELPCODEESCAPE-sql
float8 ST_XMax(raster raster_obj)
```

## Parameters
<table> <thead> <tr> <th><b>Parameter</b></th> <th><b>Description</b></th> </tr> </thead> <tbody> <tr> <td><code>raster_obj</code></td> <td>The name of the raster object.</td> </tr> </tbody> </table>

## Description
`ST_XMax` returns the maximum X-coordinate value of the raster object.
> If the raster object has not been georeferenced, `ST_XMax` returns `-1`.

## Examples
**Georeferenced raster --- returns the maximum X-coordinate:**

```
HELPCODEESCAPE-sql
SELECT ST_XMax(rast)
FROM raster_table;
```

Result:

```
 st_xmax
----------
      121
```

## See also
* [ST_XMin](https://www.alibabacloud.com/help/en/document_detail/176073.html) --- Returns the minimum X-coordinate value of a raster object.

* [ST_YMax](https://www.alibabacloud.com/help/en/document_detail/176076.html) --- Returns the maximum Y-coordinate value of a raster object.

* [ST_YMin](https://www.alibabacloud.com/help/en/document_detail/176074.html) --- Returns the minimum Y-coordinate value of a raster object.