---
title: HKWorkoutRouteQueryDescriptor
framework: healthkit
role: symbol
role_heading: Structure
path: healthkit/hkworkoutroutequerydescriptor
---

# HKWorkoutRouteQueryDescriptor

A query interface that reads the location data stored in a workout route using Swift concurrency.

## Declaration

```swift
struct HKWorkoutRouteQueryDescriptor
```

## Overview

Overview Use HKWorkoutRouteQueryDescriptor to access the individual CLLocation objects stored in an HKWorkoutRoute sample. To read the individual locations, create a workout route query descriptor using the desired route, and then call the descriptor’s results(for:) method. // Create the descriptor. let routeQueryDescriptor = HKWorkoutRouteQueryDescriptor(myRoute)

// Get the AsyncSequence that returns individual locations. let locations = routeQueryDescriptor.results(for: store)

// Access each location. for try await location in locations {          // Process the results here.     print(location.coordinate)     print(location.timestamp) } While this method returns an AsyncSequence, unlike the long-running queries, this sequence has a finite size. Iterating over the sequence asynchronously returns the route’s locations, automatically terminating after you receive all the locations.

## Topics

### Creating workout route query descriptors

- [init(_:)](healthkit/hkworkoutroutequerydescriptor/init(_:).md)

### Running queries

- [results(for:)](healthkit/hkworkoutroutequerydescriptor/results(for:).md)
- [HKWorkoutRouteQueryDescriptor.Results](healthkit/hkworkoutroutequerydescriptor/results.md)

### Accessing query properties

- [workoutRoute](healthkit/hkworkoutroutequerydescriptor/workoutroute.md)

### Default Implementations

- [HKAsyncSequenceQuery Implementations](healthkit/hkworkoutroutequerydescriptor/hkasyncsequencequery-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [HKAsyncSequenceQuery](healthkit/hkasyncsequencequery.md)

## See Also

### Series queries

- [HKQuantitySeriesSampleQueryDescriptor](healthkit/hkquantityseriessamplequerydescriptor.md)
- [HKQuantitySeriesSampleQuery](healthkit/hkquantityseriessamplequery.md)
- [HKWorkoutRouteQuery](healthkit/hkworkoutroutequery.md)
- [HKHeartbeatSeriesQueryDescriptor](healthkit/hkheartbeatseriesquerydescriptor.md)
- [HKHeartbeatSeriesQuery](healthkit/hkheartbeatseriesquery.md)
- [HKElectrocardiogramQueryDescriptor](healthkit/hkelectrocardiogramquerydescriptor.md)
- [HKElectrocardiogramQuery](healthkit/hkelectrocardiogramquery.md)
- [HKWorkoutEffortRelationship](healthkit/hkworkouteffortrelationship.md)
- [HKWorkoutEffortRelationshipQuery](healthkit/hkworkouteffortrelationshipquery.md)
