Where things come from in Who's On First.
Click here to see a full list of Who's On First property prefixes.
- Create a new property .json file using the template file.
- Fill out all required properties and optional properties, if available.
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, theqs:name
property would bename
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, theqs:name
property prefix would beqs
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
, orinteger
(string, required property). -
"items":
For properties with alist
ordictionary
"type"
, the type of item contained within thelist
ordictionary
(string, optional property). -
"patterns":
A regular expression which can be used to validate the property'sname
, 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'sname
andpatterns.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.