adiwg-mdjson_schemas 2.4.9 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -2
  3. data/adiwg-json_schemas.gemspec +1 -0
  4. data/examples/boundingBox.json +18 -6
  5. data/examples/entityAttribute.json +1 -0
  6. data/examples/geodetic.json +20 -0
  7. data/examples/geographicExtent.json +47 -22
  8. data/examples/geologicAge.json +12 -0
  9. data/examples/mdJson.json +104 -16
  10. data/examples/obliqueLinePoint.json +9 -0
  11. data/examples/projection.json +50 -0
  12. data/examples/referenceSystemParameterSet.json +38 -0
  13. data/examples/source.json +1 -0
  14. data/examples/spatialReference.json +16 -4
  15. data/examples/spatialResolution.json +21 -0
  16. data/examples/timeInstant.json +20 -0
  17. data/examples/timePeriod.json +19 -0
  18. data/examples/verticalDatum.json +13 -0
  19. data/lib/adiwg/mdjson_schemas/version.rb +1 -1
  20. data/package.json +3 -3
  21. data/schema/entityAttribute.json +7 -0
  22. data/schema/geodetic.json +71 -0
  23. data/schema/geographicExtent.json +75 -9
  24. data/schema/geologicAge.json +54 -0
  25. data/schema/lineage.json +7 -0
  26. data/schema/projection.json +333 -0
  27. data/schema/referenceSystemParameterSet.json +73 -0
  28. data/schema/resourceInfo.json +3 -1
  29. data/schema/schema.json +1 -1
  30. data/schema/spatialReference.json +15 -0
  31. data/schema/spatialResolution.json +158 -2
  32. data/schema/timeInstant.json +16 -2
  33. data/schema/timePeriod.json +62 -26
  34. data/schema/verticalDatum.json +56 -0
  35. data/test/tc_geodetic.rb +8 -0
  36. data/test/tc_geologicAge.rb +8 -0
  37. data/test/tc_obliqueLinePoint.rb +8 -0
  38. data/test/tc_projection.rb +27 -0
  39. data/test/tc_referenceSystemParameterSet.rb +8 -0
  40. data/test/tc_verticalDatum.rb +8 -0
  41. data/test/test.js +2 -1
  42. data/yarn.lock +81 -116
  43. metadata +40 -4
  44. data/package-lock.json +0 -405
