adiwg-mdjson_schemas 1.0.0rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/.travis.yml +7 -0
  4. data/CREDITS +3 -0
  5. data/Gemfile +4 -0
  6. data/LICENSE +24 -0
  7. data/README.md +36 -0
  8. data/Rakefile +12 -0
  9. data/adiwg-json_schemas.gemspec +25 -0
  10. data/examples/additionalDocumentation.json +61 -0
  11. data/examples/address.json +10 -0
  12. data/examples/associatedResource.json +119 -0
  13. data/examples/citation.json +128 -0
  14. data/examples/contact.json +205 -0
  15. data/examples/contactRef.json +12 -0
  16. data/examples/dataDictionary.json +547 -0
  17. data/examples/dataQuality.json +272 -0
  18. data/examples/date.json +19 -0
  19. data/examples/distributor.json +113 -0
  20. data/examples/extent_linestring.json +288 -0
  21. data/examples/extent_point.json +246 -0
  22. data/examples/extent_polygon.json +353 -0
  23. data/examples/format.json +14 -0
  24. data/examples/full_example.json +2844 -0
  25. data/examples/full_example2.json +2325 -0
  26. data/examples/geojson.json +446 -0
  27. data/examples/graphicOverview.json +28 -0
  28. data/examples/hierarchyLevel.json +90 -0
  29. data/examples/keywords.json +144 -0
  30. data/examples/lcc_project_example.json +326 -0
  31. data/examples/legalConstraints.json +17 -0
  32. data/examples/maintInfo.json +34 -0
  33. data/examples/metadataInfo.json +103 -0
  34. data/examples/minimum_example.json +35 -0
  35. data/examples/onlineResource.json +17 -0
  36. data/examples/resolution.json +9 -0
  37. data/examples/resourceInfo.json +1264 -0
  38. data/examples/resourceMaintenance.json +10 -0
  39. data/examples/securityConstraints.json +13 -0
  40. data/examples/spatialRef.json +14 -0
  41. data/examples/taxonomy.json +197 -0
  42. data/examples/temporalElement.json +29 -0
  43. data/examples/uri.json +16 -0
  44. data/examples/usage.json +35 -0
  45. data/examples/verticalExtent.json +18 -0
  46. data/lib/adiwg-mdjson_schemas.rb +1 -0
  47. data/lib/adiwg/mdjson_schemas.rb +7 -0
  48. data/lib/adiwg/mdjson_schemas/utils.rb +20 -0
  49. data/lib/adiwg/mdjson_schemas/validator.rb +42 -0
  50. data/lib/adiwg/mdjson_schemas/version.rb +6 -0
  51. data/schema/schema.json +64 -0
  52. data/schema/schema/citation.json +186 -0
  53. data/schema/schema/contact.json +255 -0
  54. data/schema/schema/dataDictionary.json +209 -0
  55. data/schema/schema/dataQuality.json +159 -0
  56. data/schema/schema/distributor.json +171 -0
  57. data/schema/schema/extent.json +214 -0
  58. data/schema/schema/geojson/bbox.json +14 -0
  59. data/schema/schema/geojson/crs.json +99 -0
  60. data/schema/schema/geojson/geojson.json +194 -0
  61. data/schema/schema/geojson/geometry.json +203 -0
  62. data/schema/schema/graphicOverview.json +42 -0
  63. data/schema/schema/keyword.json +39 -0
  64. data/schema/schema/maintInfo.json +43 -0
  65. data/schema/schema/metadata.json +173 -0
  66. data/schema/schema/onlineResource.json +42 -0
  67. data/schema/schema/resolution.json +51 -0
  68. data/schema/schema/resourceConstraint.json +108 -0
  69. data/schema/schema/resourceInfo.json +305 -0
  70. data/schema/schema/taxonomy.json +122 -0
  71. data/schema/schema/usage.json +39 -0
  72. data/templates/mdJson_template.json +1065 -0
  73. data/test/draft-04.json +189 -0
  74. data/test/tc_schemas.rb +210 -0
  75. data/test/tc_utils.rb +27 -0
  76. metadata +178 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "bbox.json#",
