---
title: st_estimatesrid function
description: Learn the syntax of the st\_estimatesrid function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/st_estimatesrid
---

# `st_estimatesrid` function

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime 18.1 and above ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Lakehouse//RT

> [!NOTE]
>
> This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see [SQL warehouse types](https://docs.databricks.com/aws/en/compute/sql-warehouse/warehouse-types.md).

Returns the best projected spatial reference identifier (SRID) for the center of the bounding box of the input `GEOMETRY` value. The returned SRID value represents either a [Universal Transverse Mercator (UTM)](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) projected coordinate system or a [Universal Polar Stereographic (UPS)](https://en.wikipedia.org/wiki/Universal_polar_stereographic_coordinate_system) projected coordinate system.

## Syntax

```
st_estimatesrid ( geoExpr )
```

## Arguments

* `geoExpr`: A `GEOMETRY` value with coordinates in degrees in the range \[-180, 180] for longitudes and \[-90, 90] for latitudes.

## Returns

A value of type `INTEGER`, representing the best [Universal Transverse Mercator (UTM)](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) or [Universal Polar Stereographic (UPS)](https://en.wikipedia.org/wiki/Universal_polar_stereographic_coordinate_system) SRID for the center of the bounding box of the input `GEOMETRY` value.

## Notes

The function returns `NULL` if the input geometry is empty or if the input is `NULL`.

## Examples

```sql
-- Returns UTM zone 10N SRID for a point in San Francisco.
> SELECT st_estimatesrid(st_geomfromtext('POINT(-122.419 37.775)'));
  32610

-- Returns UTM zone 31N SRID for a polygon near the prime meridian.
> SELECT st_estimatesrid(st_geomfromtext('POLYGON((0 0, 10 0, 10 10, 0 10, 0 0))'));
  32631

-- Returns UPS North SRID for a linestring near the North Pole.
> SELECT st_estimatesrid(st_geomfromtext('LINESTRING(-180 89, 180 89)'));
  32661

-- Returns NULL for an empty point.
> SELECT st_estimatesrid(st_geomfromtext('POINT EMPTY'));
  NULL
```

## Related functions

* [`st_srid` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/st_srid.md)
* [`st_setsrid` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/st_setsrid.md)
* [`st_transform` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/st_transform.md)
