adiwg-mdtranslator 2.13.3 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +3 -3
  3. data/CHANGELOG.md +11 -4
  4. data/Rakefile +14 -14
  5. data/adiwg-mdtranslator.gemspec +3 -3
  6. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +14 -14
  7. data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_equalArcSecond.rb +69 -0
  8. data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_other.rb +42 -0
  9. data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_statePlane.rb +87 -0
  10. data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_ups.rb +58 -0
  11. data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_utm.rb +58 -0
  12. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +7 -7
  13. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +6 -6
  14. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +23 -22
  15. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +7 -7
  16. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +6 -6
  17. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +7 -7
  18. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +6 -6
  19. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +7 -7
  20. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +6 -6
  21. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +7 -7
  22. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +5 -5
  23. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +4 -4
  24. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +8 -8
  25. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +6 -6
  26. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +20 -20
  27. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +8 -8
  28. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +6 -6
  29. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +5 -5
  30. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +5 -5
  31. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +6 -6
  32. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +6 -6
  33. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +7 -7
  34. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +5 -5
  35. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geodeticReference.rb +15 -7
  36. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geographicResolution.rb +6 -3
  37. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +8 -6
  38. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +1 -1
  39. data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_mapLocalPlanar.rb → module_localPlanar.rb} +16 -8
  40. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_localSystem.rb +23 -8
  41. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +21 -144
  42. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapProjection.rb +48 -3
  43. data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_mapCoordinateInfo.rb → module_planarCoordinateInfo.rb} +23 -11
  44. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonomy.rb +1 -1
  45. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +5 -2
  46. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +6 -2
  47. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml +20 -5
  48. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geodetic.rb +41 -8
  49. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_localProjection.rb +57 -0
  50. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +6 -6
  51. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +36 -53
  52. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +1 -1
  53. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomy.rb +39 -13
  54. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +20 -8
  55. data/lib/adiwg/mdtranslator/version.rb +11 -1
  56. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb +8 -7
  57. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geographicResolution.rb +1 -1
  58. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_localPlanar.rb +63 -0
  59. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb +30 -15
  60. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_mapProjectionTags.rb +164 -109
  61. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarGrid.rb +60 -61
  62. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarInfo.rb +12 -12
  63. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarMap.rb +87 -99
  64. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarReference.rb +16 -41
  65. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialReference.rb +12 -11
  66. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomy.rb +9 -4
  67. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomySystem.rb +2 -3
  68. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_verticalDatum.rb +8 -7
  69. data/lib/adiwg/mdtranslator/writers/fgdc/fgdc_writer_messages_eng.yml +13 -6
  70. data/lib/adiwg/mdtranslator/writers/html/sections/html_geodeticParameters.rb +16 -30
  71. data/lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb +8 -0
  72. data/lib/adiwg/mdtranslator/writers/html/sections/html_obliqueLinePoint.rb +4 -4
  73. data/lib/adiwg/mdtranslator/writers/html/sections/html_projectionParameters.rb +68 -57
  74. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +11 -6
  75. data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialReference.rb +9 -0
  76. data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +13 -12
  77. data/lib/adiwg/mdtranslator/writers/html/sections/html_usage.rb +3 -3
  78. data/lib/adiwg/mdtranslator/writers/html/sections/html_verticalDatumParameters.rb +9 -15
  79. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_crs.rb +12 -15
  80. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +9 -8
  81. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_obliqueLinePoint.rb +6 -6
  82. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +2 -1
  83. data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +21 -10
  84. data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +4 -0
  85. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geodeticParameters.rb +2 -3
  86. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_identifier.rb +4 -2
  87. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_localProjection.rb +31 -0
  88. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb +2 -2
  89. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +5 -9
  90. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb +6 -5
  91. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +2 -2
  92. data/lib/adiwg/mdtranslator/writers/sbJson/sbJson_writer.rb +10 -0
  93. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +21 -0
  94. metadata +17 -10
  95. data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarLocal.rb +0 -42
