From 2c6aefc704e449373b406808bda1fb09acf166ce Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Mon, 2 Dec 2024 09:57:21 -0800 Subject: [PATCH 1/5] add is_land and is_territorial properties to divisions --- examples/divisions/division_area/is_land.yaml | 306 ++++++++++++++++++ .../division_area/is_territorial.yaml | 80 +++++ .../divisions/division_boundary/is_land.yaml | 306 ++++++++++++++++++ .../division_boundary/is_territorial.yaml | 80 +++++ schema/divisions/division_area.yaml | 20 +- schema/divisions/division_boundary.yaml | 20 +- 6 files changed, 796 insertions(+), 16 deletions(-) create mode 100644 examples/divisions/division_area/is_land.yaml create mode 100644 examples/divisions/division_area/is_territorial.yaml create mode 100644 examples/divisions/division_boundary/is_land.yaml create mode 100644 examples/divisions/division_boundary/is_territorial.yaml diff --git a/examples/divisions/division_area/is_land.yaml b/examples/divisions/division_area/is_land.yaml new file mode 100644 index 000000000..639ea11cc --- /dev/null +++ b/examples/divisions/division_area/is_land.yaml @@ -0,0 +1,306 @@ +--- +id: example:division_area:is_land:country:us +type: Feature +geometry: + type: MultiPolygon + coordinates: [ + [ + [ + [-170.6290015, 25.3053671], + [-170.4076134, 25.5082632], + [-170.6300336, 25.7076006], + [-170.8506754, 25.5056948], + [-170.6290015, 25.3053671] + ] + ], + [ + [ + [-171.7380245, 25.555318], + [-171.4949943, 25.7747795], + [-171.726725, 25.9865667], + [-171.9674222, 25.7845748], + [-171.7380245, 25.555318] + ] + ], + [ + [ + [-174.0155727, 25.8411597], + [-173.7437151, 26.0119599], + [-173.905507, 26.2639004], + [-174.2280618, 26.0816774], + [-174.0155727, 25.8411597] + ] + ], + [ + [ + [-175.9506918, 27.5543172], + [-175.5545765, 27.7281369], + [-175.6295776, 28.1237431], + [-176.1866168, 27.9330153], + [-175.9506918, 27.5543172] + ] + ], + [ + [ + [-166.1182936, 23.4254685], + [-165.8702478, 23.8636297], + [-166.3767961, 24.0561939], + [-166.5303209, 23.7815879], + [-166.1182936, 23.4254685] + ] + ], + [ + [ + [-167.9975573, 24.7968943], + [-167.778217, 25.0023686], + [-168.005803, 25.20088], + [-168.2206497, 24.9967937], + [-167.9975573, 24.7968943] + ] + ], + [ + [ + [-157.4082814, 55.576068], + [-157.1024297, 55.6733491], + [-157.0908436, 55.8696588], + [-157.7232999, 55.870247], + [-157.4082814, 55.576068] + ] + ], + [ + [ + [-155.6071465, 55.55087], + [-155.2980807, 56.0385909], + [-156.1270413, 55.9006965], + [-156.0182299, 55.6525826], + [-155.6071465, 55.55087] + ] + ], + [ + [ + [-178.3063127, 28.1837783], + [-178.0577766, 28.4309636], + [-178.3589518, 28.655272], + [-178.60056, 28.4012455], + [-178.3063127, 28.1837783] + ] + ], + [ + [ + [-179.1390989, 51.0070029], + [-173.0611771, 51.8159234], + [-171.9740685, 52.3514335], + [-178.9229631, 52.0275532], + [-179.1390989, 51.0070029] + ] + ], + [ + [ + [-180, 51.7940888], + [-179.8836979, 51.9764894], + [-180, 52.138489], + [-180, 51.8434509], + [-180, 51.7940888] + ] + ], + [ + [ + [-170.3952428, 56.8431693], + [-169.6956679, 57.0307607], + [-169.5801239, 57.2365744], + [-170.6525321, 57.3494254], + [-170.3952428, 56.8431693] + ] + ], + [ + [ + [-169.5771945, 56.3323838], + [-169.1322924, 56.6737641], + [-170.1288343, 56.6777795], + [-170.0250438, 56.4580184], + [-169.5771945, 56.3323838] + ] + ], + [ + [ + [-168.0561273, 64.76067], + [-167.5930406, 65.0286657], + [-168.5591053, 65.007885], + [-168.4482776, 64.8327172], + [-168.0561273, 64.76067] + ] + ], + [ + [ + [-156.6720152, 20.3000654], + [-155.800111, 20.8826396], + [-158.455088, 21.6943824], + [-158.2462379, 21.1430868], + [-156.6720152, 20.3000654] + ] + ], + [ + [ + [-160.5398128, 21.4482644], + [-159.3028431, 21.7124132], + [-159.1241278, 22.2798801], + [-160.2161715, 22.1993854], + [-160.5398128, 21.4482644] + ] + ], + [ + [ + [-161.9236658, 22.8550496], + [-161.6972866, 23.0665997], + [-161.9360903, 23.2652845], + [-162.1455351, 23.0568827], + [-161.9236658, 22.8550496] + ] + ], + [ + [ + [-164.7000199, 23.3734366], + [-164.4760626, 23.575844], + [-164.7056774, 23.7796906], + [-164.9238496, 23.5726775], + [-164.7000199, 23.3734366] + ] + ], + [ + [ + [-155.6810194, 18.7091718], + [-154.595509, 19.5434371], + [-155.877534, 20.4681176], + [-156.2732568, 19.7049213], + [-155.6810194, 18.7091718] + ] + ], + [ + [ + [-82.8732511, 24.4116731], + [-82.5948517, 24.5902399], + [-82.7300073, 24.8395704], + [-83.153058, 24.6776636], + [-82.8732511, 24.4116731] + ] + ], + [ + [ + [-81.8773353, 24.2520071], + [-68.1545602, 47.3251568], + [-82.6797222, 41.6765556], + [-84.129, 46.5305], + [-94.9573889, 49.3701944], + [-125.0271096, 48.4630615], + [-119.6795205, 33.0665347], + [-97.40561, 25.83764], + [-84.0549877, 29.8627705], + [-81.8773353, 24.2520071] + ] + ], + [ + [ + [179.2356588, 51.1468561], + [178.6498473, 52.169477], + [176.8813625, 51.9348227], + [177.1853792, 51.6303915], + [179.2356588, 51.1468561] + ] + ], + [ + [ + [179.6302237, 51.6862391], + [180, 52.1384488], + [179.2193828, 52.1042624], + [179.2227021, 51.833522], + [179.6302237, 51.6862391] + ] + ], + [ + [ + [175.915408, 52.1325238], + [176.2623207, 52.4572425], + [175.5671255, 52.4969017], + [175.5586568, 52.2829505], + [175.915408, 52.1325238] + ] + ], + [ + [ + [173.6474085, 52.1472948], + [174.8392132, 52.6878183], + [172.1158739, 52.9881155], + [173.132385, 52.2506975], + [173.6474085, 52.1472948] + ] + ], + [ + [ + [-146.3855284, 59.1843829], + [-145.9234279, 59.3169728], + [-145.8952803, 59.5345003], + [-146.6535985, 59.6545361], + [-146.3855284, 59.1843829] + ] + ], + [ + [ + [-171.2797217, 52.2444061], + [-145.9885379, 60.1761058], + [-130.003485, 56.008075], + [-141.00198, 60.3063692], + [-140.7523256, 69.8283004], + [-156.6515529, 71.581159], + [-169.0485821, 65.4690061], + [-161.2500247, 63.8004626], + [-167.6542464, 59.9434356], + [-158.0753114, 57.7475562], + [-171.2797217, 52.2444061] + ], + [ + [-153.8125943, 58.0958144], + [-153.5773523, 58.3547948], + [-153.3559904, 58.4231127], + [-153.6200524, 58.260124], + [-153.8125943, 58.0958144] + ], + [ + [-153.1820044, 58.5355625], + [-153.1751501, 58.5480609], + [-153.1384992, 58.5678286], + [-153.1470249, 58.5552926], + [-153.1820044, 58.5355625] + ], + [ + [-152.8741566, 58.7660471], + [-152.9882543, 59.4696836], + [-152.1322999, 60.0079718], + [-152.330171, 59.1676267], + [-152.8741566, 58.7660471] + ] + ], + [ + [ + [-172.7696055, 59.9963072], + [-171.8272619, 60.3517559], + [-173.4406927, 60.7880772], + [-173.4413238, 60.4223353], + [-172.7696055, 59.9963072] + ] + ], + [ + [ + [-169.6463302, 62.736964], + [-168.2509717, 63.332816], + [-172.2753008, 63.6094455], + [-172.0058757, 63.2057208], + [-169.6463302, 62.736964] + ] + ] + ] +properties: + theme: divisions + type: division_area + subtype: country + is_land: 1 + country: US \ No newline at end of file diff --git a/examples/divisions/division_area/is_territorial.yaml b/examples/divisions/division_area/is_territorial.yaml new file mode 100644 index 000000000..32ceb7cee --- /dev/null +++ b/examples/divisions/division_area/is_territorial.yaml @@ -0,0 +1,80 @@ +--- +id: example:division_area:is_territorial:country:fi +type: Feature +geometry: + type: Polygon + coordinates: + - - [24.1149326, 65.1739343] + - [22.965913, 64.2461008] + - [22.9611467, 64.2200974] + - [20.1690736, 63.1704] + - [20.1635668, 63.1664346] + - [20.7968544, 62.025131] + - [20.8113847, 61.9869932] + - [20.7731398, 61.1334808] + - [20.7714495, 61.1269079] + - [19.2266918, 60.612911] + - [19.2134721, 60.610071] + - [19.0881715, 60.2028008] + - [19.0832, 60.1916833] + - [20.2889918, 59.4641746] + - [20.2949231, 59.4620801] + - [27.4560114, 60.223152] + - [27.4566541, 60.2232587] + - [31.5848283, 62.9070414] + - [31.5867071, 62.9087094] + - [29.9792123, 63.7533602] + - [29.9718903, 63.7571676] + - [30.5280169, 64.0488769] + - [30.5535801, 64.1016818] + - [29.6152439, 64.9174367] + - [29.6110374, 64.9273269] + - [29.7539876, 65.6093614] + - [29.7218642, 65.6370848] + - [30.1204275, 65.7484154] + - [30.1193675, 65.7521935] + - [29.0335178, 66.9246111] + - [29.0331668, 66.9255206] + - [30.0120699, 67.6649442] + - [30.0170617, 67.6735368] + - [28.7084312, 68.185236] + - [28.6461349, 68.1963023] + - [28.4446345, 68.5223038] + - [28.433932, 68.539671] + - [28.7947914, 68.8607869] + - [28.8007886, 68.8692833] + - [28.4291269, 68.9077986] + - [28.4157885, 68.9154506] + - [29.2950412, 69.4498488] + - [29.3364956, 69.4783227] + - [27.9604365, 70.089821] + - [27.9593778, 70.0921111] + - [25.9751031, 69.7083076] + - [25.9712362, 69.707112] + - [25.7752318, 69.0142604] + - [25.7746414, 69.0134805] + - [24.9050854, 68.5700172] + - [24.9031658, 68.5545918] + - [22.4047437, 68.721914] + - [22.3745217, 68.7166666] + - [21.6591391, 69.2559218] + - [21.6270859, 69.2765883] + - [20.5523258, 69.0600767] + - [20.5486365, 69.0599735] + - [23.6496681, 67.9616712] + - [23.6511967, 67.9607085] + - [23.3944185, 67.4851454] + - [23.3944231, 67.4842768] + - [23.9945079, 66.8234885] + - [23.9956629, 66.822049] + - [23.6455681, 66.3021131] + - [23.6456201, 66.3013903] + - [24.1526454, 65.8629123] + - [24.152978, 65.862572] + - [24.1149326, 65.1739343] +properties: + theme: divisions + type: division_area + subtype: country + is_territorial: 1 + country: FI diff --git a/examples/divisions/division_boundary/is_land.yaml b/examples/divisions/division_boundary/is_land.yaml new file mode 100644 index 000000000..5fe01800b --- /dev/null +++ b/examples/divisions/division_boundary/is_land.yaml @@ -0,0 +1,306 @@ +--- +id: example:division_boundary:is_land:country:us +type: Feature +geometry: + type: MultiPolygon + coordinates: [ + [ + [ + [-170.6290015, 25.3053671], + [-170.4076134, 25.5082632], + [-170.6300336, 25.7076006], + [-170.8506754, 25.5056948], + [-170.6290015, 25.3053671] + ] + ], + [ + [ + [-171.7380245, 25.555318], + [-171.4949943, 25.7747795], + [-171.726725, 25.9865667], + [-171.9674222, 25.7845748], + [-171.7380245, 25.555318] + ] + ], + [ + [ + [-174.0155727, 25.8411597], + [-173.7437151, 26.0119599], + [-173.905507, 26.2639004], + [-174.2280618, 26.0816774], + [-174.0155727, 25.8411597] + ] + ], + [ + [ + [-175.9506918, 27.5543172], + [-175.5545765, 27.7281369], + [-175.6295776, 28.1237431], + [-176.1866168, 27.9330153], + [-175.9506918, 27.5543172] + ] + ], + [ + [ + [-166.1182936, 23.4254685], + [-165.8702478, 23.8636297], + [-166.3767961, 24.0561939], + [-166.5303209, 23.7815879], + [-166.1182936, 23.4254685] + ] + ], + [ + [ + [-167.9975573, 24.7968943], + [-167.778217, 25.0023686], + [-168.005803, 25.20088], + [-168.2206497, 24.9967937], + [-167.9975573, 24.7968943] + ] + ], + [ + [ + [-157.4082814, 55.576068], + [-157.1024297, 55.6733491], + [-157.0908436, 55.8696588], + [-157.7232999, 55.870247], + [-157.4082814, 55.576068] + ] + ], + [ + [ + [-155.6071465, 55.55087], + [-155.2980807, 56.0385909], + [-156.1270413, 55.9006965], + [-156.0182299, 55.6525826], + [-155.6071465, 55.55087] + ] + ], + [ + [ + [-178.3063127, 28.1837783], + [-178.0577766, 28.4309636], + [-178.3589518, 28.655272], + [-178.60056, 28.4012455], + [-178.3063127, 28.1837783] + ] + ], + [ + [ + [-179.1390989, 51.0070029], + [-173.0611771, 51.8159234], + [-171.9740685, 52.3514335], + [-178.9229631, 52.0275532], + [-179.1390989, 51.0070029] + ] + ], + [ + [ + [-180, 51.7940888], + [-179.8836979, 51.9764894], + [-180, 52.138489], + [-180, 51.8434509], + [-180, 51.7940888] + ] + ], + [ + [ + [-170.3952428, 56.8431693], + [-169.6956679, 57.0307607], + [-169.5801239, 57.2365744], + [-170.6525321, 57.3494254], + [-170.3952428, 56.8431693] + ] + ], + [ + [ + [-169.5771945, 56.3323838], + [-169.1322924, 56.6737641], + [-170.1288343, 56.6777795], + [-170.0250438, 56.4580184], + [-169.5771945, 56.3323838] + ] + ], + [ + [ + [-168.0561273, 64.76067], + [-167.5930406, 65.0286657], + [-168.5591053, 65.007885], + [-168.4482776, 64.8327172], + [-168.0561273, 64.76067] + ] + ], + [ + [ + [-156.6720152, 20.3000654], + [-155.800111, 20.8826396], + [-158.455088, 21.6943824], + [-158.2462379, 21.1430868], + [-156.6720152, 20.3000654] + ] + ], + [ + [ + [-160.5398128, 21.4482644], + [-159.3028431, 21.7124132], + [-159.1241278, 22.2798801], + [-160.2161715, 22.1993854], + [-160.5398128, 21.4482644] + ] + ], + [ + [ + [-161.9236658, 22.8550496], + [-161.6972866, 23.0665997], + [-161.9360903, 23.2652845], + [-162.1455351, 23.0568827], + [-161.9236658, 22.8550496] + ] + ], + [ + [ + [-164.7000199, 23.3734366], + [-164.4760626, 23.575844], + [-164.7056774, 23.7796906], + [-164.9238496, 23.5726775], + [-164.7000199, 23.3734366] + ] + ], + [ + [ + [-155.6810194, 18.7091718], + [-154.595509, 19.5434371], + [-155.877534, 20.4681176], + [-156.2732568, 19.7049213], + [-155.6810194, 18.7091718] + ] + ], + [ + [ + [-82.8732511, 24.4116731], + [-82.5948517, 24.5902399], + [-82.7300073, 24.8395704], + [-83.153058, 24.6776636], + [-82.8732511, 24.4116731] + ] + ], + [ + [ + [-81.8773353, 24.2520071], + [-68.1545602, 47.3251568], + [-82.6797222, 41.6765556], + [-84.129, 46.5305], + [-94.9573889, 49.3701944], + [-125.0271096, 48.4630615], + [-119.6795205, 33.0665347], + [-97.40561, 25.83764], + [-84.0549877, 29.8627705], + [-81.8773353, 24.2520071] + ] + ], + [ + [ + [179.2356588, 51.1468561], + [178.6498473, 52.169477], + [176.8813625, 51.9348227], + [177.1853792, 51.6303915], + [179.2356588, 51.1468561] + ] + ], + [ + [ + [179.6302237, 51.6862391], + [180, 52.1384488], + [179.2193828, 52.1042624], + [179.2227021, 51.833522], + [179.6302237, 51.6862391] + ] + ], + [ + [ + [175.915408, 52.1325238], + [176.2623207, 52.4572425], + [175.5671255, 52.4969017], + [175.5586568, 52.2829505], + [175.915408, 52.1325238] + ] + ], + [ + [ + [173.6474085, 52.1472948], + [174.8392132, 52.6878183], + [172.1158739, 52.9881155], + [173.132385, 52.2506975], + [173.6474085, 52.1472948] + ] + ], + [ + [ + [-146.3855284, 59.1843829], + [-145.9234279, 59.3169728], + [-145.8952803, 59.5345003], + [-146.6535985, 59.6545361], + [-146.3855284, 59.1843829] + ] + ], + [ + [ + [-171.2797217, 52.2444061], + [-145.9885379, 60.1761058], + [-130.003485, 56.008075], + [-141.00198, 60.3063692], + [-140.7523256, 69.8283004], + [-156.6515529, 71.581159], + [-169.0485821, 65.4690061], + [-161.2500247, 63.8004626], + [-167.6542464, 59.9434356], + [-158.0753114, 57.7475562], + [-171.2797217, 52.2444061] + ], + [ + [-153.8125943, 58.0958144], + [-153.5773523, 58.3547948], + [-153.3559904, 58.4231127], + [-153.6200524, 58.260124], + [-153.8125943, 58.0958144] + ], + [ + [-153.1820044, 58.5355625], + [-153.1751501, 58.5480609], + [-153.1384992, 58.5678286], + [-153.1470249, 58.5552926], + [-153.1820044, 58.5355625] + ], + [ + [-152.8741566, 58.7660471], + [-152.9882543, 59.4696836], + [-152.1322999, 60.0079718], + [-152.330171, 59.1676267], + [-152.8741566, 58.7660471] + ] + ], + [ + [ + [-172.7696055, 59.9963072], + [-171.8272619, 60.3517559], + [-173.4406927, 60.7880772], + [-173.4413238, 60.4223353], + [-172.7696055, 59.9963072] + ] + ], + [ + [ + [-169.6463302, 62.736964], + [-168.2509717, 63.332816], + [-172.2753008, 63.6094455], + [-172.0058757, 63.2057208], + [-169.6463302, 62.736964] + ] + ] + ] +properties: + theme: divisions + type: division_boundary + subtype: country + is_land: 1 + country: US \ No newline at end of file diff --git a/examples/divisions/division_boundary/is_territorial.yaml b/examples/divisions/division_boundary/is_territorial.yaml new file mode 100644 index 000000000..8663497fa --- /dev/null +++ b/examples/divisions/division_boundary/is_territorial.yaml @@ -0,0 +1,80 @@ +--- +id: example:division_boundary:is_territorial:country:fi +type: Feature +geometry: + type: Polygon + coordinates: + - - [24.1149326, 65.1739343] + - [22.965913, 64.2461008] + - [22.9611467, 64.2200974] + - [20.1690736, 63.1704] + - [20.1635668, 63.1664346] + - [20.7968544, 62.025131] + - [20.8113847, 61.9869932] + - [20.7731398, 61.1334808] + - [20.7714495, 61.1269079] + - [19.2266918, 60.612911] + - [19.2134721, 60.610071] + - [19.0881715, 60.2028008] + - [19.0832, 60.1916833] + - [20.2889918, 59.4641746] + - [20.2949231, 59.4620801] + - [27.4560114, 60.223152] + - [27.4566541, 60.2232587] + - [31.5848283, 62.9070414] + - [31.5867071, 62.9087094] + - [29.9792123, 63.7533602] + - [29.9718903, 63.7571676] + - [30.5280169, 64.0488769] + - [30.5535801, 64.1016818] + - [29.6152439, 64.9174367] + - [29.6110374, 64.9273269] + - [29.7539876, 65.6093614] + - [29.7218642, 65.6370848] + - [30.1204275, 65.7484154] + - [30.1193675, 65.7521935] + - [29.0335178, 66.9246111] + - [29.0331668, 66.9255206] + - [30.0120699, 67.6649442] + - [30.0170617, 67.6735368] + - [28.7084312, 68.185236] + - [28.6461349, 68.1963023] + - [28.4446345, 68.5223038] + - [28.433932, 68.539671] + - [28.7947914, 68.8607869] + - [28.8007886, 68.8692833] + - [28.4291269, 68.9077986] + - [28.4157885, 68.9154506] + - [29.2950412, 69.4498488] + - [29.3364956, 69.4783227] + - [27.9604365, 70.089821] + - [27.9593778, 70.0921111] + - [25.9751031, 69.7083076] + - [25.9712362, 69.707112] + - [25.7752318, 69.0142604] + - [25.7746414, 69.0134805] + - [24.9050854, 68.5700172] + - [24.9031658, 68.5545918] + - [22.4047437, 68.721914] + - [22.3745217, 68.7166666] + - [21.6591391, 69.2559218] + - [21.6270859, 69.2765883] + - [20.5523258, 69.0600767] + - [20.5486365, 69.0599735] + - [23.6496681, 67.9616712] + - [23.6511967, 67.9607085] + - [23.3944185, 67.4851454] + - [23.3944231, 67.4842768] + - [23.9945079, 66.8234885] + - [23.9956629, 66.822049] + - [23.6455681, 66.3021131] + - [23.6456201, 66.3013903] + - [24.1526454, 65.8629123] + - [24.152978, 65.862572] + - [24.1149326, 65.1739343] +properties: + theme: divisions + type: division_boundary + subtype: country + is_territorial: 1 + country: FI diff --git a/schema/divisions/division_area.yaml b/schema/divisions/division_area.yaml index 76a18409b..b599a4b80 100644 --- a/schema/divisions/division_area.yaml +++ b/schema/divisions/division_area.yaml @@ -28,14 +28,18 @@ properties: # JSON Schema: Top-level object properties. - "$ref": ../defs.yaml#/$defs/propertyContainers/namesContainer properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } - class: - type: string - enum: - - land # The area does not extend beyond the coastline. - - - maritime # The area extends beyond the coastline, in most - # cases to the extent of the division's - # territorial sea, if it has one. + is_land: + description: + A boolean to indicate whether or not the feature geometry represents the + land-clipped, non-maritime boundary. The geometry can be used for map + rendering, cartographic display, and similar purposes. + type: boolean + is_territorial: + description: + A boolean to indicate whether or not the feature geometry represents the + full territorial boundary or claim of a feature. The geometry can be + used for data processing, reverse-geocoding, and similar purposes. + type: boolean division_id: description: Division ID of the division this area belongs to. diff --git a/schema/divisions/division_boundary.yaml b/schema/divisions/division_boundary.yaml index 3b12aa4d8..fae585060 100644 --- a/schema/divisions/division_boundary.yaml +++ b/schema/divisions/division_boundary.yaml @@ -22,14 +22,18 @@ properties: # JSON Schema: Top-level object properties. - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } - class: - type: string - enum: - - land # None of the boundary geometry extends beyond the - # coastline of either associated division. - - - maritime # All the boundary geometry extends beyond the - # coastline of both associated divisions. + is_land: + description: + A boolean to indicate whether or not the feature geometry represents the + land-clipped, non-maritime boundary. The geometry can be used for map + rendering, cartographic display, and similar purposes. + type: boolean + is_territorial: + description: + A boolean to indicate whether or not the feature geometry represents the + full territorial boundary or claim of a feature. The geometry can be + used for data processing, reverse-geocoding, and similar purposes. + type: boolean division_ids: description: Identifies the two divisions to the left and right, respectively, of From d7fb2332c38f7408b37772dbba1b142d1066470b Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Wed, 4 Dec 2024 18:02:31 -0800 Subject: [PATCH 2/5] fix indentation, descriptions, add req fields and anyOf requirements --- schema/divisions/division_area.yaml | 28 +++++++++++++++++++------ schema/divisions/division_boundary.yaml | 28 +++++++++++++++++++------ 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/schema/divisions/division_area.yaml b/schema/divisions/division_area.yaml index b599a4b80..b13863135 100644 --- a/schema/divisions/division_area.yaml +++ b/schema/divisions/division_area.yaml @@ -22,24 +22,40 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiPolygon.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [names, subtype, class, country, division_id] + required: [names, subtype, class, country, division_id, is_land, is_territorial] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer - "$ref": ../defs.yaml#/$defs/propertyContainers/namesContainer + anyOf: + - properties: + is_land: + const: true + is_territorial: + const: true properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } + class: + type: string + enum: + - land # The area does not extend beyond the coastline. + + - maritime # The area extends beyond the coastline, in most + # cases to the extent of the division's + # territorial sea, if it has one. is_land: description: A boolean to indicate whether or not the feature geometry represents the land-clipped, non-maritime boundary. The geometry can be used for map rendering, cartographic display, and similar purposes. - type: boolean + type: boolean is_territorial: description: - A boolean to indicate whether or not the feature geometry represents the - full territorial boundary or claim of a feature. The geometry can be - used for data processing, reverse-geocoding, and similar purposes. - type: boolean + A boolean to indicate whether or not the feature geometry represents + Overture's best approximation of this place's maritime boundary. For + coastal places, this would tend to include the water area. The + geometry can be used for data processing, reverse-geocoding, and + similar purposes. + type: boolean division_id: description: Division ID of the division this area belongs to. diff --git a/schema/divisions/division_boundary.yaml b/schema/divisions/division_boundary.yaml index fae585060..d4a0f1791 100644 --- a/schema/divisions/division_boundary.yaml +++ b/schema/divisions/division_boundary.yaml @@ -17,23 +17,39 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiLineString.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [subtype, class, division_ids] + required: [subtype, class, division_ids, is_land, is_territorial] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer + anyOf: + - properties: + is_land: + const: true + is_territorial: + const: true properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } + class: + type: string + enum: + - land # None of the boundary geometry extends beyond the + # coastline of either associated division. + + - maritime # All the boundary geometry extends beyond the + # coastline of both associated divisions. is_land: description: A boolean to indicate whether or not the feature geometry represents the land-clipped, non-maritime boundary. The geometry can be used for map rendering, cartographic display, and similar purposes. - type: boolean + type: boolean is_territorial: description: - A boolean to indicate whether or not the feature geometry represents the - full territorial boundary or claim of a feature. The geometry can be - used for data processing, reverse-geocoding, and similar purposes. - type: boolean + A boolean to indicate whether or not the feature geometry represents + Overture's best approximation of this place's maritime boundary. For + coastal places, this would tend to include the water area. The + geometry can be used for data processing, reverse-geocoding, and + similar purposes. + type: boolean division_ids: description: Identifies the two divisions to the left and right, respectively, of From f4e235612e728755aff2b0a2412d82c4c99e2645 Mon Sep 17 00:00:00 2001 From: Stephen Epps Date: Wed, 4 Dec 2024 22:59:48 -0800 Subject: [PATCH 3/5] add counterexamples, format schema descriptions --- .../divisions/division_area/bad-is-land.yaml | 16 ++++++++++++++++ .../division_area/bad-is-territorial.yaml | 16 ++++++++++++++++ .../divisions/division_boundary/bad-is-land.yaml | 16 ++++++++++++++++ .../division_boundary/bad-is-territorial.yaml | 16 ++++++++++++++++ schema/divisions/division_area.yaml | 5 ++--- schema/divisions/division_boundary.yaml | 5 ++--- 6 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 counterexamples/divisions/division_area/bad-is-land.yaml create mode 100644 counterexamples/divisions/division_area/bad-is-territorial.yaml create mode 100644 counterexamples/divisions/division_boundary/bad-is-land.yaml create mode 100644 counterexamples/divisions/division_boundary/bad-is-territorial.yaml diff --git a/counterexamples/divisions/division_area/bad-is-land.yaml b/counterexamples/divisions/division_area/bad-is-land.yaml new file mode 100644 index 000000000..caa48a1df --- /dev/null +++ b/counterexamples/divisions/division_area/bad-is-land.yaml @@ -0,0 +1,16 @@ +--- +id: counterexample:division_area:bad-is-land +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_area + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_land: yes + country: ZZ + ext_expected_errors: + - "value must be one of 'true', 'false'" diff --git a/counterexamples/divisions/division_area/bad-is-territorial.yaml b/counterexamples/divisions/division_area/bad-is-territorial.yaml new file mode 100644 index 000000000..73d08be17 --- /dev/null +++ b/counterexamples/divisions/division_area/bad-is-territorial.yaml @@ -0,0 +1,16 @@ +--- +id: counterexample:division_area:bad-is-territorial +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_area + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_territorial: no + country: ZZ + ext_expected_errors: + - "value must be one of 'true', 'false'" diff --git a/counterexamples/divisions/division_boundary/bad-is-land.yaml b/counterexamples/divisions/division_boundary/bad-is-land.yaml new file mode 100644 index 000000000..6b5839731 --- /dev/null +++ b/counterexamples/divisions/division_boundary/bad-is-land.yaml @@ -0,0 +1,16 @@ +--- +id: counterexample:division_boundary:bad-is-land +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_boundary + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_land: yes + country: ZZ + ext_expected_errors: + - "value must be one of 'true', 'false'" diff --git a/counterexamples/divisions/division_boundary/bad-is-territorial.yaml b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml new file mode 100644 index 000000000..e143b1702 --- /dev/null +++ b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml @@ -0,0 +1,16 @@ +--- +id: counterexample:division_boundary:bad-is-territorial +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_boundary + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_territorial: no + country: ZZ + ext_expected_errors: + - "value must be one of 'true', 'false'" diff --git a/schema/divisions/division_area.yaml b/schema/divisions/division_area.yaml index b13863135..02262cb98 100644 --- a/schema/divisions/division_area.yaml +++ b/schema/divisions/division_area.yaml @@ -52,9 +52,8 @@ properties: # JSON Schema: Top-level object properties. description: A boolean to indicate whether or not the feature geometry represents Overture's best approximation of this place's maritime boundary. For - coastal places, this would tend to include the water area. The - geometry can be used for data processing, reverse-geocoding, and - similar purposes. + coastal places, this would tend to include the water area. The geometry + can be used for data processing, reverse-geocoding, and similar purposes. type: boolean division_id: description: diff --git a/schema/divisions/division_boundary.yaml b/schema/divisions/division_boundary.yaml index d4a0f1791..703c2dc3f 100644 --- a/schema/divisions/division_boundary.yaml +++ b/schema/divisions/division_boundary.yaml @@ -46,9 +46,8 @@ properties: # JSON Schema: Top-level object properties. description: A boolean to indicate whether or not the feature geometry represents Overture's best approximation of this place's maritime boundary. For - coastal places, this would tend to include the water area. The - geometry can be used for data processing, reverse-geocoding, and - similar purposes. + coastal places, this would tend to include the water area. The geometry + can be used for data processing, reverse-geocoding, and similar purposes. type: boolean division_ids: description: From 034d174576af2711fd8f095ca932c12d0b41db91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Karla=C5=A1?= Date: Thu, 5 Dec 2024 18:23:31 +0100 Subject: [PATCH 4/5] Few fixes to make schema validation pass --- .../divisions/division_area/bad-is-land.yaml | 2 +- .../division_area/bad-is-territorial.yaml | 2 +- .../division_boundary/bad-is-land.yaml | 5 +- .../division_boundary/bad-is-territorial.yaml | 5 +- .../division_boundary/bad-not-both.yaml | 17 + .../divisions/division_area/country_land.yaml | 1 + .../division_area/country_maritime.yaml | 1 + examples/divisions/division_area/is_land.yaml | 9 +- .../division_area/is_territorial.yaml | 7 +- .../divisions/division_area/region_land.yaml | 1 + .../divisions/division_boundary/disputed.yaml | 1 + .../division_boundary/disputed_both.yaml | 1 + .../divisions/division_boundary/is_land.yaml | 304 +----------------- .../division_boundary/is_territorial.yaml | 79 +---- .../division_boundary/land_region.yaml | 1 + .../division_boundary/maritime_country.yaml | 2 + schema/divisions/division_area.yaml | 13 +- schema/divisions/division_boundary.yaml | 15 +- 18 files changed, 76 insertions(+), 390 deletions(-) create mode 100644 counterexamples/divisions/division_boundary/bad-not-both.yaml diff --git a/counterexamples/divisions/division_area/bad-is-land.yaml b/counterexamples/divisions/division_area/bad-is-land.yaml index caa48a1df..d83b8b2f1 100644 --- a/counterexamples/divisions/division_area/bad-is-land.yaml +++ b/counterexamples/divisions/division_area/bad-is-land.yaml @@ -13,4 +13,4 @@ properties: is_land: yes country: ZZ ext_expected_errors: - - "value must be one of 'true', 'false'" + - "is_land/type]: got string, want boolean" diff --git a/counterexamples/divisions/division_area/bad-is-territorial.yaml b/counterexamples/divisions/division_area/bad-is-territorial.yaml index 73d08be17..3030b9f6d 100644 --- a/counterexamples/divisions/division_area/bad-is-territorial.yaml +++ b/counterexamples/divisions/division_area/bad-is-territorial.yaml @@ -13,4 +13,4 @@ properties: is_territorial: no country: ZZ ext_expected_errors: - - "value must be one of 'true', 'false'" + - "is_territorial/const]: value must be true" diff --git a/counterexamples/divisions/division_boundary/bad-is-land.yaml b/counterexamples/divisions/division_boundary/bad-is-land.yaml index 6b5839731..91e25150c 100644 --- a/counterexamples/divisions/division_boundary/bad-is-land.yaml +++ b/counterexamples/divisions/division_boundary/bad-is-land.yaml @@ -9,8 +9,9 @@ properties: type: division_boundary version: 0 subtype: country - division_id: counterexample:division_boundary:some-division + division_ids: ["example:division:country:left", "example:division:country:right"] is_land: yes + class: land country: ZZ ext_expected_errors: - - "value must be one of 'true', 'false'" + - "is_land/const]: value must be true" diff --git a/counterexamples/divisions/division_boundary/bad-is-territorial.yaml b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml index e143b1702..891c73b6c 100644 --- a/counterexamples/divisions/division_boundary/bad-is-territorial.yaml +++ b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml @@ -9,8 +9,9 @@ properties: type: division_boundary version: 0 subtype: country - division_id: counterexample:division_boundary:some-division + division_ids: ["example:division:country:left", "example:division:country:right"] + class: land is_territorial: no country: ZZ ext_expected_errors: - - "value must be one of 'true', 'false'" + - "is_territorial/const]: value must be true" diff --git a/counterexamples/divisions/division_boundary/bad-not-both.yaml b/counterexamples/divisions/division_boundary/bad-not-both.yaml new file mode 100644 index 000000000..bee287fe9 --- /dev/null +++ b/counterexamples/divisions/division_boundary/bad-not-both.yaml @@ -0,0 +1,17 @@ +--- +id: example:division_boundary:is_land:country:us +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_boundary + version: 1 + subtype: country + is_land: true + is_territorial: true + class: land + division_ids: ["example:division:country:left", "example:division:country:right"] + ext_expected_errors: + - "division_boundary.yaml#/properties/properties/oneOf]: oneOf failed, subschemas 0, 1 matched" \ No newline at end of file diff --git a/examples/divisions/division_area/country_land.yaml b/examples/divisions/division_area/country_land.yaml index 07fa30abb..20fa2fc25 100644 --- a/examples/divisions/division_area/country_land.yaml +++ b/examples/divisions/division_area/country_land.yaml @@ -304,6 +304,7 @@ properties: version: 0 subtype: country class: land + is_land: true division_id: example:division:country:us names: primary: United States diff --git a/examples/divisions/division_area/country_maritime.yaml b/examples/divisions/division_area/country_maritime.yaml index e95ef17b8..8959ba8c5 100644 --- a/examples/divisions/division_area/country_maritime.yaml +++ b/examples/divisions/division_area/country_maritime.yaml @@ -78,6 +78,7 @@ properties: version: 0 subtype: country class: maritime + is_territorial: true division_id: example:division:country:fi names: primary: Suomi diff --git a/examples/divisions/division_area/is_land.yaml b/examples/divisions/division_area/is_land.yaml index 639ea11cc..d77daf4f5 100644 --- a/examples/divisions/division_area/is_land.yaml +++ b/examples/divisions/division_area/is_land.yaml @@ -302,5 +302,10 @@ properties: theme: divisions type: division_area subtype: country - is_land: 1 - country: US \ No newline at end of file + is_land: true + country: US + version: 0 + class: land + division_id: example:division:country:us + names: + primary: United States \ No newline at end of file diff --git a/examples/divisions/division_area/is_territorial.yaml b/examples/divisions/division_area/is_territorial.yaml index 32ceb7cee..79a492ced 100644 --- a/examples/divisions/division_area/is_territorial.yaml +++ b/examples/divisions/division_area/is_territorial.yaml @@ -76,5 +76,10 @@ properties: theme: divisions type: division_area subtype: country - is_territorial: 1 + is_territorial: true country: FI + version: 0 + class: land + division_id: example:division:country:fi + names: + primary: Finland diff --git a/examples/divisions/division_area/region_land.yaml b/examples/divisions/division_area/region_land.yaml index 0e5e20025..4d73c6e3e 100644 --- a/examples/divisions/division_area/region_land.yaml +++ b/examples/divisions/division_area/region_land.yaml @@ -73,6 +73,7 @@ properties: version: 0 subtype: region class: land + is_land: true division_id: example:division:country:it names: primary: Umbria diff --git a/examples/divisions/division_boundary/disputed.yaml b/examples/divisions/division_boundary/disputed.yaml index 5a406a152..413ef4565 100644 --- a/examples/divisions/division_boundary/disputed.yaml +++ b/examples/divisions/division_boundary/disputed.yaml @@ -10,6 +10,7 @@ properties: version: 1 subtype: country class: land + is_land: true division_ids: ["example:division:country:left", "example:division:country:right"] is_disputed: true perspectives: diff --git a/examples/divisions/division_boundary/disputed_both.yaml b/examples/divisions/division_boundary/disputed_both.yaml index 781fc23aa..680898328 100644 --- a/examples/divisions/division_boundary/disputed_both.yaml +++ b/examples/divisions/division_boundary/disputed_both.yaml @@ -10,6 +10,7 @@ properties: version: 1 subtype: country class: land + is_land: true division_ids: ["example:division:country:left", "example:division:country:right"] is_disputed: true perspectives: diff --git a/examples/divisions/division_boundary/is_land.yaml b/examples/divisions/division_boundary/is_land.yaml index 5fe01800b..38ad04c11 100644 --- a/examples/divisions/division_boundary/is_land.yaml +++ b/examples/divisions/division_boundary/is_land.yaml @@ -2,305 +2,13 @@ id: example:division_boundary:is_land:country:us type: Feature geometry: - type: MultiPolygon - coordinates: [ - [ - [ - [-170.6290015, 25.3053671], - [-170.4076134, 25.5082632], - [-170.6300336, 25.7076006], - [-170.8506754, 25.5056948], - [-170.6290015, 25.3053671] - ] - ], - [ - [ - [-171.7380245, 25.555318], - [-171.4949943, 25.7747795], - [-171.726725, 25.9865667], - [-171.9674222, 25.7845748], - [-171.7380245, 25.555318] - ] - ], - [ - [ - [-174.0155727, 25.8411597], - [-173.7437151, 26.0119599], - [-173.905507, 26.2639004], - [-174.2280618, 26.0816774], - [-174.0155727, 25.8411597] - ] - ], - [ - [ - [-175.9506918, 27.5543172], - [-175.5545765, 27.7281369], - [-175.6295776, 28.1237431], - [-176.1866168, 27.9330153], - [-175.9506918, 27.5543172] - ] - ], - [ - [ - [-166.1182936, 23.4254685], - [-165.8702478, 23.8636297], - [-166.3767961, 24.0561939], - [-166.5303209, 23.7815879], - [-166.1182936, 23.4254685] - ] - ], - [ - [ - [-167.9975573, 24.7968943], - [-167.778217, 25.0023686], - [-168.005803, 25.20088], - [-168.2206497, 24.9967937], - [-167.9975573, 24.7968943] - ] - ], - [ - [ - [-157.4082814, 55.576068], - [-157.1024297, 55.6733491], - [-157.0908436, 55.8696588], - [-157.7232999, 55.870247], - [-157.4082814, 55.576068] - ] - ], - [ - [ - [-155.6071465, 55.55087], - [-155.2980807, 56.0385909], - [-156.1270413, 55.9006965], - [-156.0182299, 55.6525826], - [-155.6071465, 55.55087] - ] - ], - [ - [ - [-178.3063127, 28.1837783], - [-178.0577766, 28.4309636], - [-178.3589518, 28.655272], - [-178.60056, 28.4012455], - [-178.3063127, 28.1837783] - ] - ], - [ - [ - [-179.1390989, 51.0070029], - [-173.0611771, 51.8159234], - [-171.9740685, 52.3514335], - [-178.9229631, 52.0275532], - [-179.1390989, 51.0070029] - ] - ], - [ - [ - [-180, 51.7940888], - [-179.8836979, 51.9764894], - [-180, 52.138489], - [-180, 51.8434509], - [-180, 51.7940888] - ] - ], - [ - [ - [-170.3952428, 56.8431693], - [-169.6956679, 57.0307607], - [-169.5801239, 57.2365744], - [-170.6525321, 57.3494254], - [-170.3952428, 56.8431693] - ] - ], - [ - [ - [-169.5771945, 56.3323838], - [-169.1322924, 56.6737641], - [-170.1288343, 56.6777795], - [-170.0250438, 56.4580184], - [-169.5771945, 56.3323838] - ] - ], - [ - [ - [-168.0561273, 64.76067], - [-167.5930406, 65.0286657], - [-168.5591053, 65.007885], - [-168.4482776, 64.8327172], - [-168.0561273, 64.76067] - ] - ], - [ - [ - [-156.6720152, 20.3000654], - [-155.800111, 20.8826396], - [-158.455088, 21.6943824], - [-158.2462379, 21.1430868], - [-156.6720152, 20.3000654] - ] - ], - [ - [ - [-160.5398128, 21.4482644], - [-159.3028431, 21.7124132], - [-159.1241278, 22.2798801], - [-160.2161715, 22.1993854], - [-160.5398128, 21.4482644] - ] - ], - [ - [ - [-161.9236658, 22.8550496], - [-161.6972866, 23.0665997], - [-161.9360903, 23.2652845], - [-162.1455351, 23.0568827], - [-161.9236658, 22.8550496] - ] - ], - [ - [ - [-164.7000199, 23.3734366], - [-164.4760626, 23.575844], - [-164.7056774, 23.7796906], - [-164.9238496, 23.5726775], - [-164.7000199, 23.3734366] - ] - ], - [ - [ - [-155.6810194, 18.7091718], - [-154.595509, 19.5434371], - [-155.877534, 20.4681176], - [-156.2732568, 19.7049213], - [-155.6810194, 18.7091718] - ] - ], - [ - [ - [-82.8732511, 24.4116731], - [-82.5948517, 24.5902399], - [-82.7300073, 24.8395704], - [-83.153058, 24.6776636], - [-82.8732511, 24.4116731] - ] - ], - [ - [ - [-81.8773353, 24.2520071], - [-68.1545602, 47.3251568], - [-82.6797222, 41.6765556], - [-84.129, 46.5305], - [-94.9573889, 49.3701944], - [-125.0271096, 48.4630615], - [-119.6795205, 33.0665347], - [-97.40561, 25.83764], - [-84.0549877, 29.8627705], - [-81.8773353, 24.2520071] - ] - ], - [ - [ - [179.2356588, 51.1468561], - [178.6498473, 52.169477], - [176.8813625, 51.9348227], - [177.1853792, 51.6303915], - [179.2356588, 51.1468561] - ] - ], - [ - [ - [179.6302237, 51.6862391], - [180, 52.1384488], - [179.2193828, 52.1042624], - [179.2227021, 51.833522], - [179.6302237, 51.6862391] - ] - ], - [ - [ - [175.915408, 52.1325238], - [176.2623207, 52.4572425], - [175.5671255, 52.4969017], - [175.5586568, 52.2829505], - [175.915408, 52.1325238] - ] - ], - [ - [ - [173.6474085, 52.1472948], - [174.8392132, 52.6878183], - [172.1158739, 52.9881155], - [173.132385, 52.2506975], - [173.6474085, 52.1472948] - ] - ], - [ - [ - [-146.3855284, 59.1843829], - [-145.9234279, 59.3169728], - [-145.8952803, 59.5345003], - [-146.6535985, 59.6545361], - [-146.3855284, 59.1843829] - ] - ], - [ - [ - [-171.2797217, 52.2444061], - [-145.9885379, 60.1761058], - [-130.003485, 56.008075], - [-141.00198, 60.3063692], - [-140.7523256, 69.8283004], - [-156.6515529, 71.581159], - [-169.0485821, 65.4690061], - [-161.2500247, 63.8004626], - [-167.6542464, 59.9434356], - [-158.0753114, 57.7475562], - [-171.2797217, 52.2444061] - ], - [ - [-153.8125943, 58.0958144], - [-153.5773523, 58.3547948], - [-153.3559904, 58.4231127], - [-153.6200524, 58.260124], - [-153.8125943, 58.0958144] - ], - [ - [-153.1820044, 58.5355625], - [-153.1751501, 58.5480609], - [-153.1384992, 58.5678286], - [-153.1470249, 58.5552926], - [-153.1820044, 58.5355625] - ], - [ - [-152.8741566, 58.7660471], - [-152.9882543, 59.4696836], - [-152.1322999, 60.0079718], - [-152.330171, 59.1676267], - [-152.8741566, 58.7660471] - ] - ], - [ - [ - [-172.7696055, 59.9963072], - [-171.8272619, 60.3517559], - [-173.4406927, 60.7880772], - [-173.4413238, 60.4223353], - [-172.7696055, 59.9963072] - ] - ], - [ - [ - [-169.6463302, 62.736964], - [-168.2509717, 63.332816], - [-172.2753008, 63.6094455], - [-172.0058757, 63.2057208], - [-169.6463302, 62.736964] - ] - ] - ] + type: LineString + coordinates: [[0, 1], [1, 2]] properties: theme: divisions type: division_boundary + version: 1 subtype: country - is_land: 1 - country: US \ No newline at end of file + is_land: true + class: land + division_ids: ["example:division:country:left", "example:division:country:right"] \ No newline at end of file diff --git a/examples/divisions/division_boundary/is_territorial.yaml b/examples/divisions/division_boundary/is_territorial.yaml index 8663497fa..fde0456ac 100644 --- a/examples/divisions/division_boundary/is_territorial.yaml +++ b/examples/divisions/division_boundary/is_territorial.yaml @@ -1,80 +1,15 @@ --- id: example:division_boundary:is_territorial:country:fi + type: Feature geometry: - type: Polygon - coordinates: - - - [24.1149326, 65.1739343] - - [22.965913, 64.2461008] - - [22.9611467, 64.2200974] - - [20.1690736, 63.1704] - - [20.1635668, 63.1664346] - - [20.7968544, 62.025131] - - [20.8113847, 61.9869932] - - [20.7731398, 61.1334808] - - [20.7714495, 61.1269079] - - [19.2266918, 60.612911] - - [19.2134721, 60.610071] - - [19.0881715, 60.2028008] - - [19.0832, 60.1916833] - - [20.2889918, 59.4641746] - - [20.2949231, 59.4620801] - - [27.4560114, 60.223152] - - [27.4566541, 60.2232587] - - [31.5848283, 62.9070414] - - [31.5867071, 62.9087094] - - [29.9792123, 63.7533602] - - [29.9718903, 63.7571676] - - [30.5280169, 64.0488769] - - [30.5535801, 64.1016818] - - [29.6152439, 64.9174367] - - [29.6110374, 64.9273269] - - [29.7539876, 65.6093614] - - [29.7218642, 65.6370848] - - [30.1204275, 65.7484154] - - [30.1193675, 65.7521935] - - [29.0335178, 66.9246111] - - [29.0331668, 66.9255206] - - [30.0120699, 67.6649442] - - [30.0170617, 67.6735368] - - [28.7084312, 68.185236] - - [28.6461349, 68.1963023] - - [28.4446345, 68.5223038] - - [28.433932, 68.539671] - - [28.7947914, 68.8607869] - - [28.8007886, 68.8692833] - - [28.4291269, 68.9077986] - - [28.4157885, 68.9154506] - - [29.2950412, 69.4498488] - - [29.3364956, 69.4783227] - - [27.9604365, 70.089821] - - [27.9593778, 70.0921111] - - [25.9751031, 69.7083076] - - [25.9712362, 69.707112] - - [25.7752318, 69.0142604] - - [25.7746414, 69.0134805] - - [24.9050854, 68.5700172] - - [24.9031658, 68.5545918] - - [22.4047437, 68.721914] - - [22.3745217, 68.7166666] - - [21.6591391, 69.2559218] - - [21.6270859, 69.2765883] - - [20.5523258, 69.0600767] - - [20.5486365, 69.0599735] - - [23.6496681, 67.9616712] - - [23.6511967, 67.9607085] - - [23.3944185, 67.4851454] - - [23.3944231, 67.4842768] - - [23.9945079, 66.8234885] - - [23.9956629, 66.822049] - - [23.6455681, 66.3021131] - - [23.6456201, 66.3013903] - - [24.1526454, 65.8629123] - - [24.152978, 65.862572] - - [24.1149326, 65.1739343] + type: LineString + coordinates: [[0, 1], [1, 2]] properties: theme: divisions type: division_boundary + version: 1 subtype: country - is_territorial: 1 - country: FI + is_territorial: true + class: maritime + division_ids: ["example:division:country:left", "example:division:country:right"] \ No newline at end of file diff --git a/examples/divisions/division_boundary/land_region.yaml b/examples/divisions/division_boundary/land_region.yaml index bb7c57c59..e8c9eb7c1 100644 --- a/examples/divisions/division_boundary/land_region.yaml +++ b/examples/divisions/division_boundary/land_region.yaml @@ -10,4 +10,5 @@ properties: version: 1 subtype: region class: land + is_land: true division_ids: ["example:division:region:left", "example:division:region:right"] diff --git a/examples/divisions/division_boundary/maritime_country.yaml b/examples/divisions/division_boundary/maritime_country.yaml index a9e77a1a6..13d73ed4d 100644 --- a/examples/divisions/division_boundary/maritime_country.yaml +++ b/examples/divisions/division_boundary/maritime_country.yaml @@ -10,4 +10,6 @@ properties: version: 1 subtype: country class: maritime + is_territorial: true + is_land: false division_ids: ["example:division:region:left", "example:division:region:right"] diff --git a/schema/divisions/division_area.yaml b/schema/divisions/division_area.yaml index 02262cb98..f72ce4b77 100644 --- a/schema/divisions/division_area.yaml +++ b/schema/divisions/division_area.yaml @@ -22,16 +22,19 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiPolygon.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [names, subtype, class, country, division_id, is_land, is_territorial] + required: [names, subtype, class, country, division_id] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer - "$ref": ../defs.yaml#/$defs/propertyContainers/namesContainer anyOf: - properties: - is_land: - const: true - is_territorial: - const: true + is_land: + const: true + required: [is_land] + - properties: + is_territorial: + const: true + required: [is_territorial] properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } class: diff --git a/schema/divisions/division_boundary.yaml b/schema/divisions/division_boundary.yaml index 703c2dc3f..896c66b34 100644 --- a/schema/divisions/division_boundary.yaml +++ b/schema/divisions/division_boundary.yaml @@ -17,15 +17,18 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiLineString.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [subtype, class, division_ids, is_land, is_territorial] + required: [subtype, class, division_ids] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer - anyOf: + oneOf: + - properties: + is_land: + const: true + required: [is_land] - properties: - is_land: - const: true - is_territorial: - const: true + is_territorial: + const: true + required: [is_territorial] properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } class: From bb753bdafab1e55f5ddb2b607be8b63d2e8c4462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Karla=C5=A1?= Date: Wed, 18 Dec 2024 13:21:25 +0100 Subject: [PATCH 5/5] Change is_land & is_terrirotial to be always requried --- .../division_area/bad-is-territorial.yaml | 3 ++- .../division_area/bad-missing-is-land.yaml | 14 ++++++++++++++ .../divisions/division_boundary/bad-is-land.yaml | 3 ++- .../division_boundary/bad-is-territorial.yaml | 3 ++- .../divisions/division_boundary/missing-class.yaml | 2 ++ .../division_boundary/missing-division_ids.yaml | 2 ++ .../division_boundary/missing-subtype.yaml | 2 ++ examples/divisions/division_area/country_land.yaml | 1 + .../divisions/division_area/country_maritime.yaml | 1 + examples/divisions/division_area/is_land.yaml | 1 + .../divisions/division_area/is_territorial.yaml | 1 + examples/divisions/division_area/region_land.yaml | 1 + examples/divisions/division_boundary/disputed.yaml | 1 + .../divisions/division_boundary/disputed_both.yaml | 1 + examples/divisions/division_boundary/is_land.yaml | 1 + .../division_boundary/is_territorial.yaml | 1 + .../divisions/division_boundary/land_region.yaml | 1 + schema/divisions/division_area.yaml | 4 +--- schema/divisions/division_boundary.yaml | 4 +--- 19 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 counterexamples/divisions/division_area/bad-missing-is-land.yaml diff --git a/counterexamples/divisions/division_area/bad-is-territorial.yaml b/counterexamples/divisions/division_area/bad-is-territorial.yaml index 3030b9f6d..31282ee4a 100644 --- a/counterexamples/divisions/division_area/bad-is-territorial.yaml +++ b/counterexamples/divisions/division_area/bad-is-territorial.yaml @@ -11,6 +11,7 @@ properties: subtype: country division_id: counterexample:division_boundary:some-division is_territorial: no + is_land: true country: ZZ ext_expected_errors: - - "is_territorial/const]: value must be true" + - "is_territorial/type]: got string, want boolean" diff --git a/counterexamples/divisions/division_area/bad-missing-is-land.yaml b/counterexamples/divisions/division_area/bad-missing-is-land.yaml new file mode 100644 index 000000000..3c7018342 --- /dev/null +++ b/counterexamples/divisions/division_area/bad-missing-is-land.yaml @@ -0,0 +1,14 @@ +--- +id: counterexample:division_area:bad-is-territorial +type: Feature +geometry: + type: LineString + coordinates: [[0, 1], [1, 2]] +properties: + theme: divisions + type: division_area + version: 0 + subtype: country + division_id: counterexample:division_boundary:some-division + is_territorial: false + country: ZZ \ No newline at end of file diff --git a/counterexamples/divisions/division_boundary/bad-is-land.yaml b/counterexamples/divisions/division_boundary/bad-is-land.yaml index 91e25150c..11835e6ab 100644 --- a/counterexamples/divisions/division_boundary/bad-is-land.yaml +++ b/counterexamples/divisions/division_boundary/bad-is-land.yaml @@ -11,7 +11,8 @@ properties: subtype: country division_ids: ["example:division:country:left", "example:division:country:right"] is_land: yes + is_territorial: false class: land country: ZZ ext_expected_errors: - - "is_land/const]: value must be true" + - "is_land/type]: got string, want boolean" diff --git a/counterexamples/divisions/division_boundary/bad-is-territorial.yaml b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml index 891c73b6c..4ee7d2afc 100644 --- a/counterexamples/divisions/division_boundary/bad-is-territorial.yaml +++ b/counterexamples/divisions/division_boundary/bad-is-territorial.yaml @@ -12,6 +12,7 @@ properties: division_ids: ["example:division:country:left", "example:division:country:right"] class: land is_territorial: no + is_land: true country: ZZ ext_expected_errors: - - "is_territorial/const]: value must be true" + - "is_territorial/type]: got string, want boolean" \ No newline at end of file diff --git a/counterexamples/divisions/division_boundary/missing-class.yaml b/counterexamples/divisions/division_boundary/missing-class.yaml index 1f3530991..052754033 100644 --- a/counterexamples/divisions/division_boundary/missing-class.yaml +++ b/counterexamples/divisions/division_boundary/missing-class.yaml @@ -9,6 +9,8 @@ properties: type: division_boundary version: 0 subtype: macroregion + is_territorial: true + is_land: false division_ids: ["example:division:country:left", "example:division:country:right"] ext_expected_errors: - "missing property 'class'" diff --git a/counterexamples/divisions/division_boundary/missing-division_ids.yaml b/counterexamples/divisions/division_boundary/missing-division_ids.yaml index 4fd4b8b8b..12e99fb80 100644 --- a/counterexamples/divisions/division_boundary/missing-division_ids.yaml +++ b/counterexamples/divisions/division_boundary/missing-division_ids.yaml @@ -9,6 +9,8 @@ properties: type: division_boundary version: 0 class: land + is_territorial: false + is_land: true subtype: macrocounty ext_expected_errors: - "missing property 'division_ids'" diff --git a/counterexamples/divisions/division_boundary/missing-subtype.yaml b/counterexamples/divisions/division_boundary/missing-subtype.yaml index 76aea6ea5..b06c8106a 100644 --- a/counterexamples/divisions/division_boundary/missing-subtype.yaml +++ b/counterexamples/divisions/division_boundary/missing-subtype.yaml @@ -9,6 +9,8 @@ properties: type: division_boundary version: 0 class: land + is_territorial: false + is_land: true division_ids: ["example:division:country:left", "example:division:country:right"] ext_expected_errors: - "missing property 'subtype'" diff --git a/examples/divisions/division_area/country_land.yaml b/examples/divisions/division_area/country_land.yaml index 20fa2fc25..f7620a998 100644 --- a/examples/divisions/division_area/country_land.yaml +++ b/examples/divisions/division_area/country_land.yaml @@ -305,6 +305,7 @@ properties: subtype: country class: land is_land: true + is_territorial: false division_id: example:division:country:us names: primary: United States diff --git a/examples/divisions/division_area/country_maritime.yaml b/examples/divisions/division_area/country_maritime.yaml index 8959ba8c5..6da93d96a 100644 --- a/examples/divisions/division_area/country_maritime.yaml +++ b/examples/divisions/division_area/country_maritime.yaml @@ -79,6 +79,7 @@ properties: subtype: country class: maritime is_territorial: true + is_land: false division_id: example:division:country:fi names: primary: Suomi diff --git a/examples/divisions/division_area/is_land.yaml b/examples/divisions/division_area/is_land.yaml index d77daf4f5..6ade21cbb 100644 --- a/examples/divisions/division_area/is_land.yaml +++ b/examples/divisions/division_area/is_land.yaml @@ -303,6 +303,7 @@ properties: type: division_area subtype: country is_land: true + is_territorial: false country: US version: 0 class: land diff --git a/examples/divisions/division_area/is_territorial.yaml b/examples/divisions/division_area/is_territorial.yaml index 79a492ced..18b8edda6 100644 --- a/examples/divisions/division_area/is_territorial.yaml +++ b/examples/divisions/division_area/is_territorial.yaml @@ -77,6 +77,7 @@ properties: type: division_area subtype: country is_territorial: true + is_land: false country: FI version: 0 class: land diff --git a/examples/divisions/division_area/region_land.yaml b/examples/divisions/division_area/region_land.yaml index 4d73c6e3e..6fa857863 100644 --- a/examples/divisions/division_area/region_land.yaml +++ b/examples/divisions/division_area/region_land.yaml @@ -74,6 +74,7 @@ properties: subtype: region class: land is_land: true + is_territorial: false division_id: example:division:country:it names: primary: Umbria diff --git a/examples/divisions/division_boundary/disputed.yaml b/examples/divisions/division_boundary/disputed.yaml index 413ef4565..525a80bbb 100644 --- a/examples/divisions/division_boundary/disputed.yaml +++ b/examples/divisions/division_boundary/disputed.yaml @@ -11,6 +11,7 @@ properties: subtype: country class: land is_land: true + is_territorial: false division_ids: ["example:division:country:left", "example:division:country:right"] is_disputed: true perspectives: diff --git a/examples/divisions/division_boundary/disputed_both.yaml b/examples/divisions/division_boundary/disputed_both.yaml index 680898328..ee491390b 100644 --- a/examples/divisions/division_boundary/disputed_both.yaml +++ b/examples/divisions/division_boundary/disputed_both.yaml @@ -11,6 +11,7 @@ properties: subtype: country class: land is_land: true + is_territorial: false division_ids: ["example:division:country:left", "example:division:country:right"] is_disputed: true perspectives: diff --git a/examples/divisions/division_boundary/is_land.yaml b/examples/divisions/division_boundary/is_land.yaml index 38ad04c11..418a89f90 100644 --- a/examples/divisions/division_boundary/is_land.yaml +++ b/examples/divisions/division_boundary/is_land.yaml @@ -10,5 +10,6 @@ properties: version: 1 subtype: country is_land: true + is_territorial: false class: land division_ids: ["example:division:country:left", "example:division:country:right"] \ No newline at end of file diff --git a/examples/divisions/division_boundary/is_territorial.yaml b/examples/divisions/division_boundary/is_territorial.yaml index fde0456ac..f5d8b34b4 100644 --- a/examples/divisions/division_boundary/is_territorial.yaml +++ b/examples/divisions/division_boundary/is_territorial.yaml @@ -11,5 +11,6 @@ properties: version: 1 subtype: country is_territorial: true + is_land: false class: maritime division_ids: ["example:division:country:left", "example:division:country:right"] \ No newline at end of file diff --git a/examples/divisions/division_boundary/land_region.yaml b/examples/divisions/division_boundary/land_region.yaml index e8c9eb7c1..1c9f86d0b 100644 --- a/examples/divisions/division_boundary/land_region.yaml +++ b/examples/divisions/division_boundary/land_region.yaml @@ -11,4 +11,5 @@ properties: subtype: region class: land is_land: true + is_territorial: false division_ids: ["example:division:region:left", "example:division:region:right"] diff --git a/schema/divisions/division_area.yaml b/schema/divisions/division_area.yaml index f72ce4b77..985bdd60d 100644 --- a/schema/divisions/division_area.yaml +++ b/schema/divisions/division_area.yaml @@ -22,7 +22,7 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiPolygon.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [names, subtype, class, country, division_id] + required: [names, subtype, class, country, division_id, is_land, is_territorial] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer - "$ref": ../defs.yaml#/$defs/propertyContainers/namesContainer @@ -30,11 +30,9 @@ properties: # JSON Schema: Top-level object properties. - properties: is_land: const: true - required: [is_land] - properties: is_territorial: const: true - required: [is_territorial] properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } class: diff --git a/schema/divisions/division_boundary.yaml b/schema/divisions/division_boundary.yaml index 896c66b34..af1a380de 100644 --- a/schema/divisions/division_boundary.yaml +++ b/schema/divisions/division_boundary.yaml @@ -17,18 +17,16 @@ properties: # JSON Schema: Top-level object properties. - "$ref": https://geojson.org/schema/MultiLineString.json properties: # GeoJSON: top-level object 'properties' property. unevaluatedProperties: false - required: [subtype, class, division_ids] + required: [subtype, class, division_ids, is_land, is_territorial] allOf: - "$ref": ../defs.yaml#/$defs/propertyContainers/overtureFeaturePropertiesContainer oneOf: - properties: is_land: const: true - required: [is_land] - properties: is_territorial: const: true - required: [is_territorial] properties: # JSON Schema: properties within GeoJSON top-level object 'properties' property subtype: { "$ref": "./defs.yaml#/$defs/propertyDefinitions/placetype" } class: