# Geography

### Angle

Takes three point GEOGRAPHY values, which represent two intersecting lines. Returns the angle between these lines. Point 2 and point 1 represent the first line and point 2 and point 3 represent the second line. The angle between these lines is in radians, in the range \[0, 2pi). The angle is measured clockwise from the first line to the second line. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_angle)

```sql
ST_ANGLE(@geography, @geography_2, @geography_3)
```

#### Return type

float

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_3` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Area

Returns the area in square meters covered by the polygons in the input GEOGRAPHY –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_area)

```sql
ST_AREA(@geography)
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### As GeoJSON

Returns the RFC 7946 compliant GeoJSON representation of the input GEOGRAPHY –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_asgeojson)

```sql
ST_ASGEOJSON(@geography)
```

#### Return type

string

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### As text

Returns the WKT representation of an input GEOGRAPHY –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_astext)

```sql
ST_ASTEXT(@geography)
```

#### Return type

string

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Azimuth

Takes two point GEOGRAPHY values, and returns the azimuth of the line segment formed by points 1 and 2. The azimuth is the angle in radians measured between the line from point 1 facing true North to the line segment from point 1 to point 2. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_azimuth)

```sql
ST_ANGLE(@geography, @geography_2)
```

#### Return type

float

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Boundary

Returns a single GEOGRAPHY that contains the union of the boundaries of each component in the given input GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_boundary)

```sql
ST_BOUNDARY(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Buffer

Returns a GEOGRAPHY that represents the buffer around the input GEOGRAPHY. This function is similar to ST\_BUFFERWITHTOLERANCE, but you specify the number of segments instead of providing tolerance to determine how much the resulting geography can deviate from the ideal buffer radius. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_buffer)

```sql
ST_BUFFER(@geography, @buffer_radius[, num_seg_quarter_circle => @num_seg_quarter_circle][, endcap => @endcap][, side => @side])
```

#### Return type

geography

#### Parameters

| Name                      | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`              | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@buffer_radius`          | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@num_seg_quarter_circle` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@endcap`                 | [enum](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#enum)                                                                                                                                     | any of: `ROUND`, `FLAT`                                                                                                                            | false    | *(Round (default))* |
| `@side`                   | [enum](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#enum)                                                                                                                                     | any of: `BOTH`, `LEFT`, `RIGHT`                                                                                                                    | false    | *(Both (default))*  |

### Buffer with tolerance

Returns a GEOGRAPHY that represents the buffer around the input GEOGRAPHY. This function is similar to ST\_BUFFER, but you provide tolerance instead of segments to determine how much the resulting geography can deviate from the ideal buffer radius. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_bufferwithtolerance)

```sql
ST_BUFFERWITHTOLERANCE(@geography, @buffer_radius, @tolerance_meters[, endcap => @endcap][, side => @side])
```

#### Return type

geography

#### Parameters

| Name                | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`        | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@buffer_radius`    | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@tolerance_meters` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@endcap`           | [enum](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#enum)                                                                                                                                     | any of: `ROUND`, `FLAT`                                                                                                                            | false    | *(Round (default))* |
| `@side`             | [enum](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#enum)                                                                                                                                     | any of: `BOTH`, `LEFT`, `RIGHT`                                                                                                                    | false    | *(Both (default))*  |

### Centroid

Returns the centroid of the input GEOGRAPHY as a single point GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_centroid)

```sql
ST_CENTROID(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Closest point

Returns a GEOGRAPHY containing a point on Geography 1 with the smallest possible distance to Geography 2. This implies that the distance between the point returned by ST\_CLOSESTPOINT and Geography 2 is less than or equal to the distance between any other point on Geography 1 and Geography 2. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_closestpoint)

```sql
ST_CLOSESTPOINT(@geography, @geography_2)
```

#### Return type

geography

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Contains

Returns TRUE if no point of Geography 2 is outside Geography 1, and the interiors intersect; returns FALSE otherwise. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_contains)