@@ -0,0 +1,38 @@
1
+ [{
2
+ "projection": {
3
+ "projectionIdentifier": {
4
+ "identifier": "alaska",
5
+ "namespace": "org.adiwg.code.mapProjection"
6
+ }
7
+ }
8
+ }, {
9
+ "geodetic": {
10
+ "datumIdentifier": {
11
+ "identifier": "identifier"
12
+ },
13
+ "ellipsoidIdentifier": {
14
+ "identifier": "identifier"
15
+ },
16
+ "semiMajorAxis": 9.9,
17
+ "axisUnits": "axisUnits",
18
+ "denominatorOfFlatteningRatio": 9.9
19
+ }
20
+ }, {
21
+ "verticalDatum": {
22
+ "datumIdentifier": {
23
+ "identifier": "identifier"
24
+ },
25
+ "encodingMethod": "encodingMethod",
26
+ "isDepthSystem": false,
27
+ "verticalResolution": 9.9,
28
+ "unitOfMeasure": "unitOfMeasure"
29
+ }
30
+ },
31
+ {
32
+ "local": {
33
+ "description": "description",
34
+ "georeference": "georeference",
35
+ "fixedToEarth": true
36
+ }
37
+ }
38
+ ]
data/examples/source.json CHANGED
@@ -1,4 +1,5 @@
1
1
  [{
2
+ "sourceId": "sourceId",
2
3
  "description": "description",
3
4
  "sourceCitation": {
4
5
  "title": "title"
@@ -25,10 +25,22 @@
25
25
  },
26
26
  {
27
27
  "referenceSystemType": "projected",
28
- "referenceSystemIdentifier": {
29
- "identifier": "PROJCS ['Wyoming 4901, Eastern Zone (1983, meters)', GEOGCS ['GRS 80', DATUM ['GRS 80', SPHEROID ['GRS 80', 6378137.000000, 298.257222]], PRIMEM ['Greenwich', 0.000000 ], UNIT ['Decimal Degree', 0.01745329251994330]], PROJECTION ['Transverse Mercator'], PARAMETER ['Scale_Factor', 0.999938], PARAMETER ['Central_Meridian', -105.166667], PARAMETER ['Latitude_Of_Origin', 40.500000], PARAMETER ['False_Easting', 200000.000000], UNIT ['Meter', 1.000000000000]]",
30
- "namespace": "WKT",
31
- "description": "Well Known Text for East Wyoming"
28
+ "referenceSystemWKT": "PROJCS ['Wyoming 4901, Eastern Zone (1983, meters)', GEOGCS ['GRS 80', DATUM ['GRS 80', SPHEROID ['GRS 80', 6378137.000000, 298.257222]], PRIMEM ['Greenwich', 0.000000 ], UNIT ['Decimal Degree', 0.01745329251994330]], PROJECTION ['Transverse Mercator'], PARAMETER ['Scale_Factor', 0.999938], PARAMETER ['Central_Meridian', -105.166667], PARAMETER ['Latitude_Of_Origin', 40.500000], PARAMETER ['False_Easting', 200000.000000], UNIT ['Meter', 1.000000000000]]"
29
+ },
30
+ {
31
+ "referenceSystemType": "geodeticGeographic2D",
32
+ "referenceSystemParameterSet": {
33
+ "geodetic": {
34
+ "datumIdentifier": {
35
+ "identifier": "identifier"
36
+ },
37
+ "ellipsoidIdentifier": {
38
+ "identifier": "identifier"
39
+ },
40
+ "semiMajorAxis": 9.9,
41
+ "axisUnits": "axisUnits",
42
+ "denominatorOfFlatteningRatio": 9.9
43
+ }
32
44
  }
33
45
  }
34
46
  ]
@@ -8,4 +8,25 @@
8
8
  }
9
9
  }, {
10
10
  "levelOfDetail": "levelOfDetail"
11
+ }, {
12
+ "geographicResolution": {
13
+ "latitudeResolution": 9.9,
14
+ "longitudeResolution": 9.9,
15
+ "unitOfMeasure": "unitOfMeasure"
16
+ }
17
+ }, {
18
+ "bearingDistanceResolution": {
19
+ "distanceResolution": 9.9,
20
+ "distanceUnitOfMeasure": "",
21
+ "bearingResolution": 9.9,
22
+ "bearingUnitOfMeasure": "",
23
+ "bearingReferenceDirection": "north",
24
+ "bearingReferenceMeridian": "assumed"
25
+ }
26
+ }, {
27
+ "coordinateResolution": {
28
+ "abscissaResolutionX": 9.9,
29
+ "ordinateResolutionY": 9.9,
30
+ "unitOfMeasure": "unitOfMeasure"
31
+ }
11
32
  }]
@@ -10,4 +10,24 @@
10
10
  "instantName1"
11
11
  ],
12
12
  "dateTime": "2016-10-24T10:25:00"
13
+ }, {
14
+ "id": "id",
15
+ "description": "description",
16
+ "identifier": {
17
+ "identifier": "identifier",
18
+ "namespace": "namespace"
19
+ },
20
+ "instantName": [
21
+ "instantName0",
22
+ "instantName1"
23
+ ],
24
+ "geologicAge": {
25
+ "ageTimeScale": "ageTimeScale",
26
+ "ageEstimate": "ageEstimate",
27
+ "ageUncertainty": "ageUncertainty",
28
+ "ageExplanation": "ageExplanation",
29
+ "ageReference": [{
30
+ "title": "citation title"
31
+ }]
32
+ }
13
33
  }]
@@ -23,4 +23,23 @@
23
23
  "minutes": 1,
24
24
  "seconds": 1
25
25
  }
26
+ }, {
27
+ "id": "id",
28
+ "description": "description",
29
+ "identifier": {
30
+ "identifier": "identifier",
31
+ "namespace": "namespace"
32
+ },
33
+ "periodName": [
34
+ "periodName0",
35
+ "periodName1"
36
+ ],
37
+ "startGeologicAge": {
38
+ "ageTimeScale": "ageTimeScale",
39
+ "ageEstimate": "ageEstimate"
40
+ },
41
+ "endGeologicAge": {
42
+ "ageTimeScale": "ageTimeScale",
43
+ "ageEstimate": "ageEstimate"
44
+ }
26
45
  }]