@@ -86,8 +86,8 @@ messageList:
86
86
  - {id: 183, message: "keywords are missing"}
87
87
  - {id: 184, message: "access constraint is missing"}
88
88
  - {id: 185, message: "use constraint is missing"}
89
- - {id: 186, message: "multiple taxonomic structures were specified, CSDGM allows for only one"}
90
- - {id: 187, message: "the first taxonomic structure was written to the metadata record"}
89
+ - {id: 186, message: "multiple taxonomies were specified, CSDGM allows only one"}
90
+ - {id: 187, message: "the first taxonomy was written to the metadata record"}
91
91
 
92
92
  - {id: 190, message: "keyword set thesaurus is missing"}
93
93
 
@@ -110,8 +110,9 @@ messageList:
110
110
  - {id: 240, message: "lineage process step description is missing"}
111
111
  - {id: 241, message: "lineage process step process date is missing"}
112
112
 
113
- - {id: 250, message: "local coordinate system description is missing"}
114
- - {id: 251, message: "local coordinate system georeference information is missing"}
113
+ - {id: 250, message: "local coordinate system object is empty"}
114
+ - {id: 251, message: "local coordinate system description is missing"}
115
+ - {id: 252, message: "local coordinate system georeference information is missing"}
115
116
 
116
117
  - {id: 260, message: "planar coordinate information encoding method is missing"}
117
118
  - {id: 261, message: "coordinate representation abscissa resolution is missing"}
@@ -147,13 +148,13 @@ messageList:
147
148
  - {id: 299, message: "map projection landsat number is missing"}
148
149
  - {id: 300, message: "map projection landsat path is missing"}
149
150
  - {id: 301, message: "map projection other projection description is missing"}
150
- - {id: 302, message: "map projection local planar description is missing"}
151
- - {id: 303, message: "map projection local planar georeference information is missing"}
151
+ - {id: 302, message: "map projection oblique line point must have two points"}
152
152
 
153
153
  - {id: 310, message: "map grid universal transverse mercator zone is missing"}
154
154
  - {id: 311, message: "map grid universal polar stereographic zone is missing"}
155
155
  - {id: 312, message: "map grid state plane coordinate system zone is missing"}
156
156
  - {id: 313, message: "map grid equal arc-second coordinate system zone is missing"}
157
+ - {id: 314, message: "map grid description is missing"}
157
158
 
158
159
  - {id: 320, message: "metadata creation date is missing"}
159
160
  - {id: 321, message: "metadata contact is missing"}
@@ -182,6 +183,8 @@ messageList:
182
183
  - {id: 392, message: "status section is missing"}
183
184
 
184
185
  - {id: 400, message: "taxonomic classification is missing"}
186
+ - {id: 401, message: "multiple taxonomic classifications were specified, CSDGM supports only one"}
187
+ - {id: 402, message: "the first taxonomic classification was written to the metadata record"}
185
188
 
186
189
  - {id: 410, message: "taxonomic classification taxon rank is missing"}
187
190
  - {id: 411, message: "taxonomic classification taxon value (latin name) is missing"}
@@ -211,3 +214,7 @@ messageList:
211
214
  - {id: 465, message: "vertical altitude resolution is missing"}
212
215
  - {id: 466, message: "vertical altitude units of measure is missing"}
213
216
  - {id: 467, message: "vertical altitude encoding method is missing"}
217
+
218
+ - {id: 470, message: "map projection local object is empty"}
219
+ - {id: 471, message: "map projection local planar description is missing"}
220
+ - {id: 472, message: "map projection local planar georeference information is missing"}
@@ -22,18 +22,24 @@ module ADIWG
22
22
  # classes used
23
23
  identifierClass = Html_Identifier.new(@html)
24
24
 
