---
title: "MTBounds | Mobile sdk | Mobile sdk ios | Ios"
description: "Represents rectangular geographic bounds defined by southwest and northeast corners."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# MTBounds

```
public struct MTBounds : Sendable, Codable, Equatable
```

Represents rectangular geographic bounds defined by southwest and northeast corners.

-   `[southWest](#/s:11MapTilerSDK8MTBoundsV9southWestSo22CLLocationCoordinate2DVvp)`
    
    Southwest corner of the bounds.
    
    #### Declaration
    
    Swift
    
    ```
    public var southWest: CLLocationCoordinate2D
    ```
    
-   `[northEast](#/s:11MapTilerSDK8MTBoundsV9northEastSo22CLLocationCoordinate2DVvp)`
    
    Northeast corner of the bounds.
    
    #### Declaration
    
    Swift
    
    ```
    public var northEast: CLLocationCoordinate2D
    ```
    
-   `[init(southWest:northEast:)](#/s:11MapTilerSDK8MTBoundsV9southWest9northEastACSo22CLLocationCoordinate2DV_AGtcfc)`
    
    Creates a new bounds instance.
    
    #### Declaration
    
    Swift
    
    ```
    public init(southWest: CLLocationCoordinate2D, northEast: CLLocationCoordinate2D)
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>southWest</em></code></td><td><div><p>The southwest corner coordinate.</p></div></td></tr><tr><td><code><em>northEast</em></code></td><td><div><p>The northeast corner coordinate.</p></div></td></tr></tbody></table>
    
-   `[init(from:)](#/s:Se4fromxs7Decoder_p_tKcfc)`
    
    #### Declaration
    
    Swift
    
    ```
    public init(from decoder: Decoder) throws
    ```
    
-   `[encode(to:)](#/s:SE6encode2toys7Encoder_p_tKF)`
    
    #### Declaration
    
    Swift
    
    ```
    public func encode(to encoder: Encoder) throws
    ```
    
-   `[contains(_:)](#/s:11MapTilerSDK8MTBoundsV8containsySbSo22CLLocationCoordinate2DVF)`
    
    Checks if the bounds contain the coordinate.
    
    #### Declaration
    
    Swift
    
    ```
    public func contains(_ coordinate: CLLocationCoordinate2D) -> Bool
    ```
    
    #### Parameters
    
    <table class="graybox"><tbody><tr><td><code><em>coordinate</em></code></td><td><div><p>The coordinate to check.</p></div></td></tr></tbody></table>
    
    #### Return Value
    
    True if the coordinate is inside the bounds.