@@ -0,0 +1,13 @@
1
+ [{
2
+ "datumIdentifier": {
3
+ "identifier": "identifier"
4
+ },
5
+ "encodingMethod": "encodingMethod",
6
+ "isDepthSystem": false,
7
+ "verticalResolution": 9.9,
8
+ "unitOfMeasure": "unitOfMeasure"
9
+ }, {
10
+ "datumIdentifier": {
11
+ "identifier": "identifier"
12
+ }
13
+ }]
@@ -1,6 +1,6 @@
1
1
  module ADIWG
2
2
  module MdjsonSchemas
3
3
  # Current schema version number
4
- VERSION = "2.4.9"
4
+ VERSION = "2.5.0"
5
5
  end
6
6
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdjson-schemas",
3
- "version": "2.4.9",
3
+ "version": "2.5.0",
4
4
  "description": "JSON schemas, examples, and templates for ADIwg metadata standards",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "homepage": "https://github.com/adiwg/mdJson-schemas#readme",
41
41
  "devDependencies": {
42
- "ajv": "^5.2.2",
42
+ "ajv": "^6.5.0",
43
43
  "buildify": "github:powmedia/buildify#20458a121411f759dcc5ec1b441695eb7fc2b3b7",
44
44
  "glob": "^7.1.2",
45
45
  "mkdirp": "^0.5.1",
46
- "mocha": "^3.5.0",
46
+ "mocha": "^5.2.0",
47
47
  "rimraf": "^2.6.1"
48
48
  }
49
49
  }
@@ -60,10 +60,17 @@
60
60
  },
61
61
  "allowMany": {
62
62
  "type": "boolean",
63
+ "deprecated": true,
63
64
  "description": "Indicates whether null values are allowed for the attribute",
64
65
  "translation": {},
65
66
  "default": false
66
67
  },
68
+ "mustBeUnique": {
69
+ "type": "boolean",
70
+ "description": "Indicates whether the attribute value is required to be unique.",
71
+ "translation": {},
72
+ "default": false
73
+ },
67
74
  "units": {
68
75
  "type": "string",
69
76
  "description": "A unit-of-measure for the attribute. E.g. 'meters', 'atmospheres', 'liters'",
@@ -0,0 +1,71 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "geodetic.json#",
4
+ "type": "object",
5
+ "title": "geodetic",
6
+ "description": "Parameters for defining the shape of the earth.",
7
+ "example": "../examples/geodetic.json",
8
+ "translation": {
9
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS"],
10
+ "FGDC CSDGM": ["metadata > spref > horizsys > geodetic"]
11
+ },
12
+ "additionalProperties": true,
13
+ "properties": {
14
+ "datumIdentifier": {
15
+ "description": "The identification given to the reference system used for defining the coordinates of points.",
16
+ "translation": {
17
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS > datum > RS_Identifier > code"],
18
+ "FGDC CSDGM": ["metadata > spref > horizsys > geodetic > horizdn"]
19
+ },
20
+ "$ref": "./identifier.json#"
21
+ },
22
+ "ellipsoidIdentifier": {
23
+ "description": "The identification given to established representations of the Earth's shape.",
24
+ "translation": {
25
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS > ellipsoid > RS_Identifier > code"],
26
+ "FGDC CSDGM": ["metadata > spref > horizsys > geodetic > horizdn"]
27
+ },
28
+ "$ref": "./identifier.json#"
29
+ },
30
+ "semiMajorAxis": {
31
+ "type": "number",
32
+ "description": "The radius of the equatorial axis of the ellipsoid.",
33
+ "translation": {
34
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS > projection > ellipsoidParameters > MD_EllipsoidParameters > semiMajorAxis"],
35
+ "FGDC CSDGM": ["metadata > spref > horizsys > geodetic > semiaxis"]
36
+ }
37
+ },
38
+ "axisUnits": {
39
+ "type": "string",
40
+ "description": "The units of the semi-major axis.",
41
+ "translation": {
42
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS > projection > ellipsoidParameters > MD_EllipsoidParameters > axisUnits"]
43
+ }
44
+ },
45
+ "denominatorOfFlatteningRatio": {
46
+ "type": "number",
47
+ "description": "The denominator of the ratio of the difference between the equatorial and polar radii of the ellipsoid when the numerator is set to 1.",
48
+ "translation": {
49
+ "ISO 19115-2": ["referenceSystemInfo > MD_CRS > projection > ellipsoidParameters > MD_EllipsoidParameters > denominatorOfFlatteningRatio"],
50
+ "FGDC CSDGM": ["metadata > spref > horizsys > geodetic > denflat"]
51
+ }
52
+ }
53
+ },
54
+ "dependencies": {
55
+ "semiMajorAxis": [
56
+ "ellipsoidIdentifier",
57
+ "axisUnits",
58
+ "denominatorOfFlatteningRatio"
59
+ ],
60
+ "denominatorOfFlatteningRatio": [
61
+ "ellipsoidIdentifier",
62
+ "semiMajorAxis",
63
+ "axisUnits"
64
+ ],
65
+ "axisUnits": [
66
+ "ellipsoidIdentifier",
67
+ "semiMajorAxis",
68
+ "denominatorOfFlatteningRatio"
69
+ ]
70
+ }
71
+ }
@@ -18,7 +18,11 @@
18
18
  },
