{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publicschema.org/SpatialGeometry.schema.json",
  "title": "SpatialGeometry",
  "description": "A shape or position written in a named geometry encoding and coordinate reference system. It says where something is, not what it is; addresses, named areas and land parcels are described separately.",
  "type": "object",
  "properties": {
    "geometry_encoding": {
      "type": "string",
      "enum": [
        "geojson",
        "wkt",
        "gml",
        "kml"
      ],
      "$comment": "https://publicschema.org/vocab/geometry-encoding",
      "description": "The format in which the geometry is written, such as GeoJSON or Well-Known Text."
    },
    "geometry_literal": {
      "type": "string",
      "description": "The geometry written in the stated encoding. Coordinate order is determined by that encoding and the coordinate reference system."
    },
    "coordinate_reference_system": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the coordinate reference system for the coordinates. When it is absent, the system stated in the geometry literal applies, such as the URI that can precede a Well-Known Text literal; when neither states one, the longitude-then-latitude system named CRS84 applies, which GeoJSON always uses. When both state one, they must agree."
    }
  },
  "required": [
    "geometry_encoding",
    "geometry_literal"
  ]
}