```sql
ST_CONTAINS(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Convex hull

Returns the convex hull for the input GEOGRAPHY. The convex hull is the smallest convex GEOGRAPHY that covers the input. A GEOGRAPHY is convex if for every pair of points in the GEOGRAPHY, the geodesic edge connecting the points are also contained in the same GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_convexhull)

```sql
ST_CONVEXHULL(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Covered by

Returns FALSE if Geography 1 or Geography 2 is empty. Returns TRUE if no points of Geography 1 lie in the exterior of Geography 2. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_coveredby)

```sql
ST_COVEREDBY(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Covers

Returns FALSE if Geography 1 or Geography 2 is empty. Returns TRUE if no points of Geography 2 lie in the exterior of Geography 1. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_covers)

```sql
ST_COVERS(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Difference

Returns a GEOGRAPHY that represents the point set difference of Geography 1 and Geography 2. Therefore, the result consists of the part of Geography 1 that does not intersect with Geography 2. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_difference)

```sql
ST_DIFFERENCE(@geography, @geography_2)
```

#### Return type

geography

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Dimension

Returns the dimension of the highest-dimensional element in the input GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_dimension)

```sql
ST_DIMENSION(@geography)
```

#### Return type

integer

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Disjoint

Returns TRUE if the intersection of Geography 1 and Geography 2 is empty, that is, no point in Geography 1 also appears in Geography 2. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_disjoint)

```sql
ST_DISJOINT(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Distance

Returns the shortest distance in meters between two non-empty GEOGRAPHYs. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_distance)

```sql
ST_DISTANCE(@geography, @geography_2)
```

#### Return type

float

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### DWithin

Returns TRUE if the distance between at least one point in Geography 1 and one point in Geography 2 is less than or equal to the Distance argument, otherwise, returns FALSE –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_dwithin)

```sql
ST_DWITHIN(@geography, @geography_2, @distance)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@distance`    | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |

### Endpoint

Returns the last point of a linestring geography as a point geography. Returns an error if the input is not a linestring or if the input is empty. Use the SAFE prefix to obtain NULL for invalid input instead of an error. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_endpoint)

```sql
[@safe]ST_ENDPOINT(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)   | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Equals

Returns TRUE if Geography 1 and Geography 2 represent the same GEOGRAPHY value. More precisely, this means that one of the following conditions holds: + ST\_COVERS(geography, geography\_2) = TRUE and ST\_COVERS(geography\_2, geography) = TRUE + Both Geography 1 and Geography 2 are empty. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_equals)

```sql
ST_EQUALS(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Exterior ring

Returns a linestring geography that corresponds to the outermost ring of a polygon geography. If the input geography is a polygon, gets the outermost ring of the polygon geography and returns the corresponding linestring. If the input is the full GEOGRAPHY, returns an empty geography. Returns an error if the input is not a single polygon. Use the SAFE prefix to obtain NULL for invalid input instead of an error. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_exteriorring)

```sql
[@safe]ST_EXTERIORRING(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)   | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Geo from

Converts an expression for a STRING or BYTES value into a GEOGRAPHY value. If expression represents a STRING value, it must be a valid GEOGRAPHY representation in one of the following formats: WKT, WKB, GeoJSON –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogfrom)

```sql
ST_GEOGFROM(@expression)
```

#### Return type

geography

#### Parameters

| Name          | Type                                                                                                                                                                                                                                                   | Allowed values                                                             | Required | Placeholder (in UI) |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------- | ------------------- |
| `@expression` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [string](https://docs.redivis.com/reference/datasets/variables#string) | true     | -                   |

### Geo from GeoJSON

Returns a GEOGRAPHY value that corresponds to the input GeoJSON representation. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogfromgeojson)

```sql
ST_GEOGFROMGEOJSON(@geojson[, @make_valid])
```

#### Return type

geography

#### Parameters

| Name          | Type                                                                                                                                                                                                                                                   | Allowed values                                                               | Required | Placeholder (in UI) |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | -------- | ------------------- |
| `@geojson`    | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [string](https://docs.redivis.com/reference/datasets/variables#string)   | true     | -                   |
| `@make_valid` | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)                                                                                                                               | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean) | true     | -                   |

