# com.hikeratlas.temp.defs

> Definitions shared by Hiker Atlas's records (https://www.hikeratlas.com). In beta: may change.

- Kind: defs
- Authority: temp.hikeratlas.com
- Lexicon: 1
- Published by [hikeratlas.com](https://lexicon.garden/identity/did:plc:7onixtzlmdjijmp7ympxedte), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:7onixtzlmdjijmp7ympxedte/com.hikeratlas.temp.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:7onixtzlmdjijmp7ympxedte/com.hikeratlas.temp.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:7onixtzlmdjijmp7ympxedte/com.hikeratlas.temp.defs/analytics)

## #actorView (`com.hikeratlas.temp.defs#actorView`)

Type: object

An account, as hikeratlas/atproto-indexer knows it.

### Properties

- `did` (string · did, required)
- `handle` (string · handle): Absent when the handle doesn't resolve back to the DID.
- `pds` (string · uri): The account's PDS: fetch blobs (photos, GPX) from it with com.atproto.sync.getBlob. Absent for an account the indexer has only just seen: resolve the DID.

## #aspectRatio (`com.hikeratlas.temp.defs#aspectRatio`)

Type: object

Width and height, in pixels or in proportion, as app.bsky.embed.defs#aspectRatio.

### Properties

- `height` (integer, required)
  - Constraints: minimum: 1
- `width` (integer, required)
  - Constraints: minimum: 1

## #photo (`com.hikeratlas.temp.defs#photo`)

Type: object

### Properties

- `alt` (string): For people who can't see the photo.
  - Constraints: maxGraphemes: 1000
- `aspectRatio` (ref, required): The image's width and height, as it is displayed (after any EXIF orientation), so it can be laid out before it's fetched.
  - Reference: `#aspectRatio`
- `at` (ref): Where it was taken, e.g. from its EXIF or its time on a track.
  - Reference: `#point`
- `image` (blob, required)
  - Constraints: maxSize: 2000000, accept: image/jpeg, image/png, image/webp
- `takenAt` (string · datetime)

## #point (`com.hikeratlas.temp.defs#point`)

Type: object

### Properties

- `lat` (integer, required): Microdegrees (degrees × 1,000,000).
- `lon` (integer, required): Microdegrees.

## #reviewView (`com.hikeratlas.temp.defs#reviewView`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `#actorView`
- `cid` (string · cid, required)
- `indexedAt` (string · datetime, required)
- `record` (unknown, required): The com.hikeratlas.temp.review record.
- `uri` (string · at-uri, required)

## #routeKey (`com.hikeratlas.temp.defs#routeKey`)

Type: string

A route's key (recipe v1: https://github.com/hikeratlas/route-keys): a decodable cell part and a hash of the route's line, e.g. 1E57E06gbDEBBBICDGF.tn3dBnAuR_Q. Used as a fave's record key, and to tie tracks and reviews to a route.

Constraints: maxLength: 128

## #routeStats (`com.hikeratlas.temp.defs#routeStats`)

Type: object

Counts of records about a route.

### Properties

- `faves` (integer, required): Faves from accounts that have a com.hikeratlas.temp.actor.profile record.
  - Constraints: minimum: 0
- `lastActivity` (string · datetime): The newest fave, review or track's createdAt.
- `recentTags` (array): Tags from reviews of hikes in the last 30 days (by hikedAt, else createdAt), the most recently reported first.
  - Constraints: maxLength: 20
  - `items` (string)
    - Constraints: maxLength: 64
- `reviews` (integer, required)
  - Constraints: minimum: 0
- `routeKey` (ref, required)
  - Reference: `#routeKey`
- `tracks` (integer, required)
  - Constraints: minimum: 0

## #trackView (`com.hikeratlas.temp.defs#trackView`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `#actorView`
- `cid` (string · cid, required)
- `indexedAt` (string · datetime, required)
- `record` (unknown, required): The com.hikeratlas.temp.track record.
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "actorView": {
      "description": "An account, as hikeratlas/atproto-indexer knows it.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "handle": {
          "description": "Absent when the handle doesn't resolve back to the DID.",
          "format": "handle",
          "type": "string"
        },
        "pds": {
          "description": "The account's PDS: fetch blobs (photos, GPX) from it with com.atproto.sync.getBlob. Absent for an account the indexer has only just seen: resolve the DID.",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "aspectRatio": {
      "description": "Width and height, in pixels or in proportion, as app.bsky.embed.defs#aspectRatio.",
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "photo": {
      "properties": {
        "alt": {
          "description": "For people who can't see the photo.",
          "maxGraphemes": 1000,
          "type": "string"
        },
        "aspectRatio": {
          "description": "The image's width and height, as it is displayed (after any EXIF orientation), so it can be laid out before it's fetched.",
          "ref": "#aspectRatio",
          "type": "ref"
        },
        "at": {
          "description": "Where it was taken, e.g. from its EXIF or its time on a track.",
          "ref": "#point",
          "type": "ref"
        },
        "image": {
          "accept": [
            "image/jpeg",
            "image/png",
            "image/webp"
          ],
          "maxSize": 2000000,
          "type": "blob"
        },
        "takenAt": {
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "image",
        "aspectRatio"
      ],
      "type": "object"
    },
    "point": {
      "properties": {
        "lat": {
          "description": "Microdegrees (degrees × 1,000,000).",
          "type": "integer"
        },
        "lon": {
          "description": "Microdegrees.",
          "type": "integer"
        }
      },
      "required": [
        "lat",
        "lon"
      ],
      "type": "object"
    },
    "reviewView": {
      "properties": {
        "author": {
          "ref": "#actorView",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "record": {
          "description": "The com.hikeratlas.temp.review record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "indexedAt"
      ],
      "type": "object"
    },
    "routeKey": {
      "description": "A route's key (recipe v1: https://github.com/hikeratlas/route-keys): a decodable cell part and a hash of the route's line, e.g. 1E57E06gbDEBBBICDGF.tn3dBnAuR_Q. Used as a fave's record key, and to tie tracks and reviews to a route.",
      "maxLength": 128,
      "type": "string"
    },
    "routeStats": {
      "description": "Counts of records about a route.",
      "properties": {
        "faves": {
          "description": "Faves from accounts that have a com.hikeratlas.temp.actor.profile record.",
          "minimum": 0,
          "type": "integer"
        },
        "lastActivity": {
          "description": "The newest fave, review or track's createdAt.",
          "format": "datetime",
          "type": "string"
        },
        "recentTags": {
          "description": "Tags from reviews of hikes in the last 30 days (by hikedAt, else createdAt), the most recently reported first.",
          "items": {
            "maxLength": 64,
            "type": "string"
          },
          "maxLength": 20,
          "type": "array"
        },
        "reviews": {
          "minimum": 0,
          "type": "integer"
        },
        "routeKey": {
          "ref": "#routeKey",
          "type": "ref"
        },
        "tracks": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "routeKey",
        "faves",
        "reviews",
        "tracks"
      ],
      "type": "object"
    },
    "trackView": {
      "properties": {
        "author": {
          "ref": "#actorView",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "record": {
          "description": "The com.hikeratlas.temp.track record.",
          "type": "unknown"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "indexedAt"
      ],
      "type": "object"
    }
  },
  "description": "Definitions shared by Hiker Atlas's records (https://www.hikeratlas.com). In beta: may change.",
  "id": "com.hikeratlas.temp.defs",
  "lexicon": 1
}
```
