# world.ptah.location

> Published by [ptah.world](https://lexicon.garden/identity/did:plc:l45z35sxxjuobp5q65a5vu22)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:l45z35sxxjuobp5q65a5vu22/world.ptah.location)
- [Documentation](https://lexicon.garden/lexicon/did:plc:l45z35sxxjuobp5q65a5vu22/world.ptah.location/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:l45z35sxxjuobp5q65a5vu22/world.ptah.location/examples)

## Definitions

### `world.ptah.location`

**Type**: `record`

A place inside a world. Where things happen. Locations nest infinitely — a room inside a building inside a city inside a territory.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The name of the location |
| `createdAt` | `string` (datetime) | Yes | Timestamp when this location was created |
| `creatorDID` | `string` (did) | Yes | The permanent identity of the location's creator |
| `depthIndex` | `integer` | No | Nesting depth — 0 for top-level, incrementing for each level down |
| `description` | `string` | No | What this location is like |
| `locationType` | `string` | No | The type of location |
| `parentLocation` | `string` (at-uri) | No | Reference to the parent location (if nested) |
| `worldReference` | `string` (at-uri) | Yes | Reference to the world this location exists in |
| `canonicalStatus` | `string` | No | The canonical standing of this location |
| `locationProperties` | `ref` → `#locationProperties` | No | Additional structured properties for this location |

### `world.ptah.location#locationProperties`

**Type**: `object`

Structured metadata for locations

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `climate` | `string` | No |  |
| `population` | `string` | No |  |
| `notableHistory` | `string` | No |  |
| `controllingFaction` | `string` | No |  |

## Raw Schema

```json
{
  "id": "world.ptah.location",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "creatorDID",
          "worldReference",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 640,
            "description": "The name of the location",
            "maxGraphemes": 64
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when this location was created"
          },
          "creatorDID": {
            "type": "string",
            "format": "did",
            "description": "The permanent identity of the location's creator"
          },
          "depthIndex": {
            "type": "integer",
            "minimum": 0,
            "description": "Nesting depth — 0 for top-level, incrementing for each level down"
          },
          "description": {
            "type": "string",
            "maxLength": 10240,
            "description": "What this location is like",
            "maxGraphemes": 1024
          },
          "locationType": {
            "type": "string",
            "description": "The type of location",
            "knownValues": [
              "territory",
              "city",
              "building",
              "room",
              "landmark",
              "wilderness",
              "vessel",
              "virtual"
            ]
          },
          "parentLocation": {
            "type": "string",
            "format": "at-uri",
            "description": "Reference to the parent location (if nested)"
          },
          "worldReference": {
            "type": "string",
            "format": "at-uri",
            "description": "Reference to the world this location exists in"
          },
          "canonicalStatus": {
            "type": "string",
            "description": "The canonical standing of this location",
            "knownValues": [
              "world.ptah.defs#canonicalStatusOfficial",
              "world.ptah.defs#canonicalStatusCommunity",
              "world.ptah.defs#canonicalStatusApocryphal"
            ]
          },
          "locationProperties": {
            "ref": "#locationProperties",
            "type": "ref",
            "description": "Additional structured properties for this location"
          }
        }
      },
      "description": "A place inside a world. Where things happen. Locations nest infinitely — a room inside a building inside a city inside a territory."
    },
    "locationProperties": {
      "type": "object",
      "properties": {
        "climate": {
          "type": "string",
          "maxLength": 640,
          "maxGraphemes": 64
        },
        "population": {
          "type": "string",
          "maxLength": 640,
          "maxGraphemes": 64
        },
        "notableHistory": {
          "type": "string",
          "maxLength": 2560,
          "maxGraphemes": 256
        },
        "controllingFaction": {
          "type": "string",
          "maxLength": 640,
          "maxGraphemes": 64
        }
      },
      "description": "Structured metadata for locations"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
