Skip to content

Commit

Permalink
Merge branch 'staging' into main: for release v0.11.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
vcschapp committed May 15, 2024
2 parents 7c9c6e7 + 1bf063c commit d228364
Show file tree
Hide file tree
Showing 36 changed files with 1,218 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "Feature",
"properties": {
"ext_expected_errors": [
"[I#/properties/default_language] [S#/$defs/propertyDefinitions/language/pattern] does not match pattern '^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-[a-zA-Z]{2})?$'"
"[I#/properties/default_language] [S#/$defs/propertyDefinitions/language/pattern] does not match pattern"
],
"theme": "admins",
"type": "locality",
Expand All @@ -12,7 +12,7 @@
"locality_type": "country",
"admin_level": 1,
"iso_country_code_alpha_2": "US",
"default_language": "english",
"default_language": "statscan_rbuid",
"driving_side": "right",
"context_id": "northAmericaId",
"names": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ properties:
en: Empire State Building
rules:
- variant: common
language: local
language: ga:genitive
value: Blah
31 changes: 31 additions & 0 deletions counterexamples/common/names/names-invalid-language.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
id: names-invalid-language
type: Feature
geometry:
type: LineString
coordinates: [[0, 0], [1, 1]]
properties:
theme: transportation
type: segment
version: 1
update_time: "2024-04-15T16:22:07-08:00"
subtype: road
class: primary
names:
primary: Foo
common:
ja_rm: Not allowed to have an underscore
zh_pinyin: Not allowed to have an underscore
en1: Not allowed to have a digit in the language part
rules:
- language: etymology:wikidata
value: Not allowed to have a colon
- language: etymology
value: Too long
- language: pronunciation
value: Too long
ext_expected_errors:
- "additionalProperties 'zh_pinyin', 'en1', 'ja_rm' not allowed"
- "[I#/properties/names/rules/0/language] [S#/$defs/propertyDefinitions/language/pattern] does not match pattern"
- "[I#/properties/names/rules/1/language] [S#/$defs/propertyDefinitions/language/pattern] does not match pattern"
- "[I#/properties/names/rules/2/language] [S#/$defs/propertyDefinitions/language/pattern] does not match pattern"
63 changes: 63 additions & 0 deletions docusaurus/docs/reference/admins/administrative_boundary.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: administrative boundary
---

import CodeBlock from '@theme/CodeBlock';
import JSONSchemaViewer from "@theme/JSONSchemaViewer";
import generateResolverOptions from "@site/src/components/shared-libs/generateResolverOptions"
import yamlLoad from "@site/src/components/yamlLoad"
import AdministrativeBoundarySchema from '!!raw-loader!@site/docs/_schema/admins/administrative_boundary.yaml';
import AdminBoundaryExample from '!!raw-loader!@site/docs/_examples/admins/administrative_boundary/boundary.yaml';
import DisputedAdminBoundaryExample from '!!raw-loader!@site/docs/_examples/admins/administrative_boundary/disputed-boundary.yaml';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Administrative Boundary

Administrative boundaries are borders surrounding administrative [localities](locality).

<table>
<tbody>
<tr>
<th>Geometry Type</th>
<td><code>LineString</code></td>
</tr>
<tr>
<th>Theme</th>
<td><code>admins</code></td>
</tr>
<tr>
<th>Type</th>
<td><code>administrative_boundary</code></td>
</tr>
</tbody>
</table>

An administrative boundary is typically an officially defined border
between two administrative [localities](locality). In light of
geopolitical issues, some administrative boundaries represent standalone
disputed or treaty lines and therefore do not coincide with the border
of an administrative locality. The administrative boundary and two
administrative localities do not share common geometry.

## Schema

<Tabs>
<TabItem value="browsable" label="Browsable" default>
<JSONSchemaViewer schema={ yamlLoad(AdministrativeBoundarySchema) } resolverOptions={ generateResolverOptions({remote: true, yamlBasePath: '/admins'})}/>
</TabItem>
<TabItem value="yaml" label="YAML" default>
<CodeBlock language="jsx">{AdministrativeBoundarySchema}</CodeBlock>
</TabItem>
</Tabs>

## Examples

<Tabs>
<TabItem value="1" label="Administrative Boundary" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(AdminBoundaryExample), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="2" label="Disputed Administrative Boundary" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(DisputedAdminBoundaryExample), null, 2) }</CodeBlock>
</TabItem>
</Tabs>
6 changes: 3 additions & 3 deletions docusaurus/docs/reference/admins/locality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ Area polygons of localities, if known, are given by [locality area](locality_are
</tbody>
</table>

## Sub-types
## Subtypes

A locality may have one of two possible sub-types.
A locality may have one of two possible subtypes.

<Tabs>
<TabItem value="administrative_locality" label="Administrative Locality" default>
Expand All @@ -58,7 +58,7 @@ localities at sub-country level must have a `context_id` property
containing the GERS ID of the feature's parent administrative locality.

The borders of administrative localities, if known, are given by
[administrative boundary](administrative-boundary) features.
[administrative boundary](administrative_boundary) features.
</TabItem>
<TabItem value="named_locality" label="Named Locality">
<table>
Expand Down
8 changes: 1 addition & 7 deletions docusaurus/docs/reference/base/land_use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,10 @@ Features in the land use theme come primarily from OpenStreetMap features contai
</TabItem>
</Tabs>

## Examples
## Example

<Tabs>
<TabItem value="1" label="Example 1" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(LandUseExample), null, 2) }</CodeBlock>
</TabItem>

