<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreLocation",
  "identifier" : "/documentation/CoreLocation/CLLocation",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Location"
    ],
    "preciseIdentifier" : "c:objc(cs)CLLocation"
  },
  "title" : "CLLocation"
}
-->

# CLLocation

The latitude, longitude, and course information reported by the system.

```
class CLLocation
```

## Overview

A [`CLLocation`](/documentation/CoreLocation/CLLocation) object contains the geographical location and altitude of a device, along with values indicating the accuracy of those measurements and when they were collected. In iOS, a location object also contains course information — that is, the speed and heading in which the device was moving.

Typically, you don’t create location objects yourself. After you request location updates from your [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object, the system uses onboard sensors to gather location data and report that data to your app. Some services also return previously collected location data, which you can use as context to improve your services. You can always retrieve the most recently collected location from the <doc://com.apple.documentation/documentation/CoreLocation/CLLocationManager/location> property of your [`CLLocationManager`](/documentation/CoreLocation/CLLocationManager) object. You may create location objects yourself when you want to cache custom location data or calculate the distance between two geographical coordinates.

Use [`CLLocation`](/documentation/CoreLocation/CLLocation) objects as-is, and don’t subclass them.

## Topics

### Creating a location object

[`init(latitude:longitude:)`](/documentation/CoreLocation/CLLocation/init(latitude:longitude:))

Creates a location object with the specified latitude and longitude.

[`init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:)`](/documentation/CoreLocation/CLLocation/init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:))

Creates a location object with the specified coordinate and altitude information.

[`init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:speed:timestamp:)`](/documentation/CoreLocation/CLLocation/init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:speed:timestamp:))

Creates a location object with the specified coordinate, altitude, and course information.

[`init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:)`](/documentation/CoreLocation/CLLocation/init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:))

Creates a location object with the specified coordinate, altitude, course, and accuracy information.

[`init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:)`](/documentation/CoreLocation/CLLocation/init(coordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:))

### Getting the location attributes

[`coordinate`](/documentation/CoreLocation/CLLocation/coordinate)

The geographical coordinate information.

[`altitude`](/documentation/CoreLocation/CLLocation/altitude)

The altitude above mean sea level associated with a location, measured in meters.

[`ellipsoidalAltitude`](/documentation/CoreLocation/CLLocation/ellipsoidalAltitude)

The altitude as a height above the World Geodetic System 1984 (WGS84) ellipsoid, measured in meters.

[`CLLocationDistance`](/documentation/CoreLocation/CLLocationDistance)

A distance in meters from an existing location.

[`floor`](/documentation/CoreLocation/CLLocation/floor)

The logical floor of the building in which the user is located.

[`timestamp`](/documentation/CoreLocation/CLLocation/timestamp)

The time at which this location was determined.

[`sourceInformation`](/documentation/CoreLocation/CLLocation/sourceInformation)

Information about the source that provides the location.

### Getting the location accuracy

[`horizontalAccuracy`](/documentation/CoreLocation/CLLocation/horizontalAccuracy)

The radius of uncertainty for the location, measured in meters.

[`verticalAccuracy`](/documentation/CoreLocation/CLLocation/verticalAccuracy)

The validity of the altitude values, and their estimated uncertainty, measured in meters.

[`CLLocationAccuracy`](/documentation/CoreLocation/CLLocationAccuracy)

The accuracy of a geographical coordinate.

### Measuring the distance between coordinates

[`distance(from:)`](/documentation/CoreLocation/CLLocation/distance(from:))

Returns the distance (measured in meters) from the current object’s location to the specified location.

[`getDistanceFrom(_:)`](/documentation/CoreLocation/CLLocation/getDistanceFrom(_:))

Returns the distance (measured in meters) from the current object’s location to the specified location.

### Getting speed and course information

[`speed`](/documentation/CoreLocation/CLLocation/speed)

The instantaneous speed of the device, measured in meters per second.

[`speedAccuracy`](/documentation/CoreLocation/CLLocation/speedAccuracy)

The accuracy of the speed value, measured in meters per second.

[`course`](/documentation/CoreLocation/CLLocation/course)

The direction in which the device is traveling, measured in degrees and relative to due north.

[`courseAccuracy`](/documentation/CoreLocation/CLLocation/courseAccuracy)

The accuracy of the course value, measured in degrees.

[`CLLocationSpeed`](/documentation/CoreLocation/CLLocationSpeed)

The velocity (measured in meters per second) at which the device is moving.

[`CLLocationDirection`](/documentation/CoreLocation/CLLocationDirection)

An azimuth that is measured in degrees relative to true north.

[`CLLocationSpeedAccuracy`](/documentation/CoreLocation/CLLocationSpeedAccuracy)

The accuracy of a speed.

[`CLLocationDirectionAccuracy`](/documentation/CoreLocation/CLLocationDirectionAccuracy)

The accuracy of a compass heading.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)