Skip to content

Commit b143225

Browse files
authored
CMR-8970 updating grid schema and example file to remove DimensionSca… (#1855)
* CMR-8970 updating grid schema and example file to remove DimensionScale constraints. * CMR-8970 fixing spacing. * CMR-8970 fixing spacing.
1 parent 25c0ecf commit b143225

File tree

2 files changed

+36
-66
lines changed

2 files changed

+36
-66
lines changed

schemas/resources/schemas/grid/v0.0.1/metadata.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,24 @@
3333
"SouthBoundingCoordinate": -90.0,
3434
"WestBoundingCoordinate": 90.0,
3535
"SpatialResolution": {
36-
"Unit": "Degree",
37-
"LongitudeResolution": "9",
38-
"LatitudeResolution": "9"
36+
"Unit": "Meter",
37+
"LongitudeResolution": "10.0001",
38+
"LatitudeResolution": "14.0001"
3939
}
4040
},
4141
"DimensionScale": {
4242
"0_360_DegreeProjection": false,
4343
"X":
4444
{
45-
"Minimum": 1,
46-
"Maximum": 59,
45+
"Minimum": 98.0330,
46+
"Maximum": 98.0330,
4747
"Unit": "Meter",
4848
"Resolution": 0.125
4949
},
5050
"Y":
5151
{
52-
"Minimum": 1,
53-
"Maximum": 59,
52+
"Minimum": 98.0330,
53+
"Maximum": 98.0330,
5454
"Unit": "Meter",
5555
"Resolution": 0.5
5656
},

schemas/resources/schemas/grid/v0.0.1/schema.json

+29-59
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
},
9898
"MetadataDateType": {
9999
"type": "object",
100+
"additionalProperties": false,
100101
"properties": {
101102
"Create": {
102103
"description": "This element represents the creation date of the metadata.",
@@ -197,7 +198,7 @@
197198
"type": "string",
198199
"minLength": 1,
199200
"maxLength": 1024
200-
}
201+
}
201202
}
202203
}
203204
},
@@ -249,6 +250,7 @@
249250