25
- # geodetic parameters - datum name
26
- unless hGeodetic[:datumName].nil?
27
- @html.em('Datum Name: ')
28
- @html.text!(hGeodetic[:datumName])
29
- @html.br
25
+ # geodetic parameters - datum identifier
26
+ unless hGeodetic[:datumIdentifier].empty?
27
+ @html.details do
28
+ @html.summary('Datum Identifier', {'id' => 'datum-identifier', 'class' => 'h5'})
29
+ @html.section(:class => 'block') do
30
+ identifierClass.writeHtml(hGeodetic[:datumIdentifier])
31
+ end
32
+ end
30
33
  end
31
34
 
32
- # geodetic parameters - ellipsoid name
33
- unless hGeodetic[:ellipsoidName].nil?
34
- @html.em('Ellipsoid Name: ')
35
- @html.text!(hGeodetic[:ellipsoidName])
36
- @html.br
35
+ # geodetic parameters - ellipsoid identifier
36
+ unless hGeodetic[:ellipsoidIdentifier].empty?
37
+ @html.details do
38
+ @html.summary('Ellipsoid Identifier', {'id' => 'ellipsoid-identifier', 'class' => 'h5'})
39
+ @html.section(:class => 'block') do
40
+ identifierClass.writeHtml(hGeodetic[:ellipsoidIdentifier])
41
+ end
42
+ end
37
43
  end
38
44
 
39
45
  # geodetic parameters - semi-major axis
@@ -56,26 +62,6 @@ module ADIWG
56
62
  @html.text!(hGeodetic[:denominatorOfFlatteningRatio].to_s)
57
63
  end
58
64
 
59
- # geodetic parameters - ellipsoid identifier
60
- unless hGeodetic[:ellipsoidIdentifier].empty?
61
- @html.details do
62
- @html.summary('Ellipsoid Identifier', {'id' => 'ellipsoid-identifier', 'class' => 'h5'})
63
- @html.section(:class => 'block') do
64
- identifierClass.writeHtml(hGeodetic[:ellipsoidIdentifier])
65
- end
66
- end
67
- end
68
-
69
- # geodetic parameters - datum identifier
70
- unless hGeodetic[:datumIdentifier].empty?
71
- @html.details do
72
- @html.summary('Datum Identifier', {'id' => 'datum-identifier', 'class' => 'h5'})
73
- @html.section(:class => 'block') do
74
- identifierClass.writeHtml(hGeodetic[:datumIdentifier])
75
- end
76
- end
77
- end
78
-
79
65
  end # writeHtml
80
66
  end # Html_ProjectionParameters
81
67
 
@@ -2,6 +2,7 @@
2
2
  # identifier
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-10-17 added 'name' to support projection identifiers
5
6
  # Stan Smith 2017-03-23 refactor for mdTranslator 2.0
6
7
  # Stan Smith 2015-08-21 expanded to handle RS_Identifier
7
8
  # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
@@ -46,6 +47,13 @@ module ADIWG
46
47
  @html.br
47
48
  end
48
49
 
50
+ # identifier - name (only in spatial reference system projection)
51
+ unless hIdentifier[:name].nil?
52
+ @html.em(' Name:')
53
+ @html.text!(hIdentifier[:name])
54
+ @html.br
55
+ end
56
+
49
57
  # identifier - description
50
58
  unless hIdentifier[:description].nil?
51
59
  @html.em(' Description:')
@@ -17,13 +17,13 @@ module ADIWG
17
17
  lat = 'missing'
18
18
 
19
19
  # oblique line point - point latitude
20
- unless hLinePoint[:azimuthLineLatitude].nil?
21
- long = hLinePoint[:azimuthLineLatitude].to_s
20
+ unless hLinePoint[:obliqueLineLatitude].nil?
21
+ long = hLinePoint[:obliqueLineLatitude].to_s
22
22
  end
23
23
 
24
24
  # oblique line point - point longitude
25
- unless hLinePoint[:azimuthLineLongitude].nil?
26
- lat = hLinePoint[:azimuthLineLongitude].to_s
25
+ unless hLinePoint[:obliqueLineLongitude].nil?
26
+ lat = hLinePoint[:obliqueLineLongitude].to_s
27
27
  end