19
19
  "boundingBox": {
20
20
  "$ref": "#/definitions/boundingBox",
21
- "description": "General geographic position of the resource."
21
+ "description": "General geographic position of the resource.",
22
+ "translation": {
23
+ "ISO 19115-2": ["EX_GeographicBoundingBox"],
24
+ "FGDC CSDGM": ["idinfo > spdom > bounding"]
25
+ }
22
26
  },
23
27
  "geographicElement": {
24
28
  "type": "array",
@@ -29,8 +33,33 @@
29
33
  "items": {
30
34
  "$ref": "#/definitions/geographicElement"
31
35
  }
36
+ },
37
+ "description": {
38
+ "type": "string",
39
+ "description": "Short description of the geographic areal domain of the data set. Examples include, \"Manistee River watershed\", \"extent of 7 ½ minute quads containing any property belonging to Yellowstone National Park\", or \"ponds and reservoirs larger than 2 acres in Jefferson County, Colorado\".",
40
+ "translation": {
41
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_GeographicDescription > geographicIdentifier > MD_Identifier > code"],
42
+ "FGDC CSDGM": ["idinfo > spdom > descgeog"]
43
+ }
32
44
  }
33
45
  },
46
+ "anyOf": [{
47
+ "title": "identifier is required",
48
+ "required": ["identifier"]
49
+ },
50
+ {
51
+ "title": "boundingBox is required",
52
+ "required": ["boundingBox"]
53
+ },
54
+ {
55
+ "title": "geographicElement is required",
56
+ "required": ["geographicElement"]
57
+ },
58
+ {
59
+ "title": "description is required",
60
+ "required": ["description"]
61
+ }
62
+ ],
34
63
  "definitions": {
35
64
  "boundingBox": {
36
65
  "type": "object",
@@ -45,24 +74,61 @@
45
74
  "properties": {
46
75
  "westLongitude": {
47
76
  "type": "number",
48
- "description": "",
49
- "translation": {}
77
+ "description": "Western-most coordinate of the limit of the dataset extent expressed in longitude, in decimal degrees.",
78
+ "translation": {
79
+ "ISO 19115-2": ["EX_GeographicBoundingBox > westBoundLongitude"],
80
+ "FGDC CSDGM": ["idinfo > spdom > bounding > westbc"]
81
+ }
50
82
  },
51
83
  "eastLongitude": {
52
84
  "type": "number",
53
- "description": "",
54
- "translation": {}
85
+ "description": "Eastern-most coordinate of the limit of the dataset extent expressed in longitude, in decimal degrees.",
86
+ "translation": {
87
+ "ISO 19115-2": ["EX_GeographicBoundingBox > eastBoundLongitude"],
88
+ "FGDC CSDGM": ["idinfo > spdom > bounding > eastbc"]
89
+ }
55
90
  },
56
91
  "southLatitude": {
57
92
  "type": "number",
58
- "description": "",
59
- "translation": {}
93
+ "description": "Southern-most coordinate of the limit of the dataset extent expressed in latitude, in decimal degrees.",
94
+ "translation": {
95
+ "ISO 19115-2": ["EX_GeographicBoundingBox > southBoundLatitude"],
96
+ "FGDC CSDGM": ["idinfo > spdom > bounding > southbc"]
97
+ }
60
98
  },
61
99
  "northLatitude": {
62
100
  "type": "number",
63
- "description": "",
64
- "translation": {}
101
+ "description": "Northern-most coordinate of the limit of the dataset extent expressed in latitude, in decimal degrees.",
102
+ "translation": {
103
+ "ISO 19115-2": ["EX_GeographicBoundingBox > northBoundLatitude"],
104
+ "FGDC CSDGM": ["idinfo > spdom > bounding > northbc"]
105
+ }
106
+ },
107
+ "minimumAltitude": {
108
+ "type": "number",
109
+ "description": "The minimum altitude(height above sea level) extent of coverage.",
110
+ "translation": {
111
+ "FGDC CSDGM": ["idinfo > spdom > bounding > boundalt > altmin"]
112
+ }
113
+ },
114
+ "maximumAltitude": {
115
+ "type": "number",
116
+ "description": "The maximum altitude(height above sea level) extent of coverage.",
117
+ "translation": {
118
+ "FGDC CSDGM": ["idinfo > spdom > bounding > boundalt > altmax"]
119
+ }
120
+ },
121
+ "unitsOfAltitude": {
122
+ "type": "string",
123
+ "description": "The units of measure in which altitude is expressed.",
124
+ "translation": {
125
+ "FGDC CSDGM": ["idinfo > spdom > bounding > boundalt > altunit"]
126
+ }
65
127
  }
128
+ },
129
+ "dependencies": {
130
+ "minimumAltitude": ["unitsOfAltitude"],
131
+ "maximumAltitude": ["unitsOfAltitude"]
66
132
  }
67
133
  },
68
134
  "geographicElement": {
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "geologicAge.json#",
4
+ "type": "object",
5
+ "title": "geologicAge",
6
+ "description": "A name, code, or date describing an event or period in geologic time, expressed either as an absolute date calculated using a named dating method, or as a relative date that is drawn from stratigraphy or biostratigraphy.",
7
+ "example": "../examples/geologicAge.json",
8
+ "translation": {
9
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage"]
10
+ },
11
+ "required": ["ageTimeScale", "ageEstimate"],
12
+ "additionalProperties": true,
13
+ "properties": {
14
+ "ageTimeScale": {
15
+ "type": "string",
16
+ "description": "Name of a recognized geologic time scale. This includes \"Absolute\" as the name of the time scale for measuring geologic dates before the present and names of geologic dating systems that are arrangements of symbols or names in order of relative geologic time",
17
+ "translation": {
18
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage > geolscal"]
19
+ }
20
+ },
21
+ "ageEstimate": {
22
+ "type": "string",
23
+ "description": "Either an absolute geologic date or a relative geologic age name describing an event or period in geologic time based on the Geologic_Time_Scale.",
24
+ "translation": {
25
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage > geolest"]
26
+ }
27
+ },
28
+ "ageUncertainty": {
29
+ "type": "string",
30
+ "description": "The error estimate for the geologic time. This should include the units of measure, a description of what the error estimate represents and how it was calculated.",
31
+ "translation": {
32
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage > geolun"]
33
+ }
34
+ },
35
+ "ageExplanation": {
36
+ "type": "string",
37
+ "description": "The name and/or description of the method used to calculate the ageEstimate. Detailed information about the method may be provided through references contained in the ageReference.",
38
+ "translation": {
39
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage > geolexpl"]
40
+ }
41
+ },
42
+ "ageReference": {
43
+ "type" : "array",
44
+ "description" : "Citation for works providing detailed information about any element of the geologicAge.",
45
+ "translation": {
46
+ "FGDC CSDGM": ["timeperd > timeinfo > sngdate > geolage > geolcit"]
47
+ },
48
+ "items" : {
49
+ "$ref": "./citation.json#"
50
+ }
51
+ }
52
+ },
53
+ "definitions": {}
54
+ }