250251
"DimensionScale": {
251252
"description": "The characterizes the grid's X, Y, Time, and Other Dimensions.",
253+
"additionalProperties": false,
252254
"type": "object",
253255
"properties": {
254256
"0_360_DegreeProjection": {
@@ -274,20 +276,14 @@
274276
},
275277
"required": [
276278
"X",
277-
"Y",
278-
"Time",
279-
"Other"
279+
"Y"
280280
],
281281
"allOf": [
282282
{"$ref": "#/definitions/DimensionScaleUnitXEnumsCondition"},
283283
{"$ref": "#/definitions/DimensionScaleUnitYEnumsCondition"},
284284
{"$ref": "#/definitions/DimensionScaleUnitTimeEnumsCondition"},
285285
{"$ref": "#/definitions/DimensionScaleXUnitPatternDMS"},
286286
{"$ref": "#/definitions/DimensionScaleYUnitPatternDMS"},
287-
{"$ref": "#/definitions/DimensionScaleMeterMinMaxConditionX"},
288-
{"$ref": "#/definitions/DimensionScaleMeterMinMaxConditionY"},
289-
{"$ref": "#/definitions/DimensionScaleKilometerMinMaxConditionX"},
290-
{"$ref": "#/definitions/DimensionScaleKilometerMinMaxConditionY"},
291287
{"$ref": "#/definitions/DimensionScaleDegreeMinMaxTrueConditionX"},
292288
{"$ref": "#/definitions/DimensionScaleDegreeMinMaxTrueConditionY"},
293289
{"$ref": "#/definitions/DimensionScaleHourMinMaxPatternConditionTime"},
@@ -312,7 +308,7 @@
312308

313309
"OrganizationType": {
314310
"type": "object",
315-
"additionalItems": false,
311+
"additionalProperties": false,
316312
"properties": {
317313
"ShortName": {
318314
"description": "The unique name of the organization.",
@@ -453,6 +449,7 @@
453449
"DimensionScaleType": {
454450
"description": "The elements used for DimensionScale group.",
455451
"type": "object",
452+
"additionalProperties": false,
456453
"properties": {
457454
"Minimum": {
458455
"description": "The lowest value of the element."
@@ -536,7 +533,7 @@
536533
},
537534
"AdditionalAttributeType": {
538535
"type": "object",
539-
"additionalItems": false,
536+
"additionalProperties": false,
540537
"properties": {
541538
"Name": {
542539
"description": "The name (1 word description) of the additional attribute.",
@@ -672,33 +669,6 @@
672669
"else": false
673670
},
674671

675-
"DimensionScaleMeterMinMaxConditionX": {
676-
"$comment": "Checks if the DimensionScale's Unit element value is Meter then sets the minimum value for Minimum and Maximum sub-elements for X.",
677-
"if": {"properties": {"X": {"properties": {"Unit": {"const": "Meter"}}}}},
678-
"then": {"properties": {"X": {"properties": {"Minimum": {"minimum": 1},
679-
"Maximum": {"minimum": 1}}}}}
680-
},
681-
682-
"DimensionScaleMeterMinMaxConditionY": {
683-
"$comment": "Checks if the DimensionScale's Unit element value is Meter then sets the minimum value for Minimum and Maximum sub-elements for Y.",
684-
"if": {"properties": {"Y": {"properties": {"Unit": {"const": "Meter"}}}}},
685-
"then": {"properties": {"Y": {"properties": {"Minimum": {"minimum": 1},
686-
"Maximum": {"minimum": 1}}}}}
687-
},
688-
689-
"DimensionScaleKilometerMinMaxConditionX": {
690-
"$comment": "Checks if the DimensionScale's Unit element value is Kilometer then sets the minimum value for Minimum and Maximum sub-elements for X.",
691-
"if": {"properties": {"X": {"properties": {"Unit": {"const": "Kilometer"}}}}},
692-
"then": {"properties": {"X": {"properties": {"Minimum": {"minimum": 1},
693-
"Maximum": {"minimum": 1}}}}}
694-
},
695-
696-
"DimensionScaleKilometerMinMaxConditionY": {
697-
"$comment": "Checks if the DimensionScale's Unit element value is Kilometer then sets the minimum value for Minimum and Maximum sub-elements for Y.",
698-
"if": {"properties": {"Y": {"properties": {"Unit": {"const": "Kilometer"}}}}},
699-
"then": {"properties": {"Y": {"properties": {"Minimum": {"minimum": 1},
700-
"Maximum": {"minimum": 1}}}}}
701-
},
702672

703673
"DimensionScaleDegreeMinMaxTrueConditionX": {
704674
"$comment": "Checks if the DimensionScale's Unit element value is Degree then sets the minimum and maximum values for Minimum and Maximum sub-elements for X.",
@@ -720,23 +690,23 @@
720690
"DimensionScaleHourMinMaxPatternConditionTime": {
721691
"$comment": "Checks if the DimensionScale's Unit element value is Hour then set the pattern requirement",
722692
"if": {"properties": {"Time": {"properties": {"Unit": {"const": "Hour"}}}}},
723-
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"},
724-
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"}}}}}
693+
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"},
694+
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"}}}}}
725695
},
726696

727697
"DimensionScaleMinutesMinMaxPatternConditionTime": {
728698
"$comment": "Checks if the DimensionScale's Unit element value is Minutes then set the pattern requirement",
729699
"if": {"properties": {"Time": {"properties": {"Unit": {"const": "Minutes"}}}}},
730-
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"},
731-
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"}}}}}
700+
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"},
701+
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"}}}}}
732702
},
733703

734704

735705
"DimensionScaleSecondsMinMaxPatternConditionTime": {
736706
"$comment": "Checks if the DimensionScale's Unit element value is Seconds then set the pattern requirement",
737707
"if": {"properties": {"Time": {"properties": {"Unit": {"const": "Seconds"}}}}},
738-
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"},
739-
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{3})?$"}}}}}
708+
"then": {"properties": {"Time": {"properties": {"Minimum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"},
709+
"Maximum": {"pattern": "^[0-9][0-9](\\.[0-9]{5})?$"}}}}}
740710
},
741711

742712
"DimensionScaleDateMinMaxPatternConditionTime": {
@@ -763,57 +733,57 @@
763733
"DimensionScaleXUnitPatternDMS": {
764734
"$comment": "Checks the DimensionScale's Unit element values pattern for Degrees-Minutes-Seconds. The value's format ##-##-##.### and Milliseconds are optional.",
765735
"if": {"properties": {"X": {"properties": {"Unit": {"enum": ["Degrees-Minutes-Seconds"]}}}}},
766-
"then": {"properties": {"X": {"properties": {"Minimum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"},
767-
"Maximum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"}}}}}
736+
"then": {"properties": {"X": {"properties": {"Minimum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"},
737+
"Maximum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"}}}}}
768738
},
769739

770740
"DimensionScaleYUnitPatternDMS": {
771741
"$comment": "Checks the DimensionScale's Unit element values pattern for Degrees-Minutes-Seconds. The value's format ##-##-##.### and Milliseconds are optional.",
772742
"if": {"properties": {"Y": {"properties": {"Unit": {"enum": ["Degrees-Minutes-Seconds"]}}}}},
773-
"then": {"properties": {"Y": {"properties": {"Minimum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"},
774-
"Maximum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"}}}}}
743+
"then": {"properties": {"Y": {"properties": {"Minimum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"},
744+
"Maximum": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"}}}}}
775745
},
776746

777747
"SpatialResolutionUnitPatternDMS": {
778748
"$comment": "Checks the SpatialResolution Unit element values pattern for Degrees-Minutes-Seconds. The value's format ##-##-##.### and Milliseconds are optional.",
779749
"if": {"properties": {"Unit": {"const": "Degrees-Minutes-Seconds"}}},
780-
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"},
781-
"LatitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"}}}
750+
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"},
751+
"LatitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}-[0-9]{2}\\.?\\d*?$"}}}
782752
},
783753

784754
"SpatialResolutionUnitPatternMinute": {
785755
"$comment": "Checks the SpatialResolution Unit element values pattern for Minutes. The value's format ##-##.### and Milliseconds are optional.",
786756
"if": {"properties": {"Unit": {"const": "Minutes"}}},
787-
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"},
788-
"LatitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}(\\.[0-9]{3})?$"}}}
757+
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}\\.?\\d*?$"},
758+
"LatitudeResolution": {"pattern": "^[0-9]{2}-[0-9]{2}\\.?\\d*?$"}}}
789759
},
790760