4
+ "description": "To include information on the coordinate range for geometries, features, or feature collections, a GeoJSON object may have a member named \"bbox\". The value of the bbox member must be a 2*n array where n is the number of dimensions represented in the contained geometries, with the lowest values for all axes followed by the highest values. The axes order of a bbox follows the axes order of geometries. In addition, the coordinate reference system for the bbox is assumed to match the coordinate reference system of the GeoJSON object of which it is a member.",
5
+ "translation": {
6
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_GeographicBoundingBox\nEX_GeographicBoundingBox > westBoundLongitude > Decimal {west}\nEX_GeographicBoundingBox > eastBoundLongitude > Decimal {east}\nEX_GeographicBoundingBox > southBoundLatitude > Decimal {south}\nEX_GeographicBoundingBox > northBoundLatitude > Decimal {north}"],
7
+ "FGDC CSDGM": ["[idinfo > spdom > bounding > westbc], [idinfo > spdom > bounding > eastbc], [idinfo > spdom > bounding > northbc], [idinfo > spdom > bounding > southbc]"]
8
+ },
9
+ "type": "array",
10
+ "minItems": 4,
11
+ "items": {
12
+ "type": "number"
13
+ }
14
+ }
@@ -0,0 +1,99 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "crs.json#",
4
+ "title": "crs",
5
+ "description": "A Coordinate Reference System object.",
6
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement",
7
+ "oneOf": [
8
+ {
9
+ "type": "object",
10
+ "description": "A Coordinate Reference System object.",
11
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement",
12
+ "required": ["type", "properties"],
13
+ "properties": {
14
+ "type": {
15
+ "type": "string",
16
+ "description": "The type of coordinate reference system."
17
+ },
18
+ "properties": {
19
+ "type": "object",
20
+ "description": "Coordinate reference system properties."
21
+ }
22
+ },
23
+ "additionalProperties": false,
24
+ "oneOf": [
25
+ {
26
+ "$ref": "#/definitions/namedCrs"
27
+ }, {
28
+ "$ref": "#/definitions/linkedCrs"
29
+ }
30
+ ]
31
+ }, {
32
+ "title": "null",
33
+ "type": "null"
34
+ }
35
+ ],
36
+ "definitions": {
37
+ "namedCrs": {
38
+ "title": "namedCrs",
39
+ "type": "object",
40
+ "description": "A GeoJSON CRS object that indicates a coordinate reference system by name.",
41
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/1/crs",
42
+ "properties": {
43
+ "type": {
44
+ "enum": ["name"],
45
+ "description": "A CRS object may indicate a coordinate reference system by name. In this case, the value of its \"type\" member must be the string \"name\"."
46
+ },
47
+ "properties": {
48
+ "type": "object",
49
+ "description": "Coordinate reference system properties.",
50
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/1/crs",
51
+ "required": ["name"],
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "name": {
55
+ "type": "string",
56
+ "description": "The name of the coordinate reference system.",
57
+ "translation": {
58
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > [Point, LineString, Polygon, MultiGeometry] @srsName"]
59
+ },
60
+ "FIXME": "semantic validation necessary"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ },
66
+ "linkedObject": {
67
+ "type": "object",
68
+ "title": "linkedObject",
69
+ "description": "An object that links to a coordinate reference system definition.",
70
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/0/crs",
71
+ "required": ["href"],
72
+ "properties": {
73
+ "href": {
74
+ "$ref": "../../schema.json#/definitions/url",
75
+ "description": "A dereferenceable URI that links to the parameters for the coordinate reference system."
76
+ },
77
+ "type": {
78
+ "type": "string",
79
+ "description": "A string that hints at the format used to represent CRS parameters at the provided URI. Suggested values are: \"proj4\", \"ogcwkt\", \"esriwkt\", but others can be used."
80
+ }
81
+ }
82
+ },
83
+ "linkedCrs": {
84
+ "title": "linkedCrs",
85
+ "type": "object",
86
+ "description": "A GeoJSON CRS object that links to coordinate reference system parameters on the Web.",
87
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/0/crs",
88
+ "properties": {
89
+ "type": {
90
+ "enum": ["link"],
91
+ "description": "A CRS object may link to CRS parameters on the Web. In this case, the value of its \"type\" member must be the string \"link\"."
92
+ },
93
+ "properties": {
94
+ "$ref": "#/definitions/linkedObject"
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,194 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "geojson.json#",
4
+ "title": "GeoJSON object",
5
+ "description": "GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a geometry, a feature, or a collection of features. \n\nGeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features. \n\nSee http://geojson.org for the full specification.",
6
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement",
7
+ "type": "object",
8
+ "required": ["type"],
9
+ "properties": {
10
+ "crs": {
11
+ "description": "The coordinate reference system (CRS) of a GeoJSON object.",
12
+ "$ref": "crs.json#"
13
+ },
14
+ "bbox": {
15
+ "$ref": "bbox.json#"
16
+ }
17
+ },
18
+ "oneOf": [
19
+ {
20
+ "$ref": "geometry.json#"
21
+ }, {
22
+ "$ref": "#/definitions/geometryCollection"
23
+ }, {
24
+ "$ref": "#/definitions/feature"
25
+ }, {
26
+ "$ref": "#/definitions/featureCollection"
27
+ }
28
+ ],
29
+ "definitions": {
30
+ "geometryCollection": {
31
+ "title": "GeometryCollection",
32
+ "description": "A collection of geometry objects",
33
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/1/geographicElement",
34
+ "translation": {
35
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry"]
36
+ },
37
+ "required": ["geometries"],
38
+ "properties": {
39
+ "type": {
40
+ "enum": ["GeometryCollection"],
41
+ "description": "Type of geometry object."
42
+ },
43
+ "geometries": {
44
+ "type": "array",
45
+ "description": "The set of geometry objects constituting the GeometryCollection.",
46
+ "translation": {
47
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers"]
48
+ },
49
+ "items": {
50
+ "$ref": "geometry.json#"
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "feature": {
56
+ "title": "Feature",
57
+ "type": "object",
58
+ "description": "A GeoJSON object with the type \"Feature\" is a feature object. A feature object has a geometry, properties, and an optional identifier.",
59
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/2/geographicElement/1",
60
+ "required": ["geometry", "properties"],
61
+ "properties": {
62
+ "type": {
63
+ "enum": ["Feature"],
64
+ "description": "Type of GeoJSON object."
65
+ },
66
+ "geometry": {
67
+ "description": "The geometry object associated with the Feature.",
68
+ "oneOf": [
69
+ {
70
+ "type": "null",
71
+ "title": "null geometry",
72
+ "description": "A feature object with no associated geometry. For example, a null value may be used when defining a bounding box only."
73
+ }, {
74
+ "$ref": "geometry.json#"
75
+ }
76
+ ]
77
+ },
78
+ "properties": {
79
+ "$ref": "#/definitions/featureProperties"
80
+ },
81
+ "id": {
82
+ "type": ["string", "number"],
83
+ "description": "Unique identifier for the GeoJSON feature object.",
84
+ "translation": {
85
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > [Point, LineString, Polygon] @id"]
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "featureCollection": {
91
+ "title": "FeatureCollection",
92
+ "type": "object",
93
+ "description": "A GeoJSON object comprised of multiple Feature objects.",
94
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/3/geographicElement/0",
95
+ "required": ["features"],
96
+ "properties": {
97
+ "type": {
98
+ "enum": ["FeatureCollection"],
99
+ "description": "Type of GeoJSON object."
100
+ },
101
+ "properties": {
102
+ "$ref": "#/definitions/featureProperties"
103
+ },
104
+ "id": {
105
+ "type": ["string", "number"],
106
+ "description": "Unique identifier for the GeoJSON object.",
107
+ "translation": {
108
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > [Point, LineString, Polygon] @id"]
109
+ }
110
+ },
111
+ "features": {
112
+ "type": "array",
113
+ "description": "Set of Features constituting the FeatureCollection.",
114
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/2/geographicElement",
115
+ "translation": {
116
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > MultiGeometry"]
117
+ },
118
+ "items": {
119
+ "$ref": "#/definitions/feature"
120
+ }
121
+ }
122
+ }
123
+ },
124
+ "featureProperties": {
125
+ "title": "FeatureProperties",
126
+ "description": "JSON object containing information about a feature or collection.",
127
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/2/geographicElement/1",
128
+ "oneOf": [
129
+ {
130
+ "title": "null",
131
+ "type": "null",
132
+ "description": "A feature object with no identified properties."
133
+ }, {
134
+ "type": "object",
135
+ "title": "featureProperties",
136
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/2/geographicElement/1",
137
+ "properties": {
138
+ "includesData": {
139
+ "type": "boolean",
140
+ "description": "A boolean indicating whether geographic object is defining an extent, or used to describe an area of exception, such as \"holes\" in polygons.",
141
+ "translation": {
142
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_GeographicBoundingBox > extentTypeCode", "EX_Extent > geographicElement > EX_BoundingPolygon > extentTypeCode"]
143
+ }
144
+ },
145
+ "temporalElement": {
146
+ "description": "The temporal reference associated with an feature.",
147
+ "$ref": "../extent.json#/definitions/temporalElement"
148
+ },
149
+ "verticalElement": {
150
+ "type": "array",
151
+ "description": "The vertical extent of the feature geometry.",
152
+ "items": {
153
+ "$ref": "../extent.json#/definitions/verticalExtent"
154
+ }
155
+ },
156
+ "description": {
157
+ "type": "string",
158
+ "description": "A description of the feature.",
159
+ "translation": {
160
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > [Point, LineString, Polygon] > description"]
161
+ }
162
+ },
163
+ "featureName": {
164
+ "type": "string",
165
+ "description": "A title associated with a feature.",
166
+ "translation": {
167
+ "ISO 19115-2": ["geographicElement > EX_BoundingPolygon > polygon > [Point, LineString, Polygon] > name"]
168
+ }
169
+ },
170
+ "featureScope": {
171
+ "type": "string",
172
+ "description": "Scope of the geographic feature."
173
+ },
174
+ "featureAcquisitionMethod": {
175
+ "type": "string",
176
+ "description": "Method used to establish the position of the geographic feature. "
177
+ },
178
+ "identifier": {
179
+ "type": "array",
180
+ "description": "Identifier for the geographic element with optional cited authority.",
181
+ "translation": {
182
+ "ISO 19115-2": ["geographicElement > EX_GeographicDescription > geographicIdentifier > MD_Identifier"]
183
+ },
184
+ "items": {
185
+ "$ref": "../citation.json#/definitions/identifier"
186
+ }
187
+ }
188
+ }
189
+ }
190
+ ]
191
+ }
192
+ }
193
+ }
194
+
@@ -0,0 +1,203 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "id": "geometry.json#",
4
+ "title": "geometry",
5
+ "description": "A geometry is a GeoJSON object where the type member's value is one of the following strings: \"Point\", \"MultiPoint\", \"LineString\", \"MultiLineString\", \"Polygon\", \"MultiPolygon\", or \"GeometryCollection\".\n\nA GeoJSON geometry object of any type other than \"GeometryCollection\" must have a member with the name \"coordinates\". The value of the coordinates member is always an array. The structure for the elements in this array is determined by the type of geometry.",
6
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement",
7
+ "translation": {
8
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > [Point | LineString | Polygon > [interior | exterior] | MultiGeometry]"]
9
+ },
10
+ "type": "object",
11
+ "required": ["type", "coordinates"],
12
+ "oneOf": [
13
+ {
14
+ "title": "Point",
15
+ "type": "object",
16
+
17
+ "description": "A point geometry object.",
18
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/0",
19
+ "translation": {
20
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > Point"]
21
+ },
22
+ "properties": {
23
+ "type": {
24
+ "enum": ["Point"],
25
+ "description": "Type of geometry object."
26
+ },
27
+ "coordinates": {
28
+ "description": "The position representing a point, represented by an array of numbers following x, y, z order (easting, northing, altitude for coordinates in a projected coordinate reference system, or longitude, latitude, altitude for coordinates in a geographic coordinate reference system).",
29
+ "translation": {
30
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > Point > coordinates"]
31
+ },
32
+ "$ref": "#/definitions/position"
33
+ }
34
+ }
35
+ }, {
36
+ "title": "MultiPoint",
37
+ "type": "object",
38
+
39
+ "description": "A geographic object comprised of multiple points.",
40
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/3",
41
+ "translation": {
42
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > Point[ ]"]
43
+ },
44
+ "properties": {
45
+ "type": {
46
+ "enum": ["MultiPoint"],
47
+ "description": "Type of geometry object."
48
+ },
49
+ "coordinates": {
50
+ "description": "The set of positions that constitute the MultiPoint geometry.",
51
+ "translation": {
52
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > Point[ ] > coordinates"]
53
+ },
54
+ "$ref": "#/definitions/positionArray"
55
+ }
56
+ }
57
+ }, {
58
+ "title": "LineString",
59
+ "type": "object",
60
+ "description": "A geometry object comprised of a minimum of two positions.",
61
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/1",
62
+ "translation": {
63
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > LineString"]
64
+ },
65
+ "properties": {
66
+ "type": {
67
+ "enum": ["LineString"],
68
+ "description": "Type of geometry object."
69
+ },
70
+ "coordinates": {
71
+ "description": "The set of positions that constitute the LineString geometry.",
72
+ "translation": {
73
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > LineString > coordinates"]
74
+ },
75
+ "$ref": "#/definitions/lineString"
76
+ }
77
+ }
78
+ }, {
79
+ "title": "MultiLineString",
80
+ "type": "object",
81
+ "description": "A geometry object comprised of one or more LineStrings.",
82
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/4",
83
+ "translation": {
84
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > LineString[ ]"]
85
+ },
86
+ "properties": {
87
+ "type": {
88
+ "enum": ["MultiLineString"],
89
+ "description": "Type of geometry object."
90
+ },
91
+ "coordinates": {
92
+ "type": "array",
93
+ "description": "The set of LineString(s) that constitute the MultiLineString.",
94
+ "translation": {
95
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > LineString[ ] > coordinates"]
96
+ },
97
+ "items": {
98
+ "$ref": "#/definitions/lineString"
99
+ }
100
+ }
101
+ }
102
+ }, {
103
+ "title": "Polygon",
104
+ "type": "object",
105
+ "description": "A geometry object that is composed of a set of LinearRings. A LinearRing is a closed LineString with 4 or more positions. The first and last positions are equivalent (they represent equivalent points).\n\nFor Polygons with multiple rings, the first must be the exterior ring and any others must be interior rings or holes.",
106
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/2",
107
+ "translation": {
108
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > Polygon"]
109
+ },
110
+ "properties": {
111
+ "type": {
112
+ "enum": ["Polygon"],
113
+ "description": "Type of geometry object."
114
+ },
115
+ "coordinates": {
116
+ "$ref": "#/definitions/polygon"
117
+ }
118
+ }
119
+ }, {
120
+ "title": "MultiPolygon",
121
+ "type": "object",
122
+ "description": "A geometry object comprised of multiple polygons. ",
123
+ "example": "../../../examples/full_example.json#/metadata/resourceInfo/extent/0/geographicElement/5",
124
+ "translation": {
125
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > Polygon[ ]"]
126
+ },
127
+ "properties": {
128
+ "type": {
129
+ "enum": ["MultiPolygon"],
130
+ "description": "Type of geometry object."
131
+ },
132
+ "coordinates": {
133
+ "type": "array",
134
+ "description": "The set of Polygons that constitute the MultiPolygon.",
135
+ "translation": {
136
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > MultiGeometry > geometryMembers > Polygon[ ] > [exterior > LinearRing > coordinates | interior[ ] > LinearRing > coordinates]"]
137
+ },
138
+ "items": {
139
+ "$ref": "#/definitions/polygon"
140
+ }
141
+ }
142
+ }
143
+ }
144
+ ],
145
+ "definitions": {
146
+ "position": {
147
+ "title": "position",
148
+ "description": "A position is the fundamental geometry construct. A position is represented by an array of numbers following x, y, z order (easting, northing, altitude for coordinates in a projected coordinate reference system, or longitude, latitude, altitude for coordinates in a geographic coordinate reference system).",
149
+ "type": "array",
150
+ "minItems": 2,
151
+ "items": {
152
+ "type": "number"
153
+ }
154
+ ,
155
+ "additionalItems": false
156
+ },
157
+ "positionArray": {
158
+ "title": "positionArray",
159
+ "description": "An array of positions",
160
+ "type": "array",
161
+ "items": {
162
+ "$ref": "#/definitions/position"
163
+ }
164
+ },
165
+ "lineString": {
166
+ "title": "lineString",
167
+ "description": "An array of two or more positions",
168
+ "allOf": [
169
+ {
170
+ "$ref": "#/definitions/positionArray"
171
+ }, {
172
+ "title": "minimum 2",
173
+ "description": "The LineString must consist of two or more positions",
174
+ "minItems": 2
175
+ }
176
+ ]
177
+ },
178
+ "linearRing": {
179
+ "title": "LinearRing",
180
+ "description": "An array of a minimum of four positions where the first equals the last",
181
+ "allOf": [
182
+ {
183
+ "$ref": "#/definitions/positionArray"
184
+ }, {
185
+ "title": "minimum 4",
186
+ "description": "A LinearRing is a closed LineString with 4 or more positions.",
187
+ "minItems": 4
188
+ }
189
+ ]
190
+ },
191
+ "polygon": {
192
+ "title": "Polygon",
193
+ "description": "A set of LinearRings that constitute a Polygon geometry. For Polygons with multiple rings, the first must be the exterior ring and any others must be interior rings or holes.",
194
+ "translation": {
195
+ "ISO 19115-2": ["EX_Extent > geographicElement > EX_BoundingPolygon > polygon > Polygon > [exterior > LinearRing > coordinates | interior[ ] > LinearRing > coordinates]"]
196
+ },
197
+ "type": "array",
198
+ "items": {
199
+ "$ref": "#/definitions/linearRing"
200
+ }
201
+ }
202
+ }
203
+ }