whosonfirst / whosonfirst-properties

What things mean in Who's On First documents
Other
5 stars 5 forks source link

whosonfirst-properties

Where things come from in Who's On First.

Click here to see a full list of Who's On First property prefixes.

Adding a new property

  1. Create a new property .json file using the template file.
  2. Fill out all required properties and optional properties, if available.

Properties

While a property .json file in the whosonfirst-properties repository does not require all properties listed below, the more information we are able to gather about a property, the better. When adding a new property, please provide as much current, available information about that specific property as possible.

Examples

wof:country

{
    "id": 1158807947,
    "name": "country",
    "prefix": "wof",
    "description": "A two-letter country code from ISO 3166.",
    "type": "string",
    "patterns": {
        "value": "^[A-Z]{2}$"
    }
}

The wof:country property contains a ISO 3166 country code and the value of this property can be tested/validated against the regular expression in patterns.value.

name:preferred

{
    "id": 1158804557,
    "name": "{lang}_x_preferred",
    "prefix": "name",
    "description": "The preferred name for a place. Used in Pelias and to generate language-specific map labels.",
    "type": "list",
    "items": {
        "type": "string"
    },
    "patterns": {
        "name": "*_x_preferred"
    }
}

Unlike other properties, the name of this property has language code wildcard, denoted by {lang} as part of the full name. The name can be tested and validated by building a regular expression formed from the prefix value and the patterns.name value, as in ^name:*_x_preferred$.

The property value contains a list of one or more string elements.

See also