28
28
 
29
29
  return '( Longitude: ' + long + ', Latitude: ' + lat + ' )'
@@ -2,6 +2,7 @@
2
2
  # spatial reference system projection parameters
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-10-17 refactor for mdJson schema 2.6.0
5
6
  # Stan Smith 2017-10-24 original script
6
7
 
7
8
  require_relative 'html_identifier'
@@ -24,18 +25,24 @@ module ADIWG
24
25
  identifierClass = Html_Identifier.new(@html)
25
26
  linePointClass = Html_ObliqueLinePoint.new()
26
27
 
27
- # projection parameters - grid system
28
- unless hProjection[:gridSystem].nil?
29
- @html.em('Grid System: ')
30
- @html.text!(hProjection[:gridSystem])
31
- @html.br
28
+ # projection parameters - projection identifier
29
+ unless hProjection[:projectionIdentifier].empty?
30
+ @html.details do
31
+ @html.summary('Projection Identifier', {'id' => 'projection-identifier', 'class' => 'h5'})
32
+ @html.section(:class => 'block') do
33
+ identifierClass.writeHtml(hProjection[:projectionIdentifier])
34
+ end
35
+ end
32
36
  end
33
37
 
34
- # projection parameters - grid system name
35
- unless hProjection[:gridSystemName].nil?
36
- @html.em('Grid System Name: ')
37
- @html.text!(hProjection[:gridSystemName])
38
- @html.br
38
+ # projection parameters - grid system identifier
39
+ unless hProjection[:gridIdentifier].empty?
40
+ @html.details do
41
+ @html.summary('Grid System Identifier', {'id' => 'grid-system-identifier', 'class' => 'h5'})
42
+ @html.section(:class => 'block') do
43
+ identifierClass.writeHtml(hProjection[:gridIdentifier])
44
+ end
45
+ end
39
46
  end
40
47
 
41
48
  # projection parameters - zone
@@ -45,20 +52,6 @@ module ADIWG
45
52
  @html.br
46
53
  end
47
54
 
48
- # projection parameters - projection
49
- unless hProjection[:projection].nil?
50
- @html.em('Projection: ')
51
- @html.text!(hProjection[:projection])
52
- @html.br
53
- end
54
-
55
- # projection parameters - projection name
56
- unless hProjection[:projectionName].nil?
57
- @html.em('Projection Name: ')
58
- @html.text!(hProjection[:projectionName])
59
- @html.br
60
- end
61
-
62
55
  # projection parameters - Standard Parallel 1
63
56
  unless hProjection[:standardParallel1].nil?
64
57
  @html.em('Standard Parallel: ')
@@ -199,48 +192,66 @@ module ADIWG
199
192
  @html.br
200
193
  end
201
194
 
202
- # projection parameters - local planar description
203
- unless hProjection[:localPlanarDescription].nil?
204
- @html.em('Local Planar Description: ')
205
- @html.section(:class => 'block') do
206
- @html.text!(hProjection[:localPlanarDescription])
207
- end
208
- end
195
+ # projection parameters - local
196
+ unless hProjection[:local].empty?
197
+ hLocal = hProjection[:local]
209
198
 
210
- # projection parameters - local planar georeference
211
- unless hProjection[:localPlanarGeoreference].nil?
212
- @html.em('Local Planar Georeference: ')
213
- @html.section(:class => 'block') do
214
- @html.text!(hProjection[:localPlanarGeoreference])
215
- end
216
- end
199
+ # local fixed to earth
200
+ @html.em('Local Coordinate System Fixed to Earth: ')
201
+ @html.text!(hLocal[:fixedToEarth].to_s)
202
+ @html.br
217
203
 
218
- # projection parameters - other grid description
219
- unless hProjection[:otherGridDescription].nil?
220
- @html.em('Other Grid Description: ')
221
- @html.section(:class => 'block') do
222
- @html.text!(hProjection[:otherGridDescription])
204
+ # local description
205
+ unless hLocal[:description].nil?
206
+ @html.em('Local Coordinate System Description: ')
207
+ @html.section(:class => 'block') do
208
+ @html.text!(hLocal[:description])
209
+ end
223
210
  end