### Geo from text

Returns a GEOGRAPHY value that corresponds to the input WKT representation. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogfromtext)

```sql
ST_GEOGFROMTEXT(@wkt[, @oriented][, @planar][, @make_valid])
```

#### Return type

geography

#### Parameters

| Name          | Type                                                                                                                                                                                                                                                   | Allowed values                                                               | Required | Placeholder (in UI) |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | -------- | ------------------- |
| `@wkt`        | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [string](https://docs.redivis.com/reference/datasets/variables#string)   | true     | -                   |
| `@oriented`   | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)                                                                                                                               | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean) | true     | -                   |
| `@planar`     | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)                                                                                                                               | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean) | true     | -                   |
| `@make_valid` | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)                                                                                                                               | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean) | true     | -                   |

### Geo from wkb

Converts an expression for a hexadecimal-text STRING or BYTES value into a GEOGRAPHY value. The expression must be in WKB format –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogfromwkb)

```sql
ST_GEOGFROMWKB(@wkb)
```

#### Return type

geography

#### Parameters

| Name   | Type                                                                                                                                                                                                                                                   | Allowed values                                                             | Required | Placeholder (in UI) |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------- | ------------------- |
| `@wkb` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [string](https://docs.redivis.com/reference/datasets/variables#string) | true     | -                   |

### Geogpoint

Creates a GEOGRAPHY with a single point. ST\_GEOGPOINT creates a point from the specified FLOAT64 longitude and latitude parameters and returns that point in a GEOGRAPHY value. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogpoint)

```sql
ST_GEOGPOINT(@longitude, @latitude)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@longitude` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@latitude`  | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |

### Geogpoint from Geohash

Returns a GEOGRAPHY value that corresponds to a point in the middle of a bounding box defined in the GeoHash –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geogpointfromgeohash)

```sql
ST_GEOGPOINTFROMGEOHASH(@geohash)
```

#### Return type

geography

#### Parameters

| Name       | Type                                                                                                                                                                                                                                                   | Allowed values                                                             | Required | Placeholder (in UI) |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | -------- | ------------------- |
| `@geohash` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [string](https://docs.redivis.com/reference/datasets/variables#string) | true     | -                   |

### Geohash

Returns a GeoHash representation of geography\_expression. The resulting GeoHash will contain at most Max chars characters. Fewer characters corresponds to lower precision (or, described differently, to a bigger bounding box) –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geohash)

```sql
ST_GEOHASH(@geography, @maxchars)
```

#### Return type

string

#### Parameters

| Name         | Type                                                                                                                                                                                                                                                   | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@maxchars`  | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer)     | true     | -                   |

### Geometry type

Returns the Open Geospatial Consortium (OGC) geometry type that describes the input GEOGRAPHY as a STRING. The OGC geometry type matches the types that are used in WKT and GeoJSON formats and printed for ST\_ASTEXT and ST\_ASGEOJSON. ST\_GEOMETRYTYPE returns the OGC geometry type with the "ST\_" prefix. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_geometrytype)

```sql
ST_GEOMETRYTYPE(@geography)
```

#### Return type

string

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Intersection

Returns a GEOGRAPHY that represents the point set intersection of the two input GEOGRAPHYs. Thus, every point in the intersection appears in both Geography 1 and Geography 2 –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_intersection)

```sql
ST_INTERSECTION(@geography, @geography_2)
```

#### Return type

geography

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Intersects

Returns TRUE if the point set intersection of Geography 1 and Geography 2 is non-empty. Thus, this function returns TRUE if there is at least one point that appears in both input GEOGRAPHYs. If ST\_INTERSECTS returns TRUE, it implies that ST\_DISJOINT returns FALSE. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_intersects)

