{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "place",
  "description": "A Place is a point representation of a real-world facility, service, or amenity. Place features are compatible with GeoJSON Point features.",
  "type": "object",
  "properties": {
    "id": {
      "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyDefinitions/id"
    },
    "geometry": {
      "description": "Place's geometry which MUST be a Point as defined by GeoJSON schema.",
      "unevaluatedProperties": false,
      "oneOf": [
        {
          "$ref": "https://geojson.org/schema/Point.json"
        }
      ]
    },
    "properties": {
      "unevaluatedProperties": false,
      "allOf": [
        {
          "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyContainers/overtureFeaturePropertiesContainer"
        },
        {
          "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyContainers/namesContainer"
        }
      ],
      "required": [
        "operating_status"
      ],
      "properties": {
        "theme": {
          "const": "places"
        },
        "type": {
          "const": "place"
        },
        "categories": {
          "description": "The categories of the place. Complete list is available on\nGitHub: https://github.com/OvertureMaps/schema/blob/main/docs/schema/concepts/by-theme/places/overture_categories.csv\n",
          "type": "object",
          "required": [
            "primary"
          ],
          "properties": {
            "primary": {
              "description": "The primary or main category of the place. This can be empty.",
              "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/places/definitions/schema.json#/$defs/typeDefinitions/category"
            },
            "alternate": {
              "description": "Alternate categories of the place. Some places might fit into two categories, e.g. a book store and a coffee shop. In such a case, the primary category can be augmented with additional applicable categories.",
              "type": "array",
              "items": {
                "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/places/definitions/schema.json#/$defs/typeDefinitions/category"
              },
              "uniqueItems": true
            }
          }
        },
        "basic_category": {
          "description": "The basic level category of a place. At present this is a mapping of the categories.primary entry to a new, simplified name. This mapping can be 1:1 or M:1 from the existing primary.categories entry. If the entry is currently empty in categories.primary, this entry will be empty.  This type of categorization is a cognitive science model that is relevant for taxonomy and ontology development that shows the most broadest and general category name that is most often found in the middle of a general-to-specific hierarchy, with generalization proceeding upward and specialization proceeding downward.  The full list of basic level categories is available at:(todo)",
          "type": "string",
          "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/places/definitions/schema.json#/$defs/typeDefinitions/category"
        },
        "confidence": {
          "description": "The confidence of the existence of the place. It's a number between 0 and 1. 0 means that we're sure that the place doesn't exist (anymore). 1 means that we're sure that the place exists. If there's no value for the confidence, it means that we don't have any confidence information. Places with operating_status set to 'closed' will have a confidence score of 0",
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "websites": {
          "description": "The websites of the place.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "uniqueItems": true,
          "minItems": 1
        },
        "socials": {
          "description": "The social media URLs of the place.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "uniqueItems": true,
          "minItems": 1
        },
        "emails": {
          "description": "The email addresses of the place.",
          "type": "array",
          "items": {
            "type": "string",
            "format": "email"
          },
          "uniqueItems": true,
          "minItems": 1
        },
        "phones": {
          "description": "The phone numbers of the place.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true,
          "minItems": 1
        },
        "brand": {
          "description": "The brand of the place. A location with multiple brands is modeled as multiple separate places, each with its own brand.",
          "type": "object",
          "allOf": [
            {
              "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyContainers/namesContainer"
            }
          ],
          "properties": {
            "wikidata": {
              "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyDefinitions/wikidata"
            }
          }
        },
        "addresses": {
          "description": "The addresses of the place.",
          "type": "array",
          "items": {
            "$ref": "https://ogcincubator.github.io/bblocks-overturemaps/build/annotated/overturemaps/schemas/definitions/schema.json#/$defs/propertyDefinitions/address"
          },
          "uniqueItems": true,
          "minItems": 1
        },
        "operating_status": {
          "description": "Indicates the operating status of a place, can be one of [\"open\", \"permanently_closed\", \"temporarily_closed\"].  This is not an indication of 'opening hours' or that the place is open/closed at the current time-of-day or day-of-week.",
          "type": "string",
          "enum": [
            "open",
            "permanently_closed",
            "temporarily_closed"
          ]
        }
      }
    }
  }
}