# LocationData

Artifact: [androidx.health:health-services-client](https://developer.android.com/jetpack/androidx/releases/health) [View Source](https://cs.android.com/search?q=file:androidx/health/services/client/data/LocationData.kt+class:androidx.health.services.client.data.LocationData) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

*** ** * ** ***


```
public final class LocationData
```

<br />

*** ** * ** ***

Data representing one location point with direction.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#LocationData(kotlin.Double,kotlin.Double,kotlin.Double,kotlin.Double)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = -90.0, to = 90.0) double latitude, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = -180.0, to = 180.0) double longitude, double altitude, double bearing )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#getAltitude()()` Altitude of location in meters or `https://developer.android.com/reference/androidx/health/services/client/data/LocationData.Companion#ALTITUDE_UNAVAILABLE()` if not available. |
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#getBearing()()` Bearing in degrees within the range of 0.0 (inclusive), 360.0(exclusive) or `https://developer.android.com/reference/androidx/health/services/client/data/LocationData.Companion#BEARING_UNAVAILABLE()` if not available. |
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#getLatitude()()` Latitude of location. |
| `final double` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#getLongitude()()` Longitude of location. |
| `int` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/services/client/data/LocationData#toString()()` |

## Public constructors

### LocationData

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public LocationData(
    @FloatRange(from = -90.0, to = 90.0) double latitude,
    @FloatRange(from = -180.0, to = 180.0) double longitude,
    double altitude,
    double bearing
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getAltitude

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getAltitude()
```

Altitude of location in meters or `https://developer.android.com/reference/androidx/health/services/client/data/LocationData.Companion#ALTITUDE_UNAVAILABLE()` if not available.

### getBearing

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getBearing()
```

Bearing in degrees within the range of 0.0 (inclusive), 360.0(exclusive) or `https://developer.android.com/reference/androidx/health/services/client/data/LocationData.Companion#BEARING_UNAVAILABLE()` if not available.

### getLatitude

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getLatitude()
```

Latitude of location. Range from -90.0 to = 90.0.

### getLongitude

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/health#1.0.0)

```
public final double getLongitude()
```

Longitude of location. Range from -180.0 to = 180.0.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```