```sql
ST_INTERSECTS(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Intersects box

Returns TRUE if geography intersects the rectangle between \[lng1, lng2] and \[lat1, lat2]. The edges of the rectangle follow constant lines of longitude and latitude. lng1 and lng2 specify the westmost and eastmost constant longitude lines that bound the rectangle, and lat1 and lat2 specify the minimum and maximum constant latitude lines that bound the rectangle. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_intersectsbox)

```sql
ST_INTERSECTSBOX(@geography, @lng1, @lat1, @lng2, @lat2)
```

#### Return type

boolean

#### Parameters

| Name         | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@lng1`      | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@lat1`      | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@lng2`      | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@lat2`      | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |

### Is collection

Returns TRUE if the total number of points, linestrings, and polygons is greater than one. An empty GEOGRAPHY is not a collection. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_iscollection)

```sql
ST_ISCOLLECTION(@geography)
```

#### Return type

boolean

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Is empty

Returns TRUE if the given GEOGRAPHY is empty; that is, the GEOGRAPHY does not contain any points, lines, or polygons. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_isempty)

```sql
ST_ISEMPTY(@geography)
```

#### Return type

boolean

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Length

Returns the total length in meters of the lines in the input GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_length)

```sql
ST_LENGTH(@geography)
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Make line

Creates a GEOGRAPHY with a single linestring by concatenating the point or line vertices of each of the input GEOGRAPHYs in the order they are given. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_makeline)

```sql
ST_MAKELINE(@geography, @geography_2)
```

#### Return type

geography

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Make polygon

Creates a GEOGRAPHY containing a single polygon from a linestring input, where the input linestring is used to construct a polygon ring. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_makepolygon)

```sql
ST_MAKEPOLYGON(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Max distance

Returns the longest distance in meters between two non-empty GEOGRAPHYs; that is, the distance between two vertices where the first vertex is in the first GEOGRAPHY, and the second vertex is in the second GEOGRAPHY. If Geography 1 and Geography 2 are the same GEOGRAPHY, the function returns the distance between the two most distant vertices in that GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_maxdistance)

```sql
ST_MAXDISTANCE(@geography, @geography_2)
```

#### Return type

float

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Num geometries

Returns the number of geometries in the input GEOGRAPHY. For a single point, linestring, or polygon, ST\_NUMGEOMETRIES returns 1. For any collection of geometries, ST\_NUMGEOMETRIES returns the number of geometries making up the collection. ST\_NUMGEOMETRIES returns 0 if the input is the empty GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_numgeometries)

```sql
ST_NUMGEOMETRIES(@geography)
```

#### Return type

integer

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Num points

Returns the number of vertices in the input GEOGRAPHY. This includes the number of points, the number of linestring vertices, and the number of polygon vertices. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_numpoints)

```sql
ST_NUMPOINTS(@geography)
```

#### Return type

integer

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Perimeter

Returns the length in meters of the boundary of the polygons in the input GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_perimeter)

```sql
ST_PERIMETER(@geography)
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Point N

Returns the Nth point of a linestring geography as a point geography, where N is the index. The index is 1-based. Negative values are counted backwards from the end of the linestring, so that -1 is the last point. Returns an error if the input is not a linestring, if the input is empty, or if there is no vertex at the given index. Use the SAFE prefix to obtain NULL for invalid input instead of an error. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_pointn)

```sql
[@safe]ST_POINTN(@geography, @index)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                                                                                                                                                   | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@index`     | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer)     | true     | -                   |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)                                                                                                                               | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Simplify

Returns a simplified version of geography, the given input GEOGRAPHY. The input GEOGRAPHY is simplified by replacing nearly straight chains of short edges with a single long edge. The input geography will not change by more than the tolerance specified by tolerance\_meters. Thus, simplified edges are guaranteed to pass within tolerance\_meters of the original positions of all vertices that were removed from that edge. The given tolerance\_meters is in meters on the surface of the Earth. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_simplify)

```sql
ST_SIMPLIFY(@geography, @tolerance_meters)
```

#### Return type

geography

#### Parameters

| Name                | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`        | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@tolerance_meters` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |

### Snap to grid

Returns the input GEOGRAPHY, where each vertex has been snapped to a longitude/latitude grid. The grid size is determined by the grid\_size parameter which is given in degrees. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_snaptogrid)