<TabItem value="2" label="Example 2" default>
<!-- FIXME: This is just repeating the first example again! -->
<CodeBlock language="json">{ JSON.stringify(yamlLoad(LandUseExample2), null, 2) }</CodeBlock>
</TabItem>

</Tabs>
4 changes: 2 additions & 2 deletions docusaurus/docs/reference/divisions/boundary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ of a division.
## Examples

<Tabs>
<TabItem value="1" label="Boundary" default>
<TabItem value="1" label="boundary" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(divisions_boundary_example_land), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="2" label="Disputed Boundary" default>
<TabItem value="2" label="disputed boundary" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(divisions_disputed_boundary_example_both), null, 2) }</CodeBlock>
</TabItem>
</Tabs>
90 changes: 74 additions & 16 deletions docusaurus/docs/reference/divisions/division.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import division_example_perspectives from '!!raw-loader!@site/docs/_examples/div

# Division

A division is a recognized official or non-official organization of people as seen from a given political perspective. Examples of divisions include countries, provinces, cities, towns and neighborhoods.
A division is a recognized official or non-official organization of people as seen from a given political perspective.


<table>
Expand All @@ -38,12 +38,19 @@ A division is a recognized official or non-official organization of people as se
</tbody>
</table>

## Sub-types
## Subtypes

A division may have one of two possible sub-types: `country` or `region`.
A division may include one of the following subtypes:

- `country`
- `region`
- `county`
- `localadmin`
- `locality`
- `neighborhood`

<Tabs>
<TabItem value="country" label="Country" default>
<TabItem value="country" label="country" default>
<table>
<tbody>
<tr>
Expand All @@ -54,11 +61,10 @@ A division may have one of two possible sub-types: `country` or `region`.
</table>


The border of a country, if known, is given by
[boundary](boundary) features.
A country is the largest unit of independent sovereignty. The border of a country, if known, is given by [boundary](boundary) features. Example: United States
</TabItem>

<TabItem value="region" label="Region">
<TabItem value="region" label="region">
<table>
<tbody>
<tr>
Expand All @@ -68,8 +74,63 @@ The border of a country, if known, is given by
</tbody>
</table>

A region represents a named area that is not formally part of
the hierarchical subdivision of a country.
A region is the largest administrative unit within most countries and a first-level administrative subdivision. Example: Alberta
</TabItem>

<TabItem value="county" label="county" default>
<table>
<tbody>
<tr>
<th><code>subtype</code></th>
<td><code>county</code></td>
</tr>
</tbody>
</table>


A county is a second-level administrative subdivision. Example: Kings County, NY
</TabItem>

<TabItem value="localadmin" label="localadmin" default>
<table>
<tbody>
<tr>
<th><code>subtype</code></th>
<td><code>localadmin</code></td>
</tr>
</tbody>
</table>


Localadmin is a level of government in some parts of the world that contains localities or populated places that themselves have no authority. Often but not exclusively found in Europe. Localadmin is a third-level administrative subdivision. Example: [Paris](https://spelunker.whosonfirst.org/id/1159322569/)
</TabItem>

<TabItem value="locality" label="locality" default>
<table>
<tbody>
<tr>
<th><code>subtype</code></th>
<td><code>locality</code></td>
</tr>
</tbody>
</table>


A locality is a populated place that may or may not have its own administrative authority. (It won't if it belongs to a localadmin.) Locality may be a third-level administrative subdivision. Example: Taipei
</TabItem>

<TabItem value="neighborhood" label="neighborhood" default>
<table>
<tbody>
<tr>
<th><code>subtype</code></th>
<td><code>neighborhood</code></td>
</tr>
</tbody>
</table>


A neighborhood is a geographically localized community within a city, town, suburb or rural area, sometimes consisting of a single street and the buildings lining it. Example: Cobble Hill
</TabItem>
</Tabs>

Expand All @@ -88,19 +149,16 @@ the hierarchical subdivision of a country.
## Examples

<Tabs>
<TabItem value="country" label="Country" default>
<TabItem value="country" label="country" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(division_example_country), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="region" label="Region" default>
<TabItem value="region" label="region" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(division_example_region), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="hierarchies" label="Multiple hierarchies" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(division_example_hierarchies_multiple), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="population" label="Population" default>
<TabItem value="population" label="population" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(division_example_population), null, 2) }</CodeBlock>
</TabItem>
<TabItem value="perspectives" label="Perspectives" default>
<TabItem value="perspectives" label="perspectives" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(division_example_perspectives), null, 2) }</CodeBlock>
</TabItem>
</Tabs>
Loading

0 comments on commit d228364

Please sign in to comment.