Skip to content

Commit 2e27cc7

Browse files
Build docs without schema repo dependency
This change restructures the docs build to remove the dependency on the schema repository, enabling faster builds and simpler deployment. Key changes: - Add injectable schema references for dynamic content - Reorganize example files and schema definitions - Optimize image assets (convert large GIFs to MP4s, compress PNGs) - Add staging deployment workflow - Update linting and formatting configurations - Fix package-lock.json for cross-platform compatibility
1 parent eeaed5c commit 2e27cc7

119 files changed

Lines changed: 12927 additions & 14807 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
.DS_Store
22
.docusaurus
33
node_modules/
4-
docs/_examples/
5-
docs/_schema/
6-
docs/schema/
7-
docs/schema
8-
static/_schema/
94
build/

.markdownlint.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD033": false,
5+
"MD041": false,
6+
"MD024": {
7+
"siblings_only": true
8+
}
9+
}

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
build/
2+
.docusaurus/
3+
node_modules/
4+
package-lock.json
5+
*.md
6+
*.mdx

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"bracketSpacing": true,
8+
"arrowParens": "always",
9+
"proseWrap": "preserve"
10+
}

docs/getting-data/duckdb.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Download all pizza restaurants in New York City as a `GeoJSON` file.
3535

3636
<QueryBuilder query={NewYorkPizza}></QueryBuilder>
3737

38-
See the [places schema](/schema/reference/places/place) to learn more about each attribute or the [common schema concepts](/schema/concepts/names/) to better understand `names.primary` from `names.common`.
3938
</TabItem>
4039

4140
<TabItem value="Buildings" label="Buildings">

