diff --git a/counterexamples/divisions/division/bad-class.yml b/counterexamples/divisions/division/bad-class.yml new file mode 100644 index 000000000..d3140a8c0 --- /dev/null +++ b/counterexamples/divisions/division/bad-class.yml @@ -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'" diff --git a/examples/divisions/division/class.yaml b/examples/divisions/division/class.yaml new file mode 100644 index 000000000..cdf920092 --- /dev/null +++ b/examples/divisions/division/class.yaml @@ -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 diff --git a/schema/divisions/division.yaml b/schema/divisions/division.yaml index 25a2b18f2..db576de45 100644 --- a/schema/divisions/division.yaml +++ b/schema/divisions/division.yaml @@ -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.