Skip to content

Commit

Permalink
Merge pull request #71 from OvertureMaps/dev
Browse files Browse the repository at this point in the history
M2 Release
  • Loading branch information
RobSoetewey-TomTom committed Nov 14, 2023
2 parents cbb8de2 + f4582d6 commit 7e593ad
Show file tree
Hide file tree
Showing 37 changed files with 292 additions and 180 deletions.
2 changes: 1 addition & 1 deletion counterexamples/admins/locality/bad-admin-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subType": "administrativeLocality",
"localityType": "country",
"adminLevel": 100,
"context": "northAmericaId",
"contextId": "northAmericaId",
"names": {
"common": [
{
Expand Down
2 changes: 1 addition & 1 deletion counterexamples/admins/locality/bad-language.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"isoCountryCodeAlpha2": "US",
"defaultLanguage": "english",
"drivingSide": "right",
"context": "northAmericaId",
"contextId": "northAmericaId",
"names": {
"common": [
{
Expand Down
2 changes: 1 addition & 1 deletion counterexamples/admins/locality/missing-locality-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"updateTime": "2023-02-22T23:55:01-08:00",
"subType": "administrativeLocality",
"adminLevel": 2,
"context": "northAmericaId",
"contextId": "northAmericaId",
"names": {
"common": [
{
Expand Down
2 changes: 1 addition & 1 deletion counterexamples/admins/locality/missing-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subType": "administrativeLocality",
"localityType": "country",
"adminLevel": 2,
"context": "northAmericaId"
"contextId": "northAmericaId"
},
"geometry": {
"type": "Polygon",
Expand Down
2 changes: 1 addition & 1 deletion counterexamples/admins/locality/missing-sub-type.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"updateTime": "2023-02-22T23:55:01-08:00",
"localityType": "country",
"adminLevel": 2,
"context": "northAmericaId",
"contextId": "northAmericaId",
"names": {
"common": [
{
Expand Down
6 changes: 4 additions & 2 deletions docusaurus/docs/reference/admins/locality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import AdminLocalityExample from '!!raw-loader!@site/docs/_examples/admins/local

Localities are named, and typically populated, areas.

Area polygon of Localities, if known, are given by [Locality Area](localityArea) features.

<table>
<tr>
<th>Geometry Type</th>
<td><code>Point</code>, <code>Polygon</code> or <code>MultiPolygon</code></td>
<td><code>Point</code></td>
</tr>
<tr>
<th>Theme</th>
Expand Down Expand Up @@ -44,7 +46,7 @@ subdivisions of countries.

Every Administrative Locality has a valid `adminLevel` property set,
defining its position in the subdivision hierarchy. All Administrative
Localities at sub-country level must have a `context` property
Localities at sub-country level must have a `contextId` property
containing the GERS ID of the feature's parent Administrative Locality.

The borders of Administrative Localities, if known, are given by
Expand Down
48 changes: 48 additions & 0 deletions docusaurus/docs/reference/admins/localityArea.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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 LocalityAreaSchema from '!!raw-loader!@site/docs/_schema/admins/localityArea.yaml';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import LocalityAreaExample from '!!raw-loader!@site/docs/_examples/admins/localityArea/area-admin-country-no-context.yaml';

# localityArea

Adds land or maritime area polygon to locality.

Property <code>localityId</code> points at [Locality](locality) feature that this area belongs to.

<table>
<tr>
<th>Geometry Type</th>
<td><code>Polygon</code> or <code>MultiPolygon</code></td>
</tr>
<tr>
<th>Theme</th>
<td><code>admins</code></td>
</tr>
<tr>
<th>Type</th>
<td><code>localityArea</code></td>
</tr>
</table>

## Schema

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

## Examples

<Tabs>
<TabItem value="localityArea" label="LocalityArea" default>
<CodeBlock language="json">{ JSON.stringify(yamlLoad(LocalityAreaExample), null, 2) }</CodeBlock>
</TabItem>
</Tabs>
20 changes: 20 additions & 0 deletions docusaurus/docs/reference/base/land.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,26 @@ import TabItem from '@theme/TabItem';

# Land

Features in the land theme come from OpenStreetMap features with the `natural` tag.

<table>
<tr>
<th>Geometry Type</th>
<td>
<code>Point</code>, <code>LineString</code>, <code>Polygon</code>, or <code>MultiPolygon</code>
</td>
</tr>
<tr>
<th>Theme</th>
<td><code>base</code></td>
</tr>
<tr>
<th>Type</th>
<td><code>land</code></td>
</tr>
</table>


## Schema

<Tabs>
Expand Down
36 changes: 36 additions & 0 deletions docusaurus/docs/reference/base/landUse.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,34 @@ import generateResolverOptions from "@site/src/components/shared-libs/generateRe
import yamlLoad from "@site/src/components/yamlLoad"
import LandUseSchema from "!!raw-loader!@site/docs/_schema/base/landUse.yaml";

import LandUseExample from "!!raw-loader!@site/docs/_examples/base/landUse-example.yaml";
import LandUseExample2 from "!!raw-loader!@site/docs/_examples/base/landUse-example.yaml";

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Land Use

Features in the land use theme come primarily from OpenStreetMap features containing the `landuse` tag.

<table>
<tr>
<th>Geometry Type</th>
<td>
<code>Point</code>, <code>LineString</code>, <code>Polygon</code>, or <code>MultiPolygon</code>
</td>
</tr>
<tr>
<th>Theme</th>
<td><code>base</code></td>
</tr>
<tr>
<th>Type</th>
<td><code>landUse</code></td>
</tr>
</table>


## Schema

<Tabs>
Expand All @@ -23,3 +46,16 @@ import TabItem from '@theme/TabItem';
<CodeBlock language="jsx">{LandUseSchema}</CodeBlock>
</TabItem>
</Tabs>

## Examples

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

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

</Tabs>
21 changes: 21 additions & 0 deletions docusaurus/docs/reference/base/water.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ import TabItem from '@theme/TabItem';

# Water

Features in the water theme are from OpenStreetMap features with the `natural=water` tag.

<table>
<tr>
<th>Geometry Type</th>
<td>
<code>Point</code>, <code>LineString</code>, <code>Polygon</code>, or <code>MultiPolygon</code>
</td>
</tr>
<tr>
<th>Theme</th>
<td><code>base</code></td>
</tr>
<tr>
<th>Type</th>
<td><code>water</code></td>
</tr>
</table>



## Schema

<Tabs>
Expand Down
10 changes: 5 additions & 5 deletions docusaurus/docs/themes/admins/admins.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

Overture Administrative Boundary (Admins) data includes features that describe named localities in the real world including settlements, cities, regions, provinces, and countries.

The current version of the schema does not support the modeling of disputed boundaries or multiple geo-political views. In future schema versions, we will have support for:
The current version of the schema does not support the modeling of multiple geo-political views. In future schema versions, we will have support for:

1. Marking a boundary as disputed.
2. Providing multiple views of a country boundary based on the user's region.
3. Modeling the relationship between a country and its overseas territories or other disputed territories.
1. Providing multiple views of a country boundary based on the user's region.
2. Modeling the relationship between a country and its overseas territories or other disputed territories.

## Key Schema Design Choices

Expand All @@ -22,5 +21,6 @@ There are two sub-types:
- Administrative Localities model countries and their hierarchical subdivisions. Each Administrative Locality has an administrative level indicating its level within a country. Attributes like driving side and default language are also available.
- Named Localities model named places that are not part of a countries administrative hierarchy.

2. [Administrative Boundary](/reference/admins/administrativeBoundary) provides a boundary line of Administrative Localities. This feature allows for an easy display of country borders and
2. [LocalityArea](/reference/admins/localityArea) adds land or maritime polygon to [Locality](/reference/admins/locality).
3. [Administrative Boundary](/reference/admins/administrativeBoundary) provides a boundary line of Administrative Localities. This feature allows for an easy display of country borders and
administrative subdivisions within countries. Boundaries shared by different Administrative Localities are represented by one line. A maritime attribute supports filtering on boundaries located within seas or oceans.
1 change: 1 addition & 0 deletions docusaurus/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const sidebars = {
items: [
'reference/admins/administrativeBoundary',
'reference/admins/locality',
'reference/admins/localityArea',
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ properties:
updateTime: '2023-02-22T23:55:01-08:00'
version: 0
adminLevel: 2
maritime: true
isMaritime: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ properties:
updateTime: '2023-02-22T23:55:01-08:00'
version: 0
adminLevel: 2
maritime: true
isMaritime: true
geopolDisplay: disputed
14 changes: 3 additions & 11 deletions examples/admins/locality/admin-country-no-context.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
---
type: Feature
geometry:
type: MultiPolygon
coordinates:
- - - - -61.8743292
- 48.8068635
- - -78.4016703
- 26.273714
- - -120.7749598
- 32.2499745
- - -126.928757
- 49.0378679
- - -61.8743292
- 48.8068635
- -122.3183680
- 47.6238307
type: Point
properties:
theme: admins
type: locality
Expand Down
2 changes: 1 addition & 1 deletion examples/admins/locality/admin-named-locality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ geometry:
- 47.6238307
type: Point
properties:
context: seattleId
contextId: seattleId
localityType: neighborhood
names:
common:
Expand Down
48 changes: 0 additions & 48 deletions examples/admins/locality/geometry-multipolygon.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/admins/locality/geometry-point.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ properties:
version: 0
subType: administrativeLocality
adminLevel: 2
context: northAmericaId
contextId: northAmericaId
defaultLanguage: en
drivingSide: right
isoCountryCodeAlpha2: US
Expand Down
Loading

0 comments on commit 7e593ad

Please sign in to comment.