docs/schema/index.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Overview
3+
slug: /schema
4+
5+
# This page is available at docs.overturemaps.org/schema
6+
---
7+
import CodeBlock from '@theme/CodeBlock';
8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
10+
11+
### Top-level properties
12+
13+
In the Overture schema, all features have a unique `id` called a [GERS ID](https://docs.overturemaps.org/gers/), a `geometry` object that follows the OGC geometry specification, and other top-level properties.
14+
15+
<details>
16+
<summary>**GeoParquet columns for top-level Overture properties**</summary>
17+
| column_name | column_type | description |
18+
| --- | --- | --- |
19+
| **id** | *string* | an Overture feature's unique id, part of the Global Entity Reference System (GERS) |
20+
| **geometry** | *binary* | well-known binary (WKB) representation of the feature geometry |
21+
| **bbox** | *struct\<xmin: float, xmax: float, ymin: float, ymax: float\>* | area defined by two longitudes and two latitudes: latitude is a decimal number between -90.0 and 90.0; longitude is a decimal number between -180.0 and 180.0. |
22+
| **theme** | *string* | one of six Overture data themes |
23+
| **type** | *string* | one of 14 Overture feature types |
24+
| **version** | *int32* | version number of the feature, incremented in each Overture release where the geometry or attributes of this feature changed |
25+
| **sources** | *list\<element: struct\<property: string, dataset: string, record_id: string, update_time: string, confidence: double, between: list\<double\>\>\>* | array of source information for the properties of a given feature |
26+
</details>
27+
28+
### Other key schema properties
29+
30+
Most but not all of the feature types in the Overture schema require data for the `names`, `subtype`, and `class` properties. The `names` property is complex enough to have its own schema.
31+
32+
### Properties may be specific to a feature type
33+
34+
Some properties in the Overture schema are only populated with data for specific feature types. For example, the `place` feature type must include data for the `categories` property, as required by the schema. The `division_area` and `address` feature types require the `country` property to be populated with ISO 3166-1 alpha-2 country codes. The `segment` feature type in the transportation theme is the only feature type that includes data for a complex set of properties that describe roads. The reference section of this documentation digs into the details of these complexities.
35+
36+
## Schema conventions
37+
38+
### Notations
39+
40+
#### Snake case
41+
42+
We use snake case instead of camel case for all property names, string enumeration members, and string-valued enumeration equivalents. We do this because of case sensitivity and transformation issues in different databases and query engines. For example, Athena/Trino downcases everything, so text string splits in camel case property names get lost; in contrast, snake case passes through without issues.
43+
44+
#### Booleans
45+
46+
Boolean properties have a prefix verb "is" or "has" in a way that grammatically makes sense, e.g. `has_street_lights=true` and `is_accessible=false`.
47+
48+
### Measurements
49+
50+
<!-- add to the docs: if we're using both feet and meters in measurements, what's the best way to determine the unit of measure? the schema, presumably, but also the bounding box of the data?
51+
-->
52+
53+
Measurements of real-world objects and features follow [The International System of Units (SI)](https://www.bipm.org/en/publications/si-brochure): heights, widths, lengths, etc. In the Overture schema, these values are provided as scalar numeric value without units such as feet or meters. Overture does this to maximize consistency and predictability.
54+
55+
Quantities specified in regulatory rules, norms and customs follow local specifications wherever possible. In the schema, these values are provided as two-element arrays where the first element is the scalar numeric value and the second value is the units. Overture uses local units of measurement: feet in the United States and meters in the EU, for example. The exact unit is confirmed in the specification of the property but is not repeated in the data.
56+
57+
### Regulations and restrictions
58+
59+
All quantities that relate to posted or ordinance regulations and restrictions are expressed in the same units as used in the regulation. The unit is explicitly included with the property in the data.
60+
61+
### Opening hours and validity periods
62+
63+
Opening hours and the time frame during which time dependent properties are applicable are indicated following the [OSM Opening Hours specification](https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification).
64+
65+
<!-- This is not yet true
66+
### Extensions
67+
68+
Overture allows for add hoc extensions beyond what is described in the schema. All extensions are prefixed with `ext_`. Extensions can be provided at the theme level, the type level, or the property level.
69+
-->
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# NameRule
2+
3+
Name rule with variant and language specification.
4+
5+
## Fields
6+
7+
| Name | Type | Description |
8+
|-----:|:----:|-------------|
9+
| `side` | `string` ([Side](/schema/codegen/Names/name_rule/side/)) (optional) | Examples: `left`, `right` |
10+
| `between` | `list<float64>` (optional) | |
11+
| `value` | `string` | |
12+
| `variant` | `string` ([NameVariant](/schema/codegen/Names/name_rule/name_variant/)) | Examples: `common`, `official`, `alternate`, ... |
13+
| `language` | `string` (optional) | |
14+
| `perspectives` | `object` (`[Perspectives](perspectives)`) (optional) | |
15+
| `perspectives.mode` | `string` ([PerspectiveMode](perspective_mode)) | Whether the perspective holder accepts or disputes this name. Examples: `accepted_by`, `disputed_by` |
16+
| `perspectives.countries` | `list` | Countries holding the given mode of perspective. |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# NameVariant
2+
3+
An enumeration.
4+
5+
## Values
6+
7+
- `common`
8+
- `official`
9+
- `alternate`
10+
- `short`
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Names
2+
3+
Multilingual names container.
4+
5+
## Fields
6+
7+
| Name | Type | Description |
8+
|-----:|:----:|-------------|
9+
| `primary` | `string` | The most commonly used name. |
10+
| `common` | `object` (optional) | |
11+
| `rules` | `list<object (`[NameRule](name_rule)`)>` (optional) | Rules for names that cannot be specified in the simple common names property. These rules can cover other name variants such as official, alternate, and short; and they can optionally include geometric scoping (linear referencing) and side-of-road scoping for complex cases. |
12+
| `rules.side` | `string` ([Side](side)) (optional) | Examples: `left`, `right` |
13+
| `rules.between` | `list<float64>` (optional) | |
14+
| `rules.value` | `string` | |
15+
| `rules.variant` | `string` ([NameVariant](name_variant)) | Examples: `common`, `official`, `alternate`, ... |
16+
| `rules.language` | `string` (optional) | |
17+
| `rules.perspectives` | `object` (`[Perspectives](perspectives)`) (optional) | |
18+
| `rules.perspectives.mode` | `string` ([PerspectiveMode](perspective_mode)) | Whether the perspective holder accepts or disputes this name. Examples: `accepted_by`, `disputed_by` |
19+
| `rules.perspectives.countries` | `list` | Countries holding the given mode of perspective. |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PerspectiveMode
2+
3+
Perspective mode for disputed names.
4+
5+
## Values
6+
7+
- `accepted_by`
8+
- `disputed_by`

0 commit comments

Comments
 (0)