```sql
ST_SNAPTOGRID(@geography, @grid_size)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                                                                                                                                                   | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable)                                                                                                                             | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@grid_size` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) or [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal) | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |

### Start point

Returns the first point of a linestring geography as a point geography. Returns an error if the input is not a linestring or if the input is empty. Use the SAFE prefix to obtain NULL for invalid input instead of an error. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_startpoint)

```sql
[@safe]ST_STARTPOINT(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)   | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Touches

Returns TRUE provided the following two conditions are satisfied: (1) Geography 1 intersects Geography 2 and (2) the interior of Geography 1 and the interior of Geography 2 are disjoint. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_touches)

```sql
ST_TOUCHES(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Union

Returns a GEOGRAPHY that represents the point set union of all input GEOGRAPHYs. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_union)

```sql
ST_UNION(@geography, @geography_2)
```

#### Return type

geography

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Within

Returns TRUE if no point of Geography 1 is outside of Geography 2 and the interiors of Geography 1 and Geography 2 intersect. Given two geographies a and b, ST\_WITHIN(a, b) returns the same result as ST\_CONTAINS(b, a). Note the opposite order of arguments. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_within)

```sql
ST_WITHIN(@geography, @geography_2)
```

#### Return type

boolean

#### Parameters

| Name           | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`   | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@geography_2` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### X Min

Returns a float representing the west-most constant longitude line that bounds the geometry –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_xmin)

```sql
ST_BOUNDINGBOX(@geography).xmin
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### X Max

Returns a float representing the east-most constant longitude line that bounds the geometry –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_xmax)

```sql
ST_BOUNDINGBOX(@geography).xmax
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Point X

Returns the longitude in degrees of the single-point input GEOGRAPHY –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_x)

```sql
[@safe]ST_X(@geography)
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)   | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Point Y

Returns the latitude in degrees of the single-point input GEOGRAPHY –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_y)

```sql
[@safe]ST_Y(@geography)
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |
| `@safe`      | [boolean](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#boolean)   | any [boolean](https://docs.redivis.com/reference/datasets/variables#boolean)     | true     | -                   |

### Y Min

Returns a float representing the minimum constant latitude line that bounds the geometry. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_ymin)

```sql
ST_BOUNDINGBOX(@geography).ymin
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Y Max

Returns a float representing the maximum constant latitude line that bounds the geometry. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_ymax)

```sql
ST_BOUNDINGBOX(@geography).ymax
```

#### Return type

float

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Centroid aggregate

Computes the centroid of the set of input GEOGRAPHYs as a single point GEOGRAPHY. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_centroid_agg)

```sql
ST_CENTROID_AGG(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### Geo aggregate

Returns a geography variable that represents the point set union of all input geographies. –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_union_agg)

```sql
ST_UNION_AGG(@geography)
```

#### Return type

geography

#### Parameters

| Name         | Type                                                                                                                       | Allowed values                                                                   | Required | Placeholder (in UI) |
| ------------ | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography` | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography) | true     | -                   |

### DBSCAN clustering

Identifies high-density geography clusters and marks outliers in low-density areas of noise –> [learn more](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#st_clusterdbscan)

```sql
ST_CLUSTERDBSCAN(@geography, @epsilon, @minimum_geographies)
```

#### Return type

integer

#### Parameters

| Name                   | Type                                                                                                                       | Allowed values                                                                                                                                     | Required | Placeholder (in UI) |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------- |
| `@geography`           | [variable](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#variable) | any [geography](https://docs.redivis.com/reference/datasets/variables#geography)                                                                   | true     | -                   |
| `@epsilon`             | [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal)   | any [integer](https://docs.redivis.com/reference/datasets/variables#integer), [float](https://docs.redivis.com/reference/datasets/variables#float) | true     | -                   |
| `@minimum_geographies` | [literal](https://docs.redivis.com/reference/projects/transform-nodes/variable-creation-methods/common-elements#literal)   | any [integer](https://docs.redivis.com/reference/datasets/variables#integer)                                                                       | true     | -                   |