224
- end
225
211
 
226
- # projection parameters - other projection description
227
- unless hProjection[:otherProjectionDescription].nil?
228
- @html.em('Other Projection Description: ')
229
- @html.section(:class => 'block') do
230
- @html.text!(hProjection[:otherProjectionDescription])
231
- end
232
- end
233
-
234
- # projection parameters - projection identifier
235
- unless hProjection[:projectionIdentifier].empty?
236
- @html.details do
237
- @html.summary('Projection Identifier', {'id' => 'projection-identifier', 'class' => 'h5'})
212
+ # local georeference
213
+ unless hLocal[:georeference].nil?
214
+ @html.em('Local Coordinate System Georeference: ')
238
215
  @html.section(:class => 'block') do
239
- identifierClass.writeHtml(hProjection[:projectionIdentifier])
216
+ @html.text!(hLocal[:georeference])
240
217
  end
241
218
  end
219
+
242
220
  end
243
221
 
222
+
223
+ # # projection parameters - local planar description
224
+ # unless hProjection[:localPlanarDescription].nil?
225
+ # @html.em('Local Planar Description: ')
226
+ # @html.section(:class => 'block') do
227
+ # @html.text!(hProjection[:localPlanarDescription])
228
+ # end
229
+ # end
230
+ #
231
+ # # projection parameters - local planar georeference
232
+ # unless hProjection[:localPlanarGeoreference].nil?
233
+ # @html.em('Local Planar Georeference: ')
234
+ # @html.section(:class => 'block') do
235
+ # @html.text!(hProjection[:localPlanarGeoreference])
236
+ # end
237
+ # end
238
+ #
239
+ # # projection parameters - other grid description
240
+ # unless hProjection[:otherGridDescription].nil?
241
+ # @html.em('Other Grid Description: ')
242
+ # @html.section(:class => 'block') do
243
+ # @html.text!(hProjection[:otherGridDescription])
244
+ # end
245
+ # end
246
+ #
247
+ # # projection parameters - other projection description
248
+ # unless hProjection[:otherProjectionDescription].nil?
249
+ # @html.em('Other Projection Description: ')
250
+ # @html.section(:class => 'block') do
251
+ # @html.text!(hProjection[:otherProjectionDescription])
252
+ # end
253
+ # end
254
+
244
255
  end # writeHtml
245
256
  end # Html_ProjectionParameters
246
257
 
@@ -2,6 +2,7 @@
2
2
  # resource information
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-10-17 refactor for mdJson schema 2.6.0
5
6
  # Stan Smith 2018-04-06 changed taxonomy to an array
6
7
  # Stan Smith 2017-05-19 removed iso topicCategory (now presented as keywords)
7
8
  # Stan Smith 2017-03-25 refactored for mdTranslator 2.0
@@ -91,17 +92,20 @@ module ADIWG
91
92
  # short abstract
92
93
  unless hResource[:shortAbstract].nil?
93
94
  @html.em('Short Abstract:')
94
- @html.br
95
- @html.text!(hResource[:shortAbstract])
96
- @html.br
95
+ @html.section(:class => 'block') do
96
+ @html.text!(hResource[:shortAbstract])
97
+ end
97
98
  @html.br
98
99
  end
99
100
 
100
101
  # full abstract
101
102
  unless hResource[:abstract].nil?
102
103
  @html.em('Full Abstract:')
104
+ @html.section(:class => 'block') do
105
+ @html.text!(hResource[:abstract])
106
+ end
103
107
  @html.br
104
- @html.text!(hResource[:abstract])
108
+
105
109
  end
106
110
 
107
111
  end
@@ -117,8 +121,9 @@ module ADIWG
117
121
  # purpose
118
122
  unless hResource[:purpose].nil?
119
123
  @html.em('Purpose:')