791761
"SpatialResolutionUnitPatternSecond": {
792762
"$comment": "Checks the SpatialResolution Unit element values pattern for Seconds. The value's format ##.### and Milliseconds are optional.",
793763
"if": {"properties": {"Unit": {"const": "Seconds"}}},
794-
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}(\\.[0-9]{3})?$"},
795-
"LatitudeResolution": {"pattern": "^[0-9]{2}(\\.[0-9]{3})?$"}}}
764+
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{2}\\.?\\d*?$"},
765+
"LatitudeResolution": {"pattern": "^[0-9]{2}\\.?\\d*?$"}}}
796766
},
797767

798768
"SpatialResolutionUnitPatternDeg": {
799769
"$comment": "Checks the SpatialResolution Unit element values pattern for Degrees.",
800770
"if": {"properties": {"Unit": {"const": "Degree"}}},
801-
"then": {"properties": {"LongitudeResolution": {"pattern": "^(360|3[0-5][0-9]|[12][0-9]{1,2}|[1-9][0-9]|[0-9])$"},
802-
"LatitudeResolution": {"pattern": "^(180|1[0-7][0-9]|[1-9][0-9]|[0-9])$"}}}
771+
"then": {"properties": {"LongitudeResolution": {"pattern": "^(360|3[0-5][0-9]|[12][0-9]{1,2}|[1-9][0-9]|[0-9])\\.?\\d*?$"},
772+
"LatitudeResolution": {"pattern": "^(180|1[0-7][0-9]|[1-9][0-9]|[0-9])\\.?\\d*?$"}}}
803773
},
804774

805775
"SpatialResolutionUnitPatternKM": {
806776
"$comment": "Checks the SpatialResolution Unit element values pattern for Kilometer.",
807777
"if": {"properties": {"Unit": {"const": "Kilometer"}}},
808-
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{1,}(\\.[0-9]{3})?$"},
809-
"LatitudeResolution": {"pattern": "^[0-9]{1,}(\\.[0-9]{3})?$"}}}
778+
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{1,}\\.?\\d*?$"},
779+
"LatitudeResolution": {"pattern": "^[0-9]{1,}\\.?\\d*?$"}}}
810780
},
811781

812782
"SpatialResolutionUnitPatternMeter": {
813783
"$comment": "Checks the SpatialResolution Unit element values pattern for Meter.",
814784
"if": {"properties": {"Unit": {"const": "Meter"}}},
815-
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{1,}$"},
816-
"LatitudeResolution": {"pattern": "^[0-9]{1,}$"}}}
785+
"then": {"properties": {"LongitudeResolution": {"pattern": "^[0-9]{1,}\\.?\\d*?$"},
786+
"LatitudeResolution": {"pattern": "^[0-9]{1,}\\.?\\d*?$"}}}
817787
},
818788

819789
"ScaleDegreesMinutesSecondsCondition": {

0 commit comments

Comments
 (0)