Where things come from in Who's On First.
Click here to see a full list of Who's On First property prefixes.
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.
"id":
A unique numeric integer identifier, typically derived from Brooklyn Integers (integer, required property).
"name":
The name of a given property. For example, the qs:name
property would be name
to represent the "name" property derived from "Quattroshapes" (string, required property). See also Examples below.
"prefix":
The source that Who's On First derived this property from. For example, the qs:name
property prefix would be qs
to represent "Quattroshapes". This value is typically two to ten characters in length (string, required property) and must be unique (not shared with another source).
"description":
A one to two sentence description of the property value (string, optional property).
"type":
The property value type - string
, list
, dictionary
, float
, or integer
(string, required property).
"items":
For properties with a list
or dictionary
"type"
, the type of item contained within the list
or dictionary
(string, optional property).
"patterns":
A regular expression which can be used to validate the property's name
, the property's value or both. The "patterns"
property is an object which can contain up to two key/value pairs; patterns.name
validates the property's name
and patterns.value
validates the property's value. See also Examples below.
{
"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
.
{
"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.