120
- @html.br
121
- @html.text!(hResource[:purpose])
124
+ @html.section(:class => 'block') do
125
+ @html.text!(hResource[:purpose])
126
+ end
122
127
  @html.br
123
128
  end
124
129
 
@@ -2,6 +2,7 @@
2
2
  # spatial reference system
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-10-17 refactor for mdJson schema 2.6.0
5
6
  # Stan Smith 2017-10-24 add reference system parameter set
6
7
  # Stan Smith 2017-03-27 original script
7
8
 
@@ -32,6 +33,14 @@ module ADIWG
32
33
  @html.br
33
34
  end
34
35
 
36
+ # spatial reference - WKT
37
+ unless hSpaceRef[:systemWKT].nil?
38
+ @html.em('System Well Know Text (WKT)')
39
+ @html.section(:class => 'block') do
40
+ @html.text!(hSpaceRef[:systemWKT])
41
+ end
42
+ end
43
+
35
44
  # spatial reference - identifier {identifier}
36
45
  unless hSpaceRef[:systemIdentifier].empty?
37
46
  @html.details do
@@ -2,7 +2,8 @@
2
2
  # taxonomy
3
3
 
4
4
  # History:
5
- # Stan Smith 2015-03-30 refactored for mdTranslator 2.0
5
+ # Stan Smith 2018-10-19 refactored for mdJson schema 2.6.0
6
+ # Stan Smith 2017-03-30 refactored for mdTranslator 2.0
6
7
  # Stan Smith 2015-07-16 refactored to remove global namespace $HtmlNS
7
8
  # Stan Smith 2015-03-25 original script
8
9
 
@@ -38,16 +39,6 @@ module ADIWG
38
39
  end
39
40
  end
40
41
 
41
- # taxonomy - taxonomic class
42
- unless hTaxonomy[:taxonClass].empty?
43
- @html.details do
44
- @html.summary('Taxonomic Classification', {'class' => 'h5'})
45
- @html.section(:class => 'block') do
46
- taxonomicClass.writeHtml(hTaxonomy[:taxonClass])
47
- end
48
- end
49
- end
50
-
51
42
  # taxonomy - identification procedures
52
43
  unless hTaxonomy[:idProcedure].nil?
53
44
  @html.em('Identification Procedures: ')
@@ -64,6 +55,16 @@ module ADIWG
64
55
  end
65
56
  end
66
57
 
58
+ # taxonomy - taxonomic classification []
59
+ hTaxonomy[:taxonClasses].each do |hClassification|
60
+ @html.details do
61
+ @html.summary('Taxonomic Classification', {'class' => 'h5'})
62
+ @html.section(:class => 'block') do
63
+ taxonomicClass.writeHtml(hClassification)
64
+ end
65
+ end
66
+ end
67
+
67
68
  # taxonomy - taxonomic classification system [] {citation}
68
69
  hTaxonomy[:taxonSystem].each do |hSystem|
69
70
  @html.details do
@@ -95,7 +96,7 @@ module ADIWG
95
96
  @html.details do
96
97
  @html.summary('Non-Authoritative Reference', {'class' => 'h5'})
97
98
  @html.section(:class => 'block') do
98
- identifierClass.writeHtml(hReference)
99
+ citationClass.writeHtml(hReference)
99
100
  end
100
101
  end
101
102
  end
@@ -30,9 +30,9 @@ module ADIWG
30
30
 
31
31
  # resource usage - use
32
32
  @html.em('Usage: ')
33
- @html.br
34
- @html.text!(hUsage[:specificUsage])
35
- @html.br
33
+ @html.section(:class => 'block') do
34
+ @html.text!(hUsage[:specificUsage])
35
+ end
36
36
 
37
37
  # resource usage - temporal extent
38
38
  unless hUsage[:temporalExtents].empty?
@@ -2,6 +2,7 @@
2
2
  # spatial reference system vertical datum parameters
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-09-26 deprecated verticalDatum.datumName
5
6
  # Stan Smith 2017-10-24 original script
