# Within

The **Within** function determines if one geography is fully within another geography.

### Syntax

```
Within(geography1, geography2)
```

The function has these arguments:

<table><thead><tr><th width="258"></th><th></th></tr></thead><tbody><tr><td>geography1</td><td><br>Required<br>The Geography value which is potentially within (inside) the other Geography value<br>Can be a Point, a Line Segment, or Polygon</td></tr><tr><td>geography2</td><td>Required<br>The Geography value that is potentially within (inside) the other Geography value</td></tr></tbody></table>

### Examples

```
Within(Geography("POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))"), Geography("POLYGON((0 0, 3 0, 3 3, 0 3, 0 0))"))
```

The function returns `True`.

```
Within([Centroid], [Coordinates])
```

```
Within(MakePoint(-73.985428, 40.748817), [Coordinates])
```

The first Within function determines if the Centroid of the polygon is within the polygon, while the second function determines if the Empire State Building ( -73.985428, 40.748817) is within the polygon.

<figure><img src="https://files.readme.io/0cc74b9-1.png" alt=""><figcaption></figcaption></figure>

```
Within([Coordinates], [Brooklyn])
```

The **Within** function determines if the values in the **Coordinates** column are within the boundaries of Brooklyn.

<figure><img src="https://files.readme.io/8016df4-2.png" alt=""><figcaption></figcaption></figure>
