# world.treeline.defs

- Kind: defs
- Authority: treeline.world
- Lexicon: 1
- Published by [treeline.world](https://lexicon.garden/identity/did:plc:sjejpugpajgvxweilujzjcmq), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:sjejpugpajgvxweilujzjcmq/world.treeline.defs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:sjejpugpajgvxweilujzjcmq/world.treeline.defs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:sjejpugpajgvxweilujzjcmq/world.treeline.defs/analytics)

## #coordinate (`world.treeline.defs#coordinate`)

Type: array

A coordinate tuple [longitude, latitude, elevation?] encoded as decimal strings (the ATProto data model has no floats).

### Items

- `coordinate` (array)
  - `items` (string)

## #externalIds (`world.treeline.defs#externalIds`)

Type: object

Cross-references to public open mapping registries (OSM, COTREX, USFS, OpenTrails, Wikidata).

### Properties

- `cotrexId` (string): Colorado Trail Explorer (COTREX) feature ID.
- `openTrailsId` (string): OpenTrails standard dataset feature identifier.
- `osmRelationId` (string): OpenStreetMap Relation ID.
- `osmWayId` (string): OpenStreetMap Way ID.
- `usfsTrailNumber` (string): US Forest Service official trail designation number (e.g. '514').
- `wikidataId` (string): Wikidata entity identifier.

## #gradeStats (`world.treeline.defs#gradeStats`)

Type: object

Gradient statistics and climb categorization for climbs, descents, or trail segments.

### Properties

- `avgGradePct` (string): Mean gradient percentage as a decimal string (e.g. '7.5' or '-6.2').
- `climbCategory` (string): Standard cycling/running climb category rating.
  - Constraints: knownValues: HC | 1 | 2 | 3 | 4 | uncategorized
- `maxGradePct` (string): Maximum slope gradient percentage as a decimal string (e.g. '18.2').

## #lineString (`world.treeline.defs#lineString`)

Type: object

Simplified GeoJSON LineString geometry for lightweight relay and map matching.

### Properties

- `coordinates` (array, required): Array of coordinate tuples [lon, lat, ele?].
  - Constraints: maxLength: 500
  - `items` (ref)
    - Reference: `#coordinate`
- `type` (string, required): GeoJSON geometry type specifier.
  - Constraints: const: "LineString"

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "coordinate": {
      "description": "A coordinate tuple [longitude, latitude, elevation?] encoded as decimal strings (the ATProto data model has no floats).",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "externalIds": {
      "description": "Cross-references to public open mapping registries (OSM, COTREX, USFS, OpenTrails, Wikidata).",
      "properties": {
        "cotrexId": {
          "description": "Colorado Trail Explorer (COTREX) feature ID.",
          "type": "string"
        },
        "openTrailsId": {
          "description": "OpenTrails standard dataset feature identifier.",
          "type": "string"
        },
        "osmRelationId": {
          "description": "OpenStreetMap Relation ID.",
          "type": "string"
        },
        "osmWayId": {
          "description": "OpenStreetMap Way ID.",
          "type": "string"
        },
        "usfsTrailNumber": {
          "description": "US Forest Service official trail designation number (e.g. '514').",
          "type": "string"
        },
        "wikidataId": {
          "description": "Wikidata entity identifier.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "gradeStats": {
      "description": "Gradient statistics and climb categorization for climbs, descents, or trail segments.",
      "properties": {
        "avgGradePct": {
          "description": "Mean gradient percentage as a decimal string (e.g. '7.5' or '-6.2').",
          "type": "string"
        },
        "climbCategory": {
          "description": "Standard cycling/running climb category rating.",
          "knownValues": [
            "HC",
            "1",
            "2",
            "3",
            "4",
            "uncategorized"
          ],
          "type": "string"
        },
        "maxGradePct": {
          "description": "Maximum slope gradient percentage as a decimal string (e.g. '18.2').",
          "type": "string"
        }
      },
      "type": "object"
    },
    "lineString": {
      "description": "Simplified GeoJSON LineString geometry for lightweight relay and map matching.",
      "properties": {
        "coordinates": {
          "description": "Array of coordinate tuples [lon, lat, ele?].",
          "items": {
            "ref": "#coordinate",
            "type": "ref"
          },
          "maxLength": 500,
          "type": "array"
        },
        "type": {
          "const": "LineString",
          "description": "GeoJSON geometry type specifier.",
          "type": "string"
        }
      },
      "required": [
        "type",
        "coordinates"
      ],
      "type": "object"
    }
  },
  "id": "world.treeline.defs",
  "lexicon": 1
}
```