6
7
 
7
8
  require_relative 'html_identifier'
@@ -30,11 +31,14 @@ module ADIWG
30
31
  end
31
32
  @html.br
32
33
 
33
- # vertical datum - datum name
34
- unless hDatum[:datumName].nil?
35
- @html.em('Datum Name: ')
36
- @html.text!(hDatum[:datumName])
37
- @html.br
34
+ # vertical datum parameters - vertical datum identifier
35
+ unless hDatum[:datumIdentifier].empty?
36
+ @html.details do
37
+ @html.summary('Vertical Datum Identifier', {'id' => 'datum-identifier', 'class' => 'h5'})
38
+ @html.section(:class => 'block') do
39
+ identifierClass.writeHtml(hDatum[:datumIdentifier])
40
+ end
41
+ end
38
42
  end
39
43
 
40
44
  # vertical datum - encoding method
@@ -57,16 +61,6 @@ module ADIWG
57
61
  @html.text!(hDatum[:unitOfMeasure])
58
62
  end
59
63
 
60
- # vertical datum parameters - vertical datum identifier
61
- unless hDatum[:datumIdentifier].empty?
62
- @html.details do
63
- @html.summary('Vertical Datum Identifier', {'id' => 'datum-identifier', 'class' => 'h5'})
64
- @html.section(:class => 'block') do
65
- identifierClass.writeHtml(hDatum[:datumIdentifier])
66
- end
67
- end
68
- end
69
-
70
64
  end # writeHtml
71
65
  end # Html_VerticalDatumParameters
72
66
 
@@ -3,6 +3,7 @@
3
3
  # 19115-2 output for ISO 19115-2 XML
4
4
 
5
5
  # History:
6
+ # Stan Smith 2018-10-17 refactor to support schema 2.6.0 changes to projection
6
7
  # Stan Smith 2017-10-26 original script
7
8
 
8
9
  require_relative 'class_rsIdentifier'
@@ -39,6 +40,8 @@ module ADIWG
39
40
  end
40
41
  if hParamSet[:projection].empty? && @hResponseObj[:writerShowTags]
41
42
  @xml.tag!('gmd:projection')
43
+ elsif hParamSet[:projection][:projectionIdentifier].empty? && @hResponseObj[:writerShowTags]
44
+ @xml.tag!('gmd:projection')
42
45
  end
43
46
 
44
47
  # geodetic ellipsoid identifier {rsIdentifier}
@@ -52,31 +55,22 @@ module ADIWG
52
55
  end
53
56
  if hParamSet[:geodetic].empty? && @hResponseObj[:writerShowTags]
54
57
  @xml.tag!('gmd:ellipsoid')
58
+ elsif hParamSet[:geodetic][:ellipsoidIdentifier].empty? && @hResponseObj[:writerShowTags]
59
+ @xml.tag!('gmd:ellipsoid')
55
60
  end
56
61
 
57
- haveDatum = false
58
- # geodetic datum identifier {rsIdentifier}
62
+ # geodetic datum identifier (horizontal) {rsIdentifier}
59
63
  unless hParamSet[:geodetic].empty?
60
64
  hIdentifier = hParamSet[:geodetic][:datumIdentifier]
61
65
  unless hIdentifier.empty?
62
66
  @xml.tag!('gmd:datum') do
63
67
  idClass.writeXML(hIdentifier, 'CRS geodetic datum')
64
- haveDatum = true
65
68
  end
66
69
  end
67
70
  end
68
-
69
- # vertical datum identifier {rsIdentifier}
70
- unless hParamSet[:verticalDatum].empty?
71
- hIdentifier = hParamSet[:verticalDatum][:datumIdentifier]
72
- unless hIdentifier.empty?
73
- @xml.tag!('gmd:datum') do
74
- idClass.writeXML(hIdentifier, 'CRS vertical datum')
75
- haveDatum = true
76
- end
77
- end
78
- end
79
- if !haveDatum && @hResponseObj[:writerShowTags]
71
+ if hParamSet[:geodetic].empty? && @hResponseObj[:writerShowTags]
72
+ @xml.tag!('gmd:datum')
73
+ elsif hParamSet[:geodetic][:datumIdentifier].empty? && @hResponseObj[:writerShowTags]
80
74
  @xml.tag!('gmd:datum')
