Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions counterexamples/divisions/division/bad-class.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: counterexample:division:bad-class
type: Feature
geometry:
type: Polygon
coordinates: [0, 1]
properties:
theme: divisions
type: division
version: 0
subtype: country
class: mammalia
division_id: counterexample:division:some-class
names:
primary: A division area with an invalid class property.
country: ZZ
ext_expected_errors:
- "value must be one of 'megacity', 'city', 'town', 'village', 'hamlet'"
30 changes: 30 additions & 0 deletions examples/divisions/division/class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: example:division:locality:dk
type: Feature
geometry:
type: Point
coordinates: [12.0819247, 55.6433478]
properties:
theme: divisions
type: division
version: 0
subtype: locality
local_type:
en: city
names:
primary: Roskilde
sources:
- property: ""
dataset: OpenStreetMap
record_id: N21040334
country: DK
hierarchies:
- - division_id: example:division:country:dk
subtype: country
name: Denmark
capital_of_divisions:
- division_id: example:division:country:dk
subtype: country
parent_division_id: example:division:country:dk
population: 50781
class: city
19 changes: 19 additions & 0 deletions schema/divisions/division.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ properties: # JSON Schema: Top-level object properties.
required: [names, subtype, country, hierarchies, parent_division_id]
properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property
subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" }
class:
type: string
enum:
- megacity #A extensive, large human settlement.
#Example: Tokyo, Japan.

- city #A relatively large, permanent human settlement.
#Example: Guadalajara, Mexico.

- town #A medium-sized human settlement that is smaller than a city,
#but larger than a village.
#Example: Walldürn, Germany.

- village #A smaller human settlement that is smaller than a town,
#but larger than a hamlet.
#Example: Wadi El Karm, Lebanon.

- hamlet #A small, isolated human settlement in a rural area
#Example: Tjarnabyggð, Iceland.
local_type:
description:
Local name for the subtype property, optionally localized.
Expand Down
Loading