81
75
  end
82
76
 
@@ -100,6 +94,9 @@ module ADIWG
100
94
  @xml.tag!('gmd:projectionParameters')
101
95
  end
102
96
 
97
+ # vertical datum identifier {rsIdentifier}
98
+ # mdJSON referenceSystemParameterSet 'verticalDatum' is not used by ISO 19115-2
99
+
103
100
  end # writeXML
104
101
  end # MD_CRS class
105
102
 
@@ -2,6 +2,7 @@
2
2
  # 19115-2 writer output in XML
3
3
 
4
4
  # History:
5
+ # Stan Smith 2018-10-26 refactor for mdJson schema 2.6.0
5
6
  # Stan Smith 2018-05-25 block non-ISO19115-2 topic categories
6
7
  # Stan Smith 2018-04-09 add error and warning messaging
7
8
  # Stan Smith 2018-04-06 changed taxonomy to an array
@@ -89,7 +90,7 @@ module ADIWG
89
90
  hCitation = hData[:citation]
90
91
  unless hCitation.empty?
91
92
  @xml.tag!('gmd:citation') do
92
- citationClass.writeXML(hCitation, 'main resource citation')
93
+ citationClass.writeXML(hCitation, 'main resource')
93
94
  end
94
95
  end
95
96
  if hCitation.empty?
@@ -157,7 +158,7 @@ module ADIWG
157
158
  aParties = hRParty[:parties]
158
159
  aParties.each do |hParty|
159
160
  @xml.tag!('gmd:pointOfContact') do
160
- rPartyClass.writeXML(role, hParty, 'data resource point of contact')
161
+ rPartyClass.writeXML(role, hParty, 'main resource point of contact')
161
162
  end
162
163
  end
163
164
  end
@@ -169,7 +170,7 @@ module ADIWG
169
170
  aMaint = hData[:resourceMaintenance]
170
171
  aMaint.each do |hMaint|
171
172
  @xml.tag!('gmd:resourceMaintenance') do
172
- mInfoClass.writeXML(hMaint, 'data resource')
173
+ mInfoClass.writeXML(hMaint, 'main resource')
173
174
  end
174
175
  end
175
176
  if aMaint.empty? && @hResponseObj[:writerShowTags]
@@ -180,7 +181,7 @@ module ADIWG
180
181
  aGraphics = hData[:graphicOverviews]
181
182
  aGraphics.each do |hGraphic|
182
183
  @xml.tag!('gmd:graphicOverview') do
183
- bGraphicClass.writeXML(hGraphic, 'data resource')
184
+ bGraphicClass.writeXML(hGraphic, 'main resource')
184
185
  end
185
186
  end
186
187
  if aGraphics.empty? && @hResponseObj[:writerShowTags]
@@ -277,14 +278,14 @@ module ADIWG
277
278
  taxClass.writeXML(hTaxonomy)
278
279
  end
279
280
  end
281
+ if hData[:taxonomy].length > 1
282
+ @NameSpace.issueNotice(53, 'main resource')
283
+ @NameSpace.issueNotice(54, 'main resource')
284
+ end
280
285
  end
281
286
  if hData[:taxonomy].empty? && @hResponseObj[:writerShowTags]
282
287
  @xml.tag!('gmd:taxonomy')
283
288
  end
284
- if hData[:taxonomy].length > 1
285
- # - {id: 186, message: "multiple taxonomic structures were specified, CSDGM allows for only one"}
286
- # - {id: 187, message: "the first taxonomic structure was written to the metadata record"}
287
- end
288
289
 
289
290
  # data identification - spatial representation type []
290
291
  aSpatialType = hData[:spatialRepresentationTypes]