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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/CHANGELOG.md +11 -4
- data/Rakefile +14 -14
- data/adiwg-mdtranslator.gemspec +3 -3
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +14 -14
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_equalArcSecond.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_other.rb +42 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_statePlane.rb +87 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_ups.rb +58 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_utm.rb +58 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +23 -22
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +8 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +20 -20
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +8 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +7 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +5 -5
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geodeticReference.rb +15 -7
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_geographicResolution.rb +6 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +8 -6
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_mapLocalPlanar.rb → module_localPlanar.rb} +16 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_localSystem.rb +23 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +21 -144
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapProjection.rb +48 -3
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/{module_mapCoordinateInfo.rb → module_planarCoordinateInfo.rb} +23 -11
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_taxonomy.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +5 -2
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +6 -2
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader_messages_eng.yml +20 -5
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geodetic.rb +41 -8
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_localProjection.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +6 -6
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +36 -53
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +1 -1
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_taxonomy.rb +39 -13
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +20 -8
- data/lib/adiwg/mdtranslator/version.rb +11 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb +8 -7
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_geographicResolution.rb +1 -1
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_localPlanar.rb +63 -0
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb +30 -15
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_mapProjectionTags.rb +164 -109
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarGrid.rb +60 -61
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarInfo.rb +12 -12
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarMap.rb +87 -99
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_planarReference.rb +16 -41
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_spatialReference.rb +12 -11
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomy.rb +9 -4
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_taxonomySystem.rb +2 -3
- data/lib/adiwg/mdtranslator/writers/fgdc/classes/class_verticalDatum.rb +8 -7
- data/lib/adiwg/mdtranslator/writers/fgdc/fgdc_writer_messages_eng.yml +13 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geodeticParameters.rb +16 -30
- data/lib/adiwg/mdtranslator/writers/html/sections/html_identifier.rb +8 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_obliqueLinePoint.rb +4 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_projectionParameters.rb +68 -57
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +11 -6
- data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialReference.rb +9 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_taxonomy.rb +13 -12
- data/lib/adiwg/mdtranslator/writers/html/sections/html_usage.rb +3 -3
- data/lib/adiwg/mdtranslator/writers/html/sections/html_verticalDatumParameters.rb +9 -15
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_crs.rb +12 -15
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_dataIdentification.rb +9 -8
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_obliqueLinePoint.rb +6 -6
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_referenceSystem.rb +2 -1
- data/lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_taxonomy.rb +21 -10
- data/lib/adiwg/mdtranslator/writers/iso19115_2/iso19115_2_writer_messages_eng.yml +4 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geodeticParameters.rb +2 -3
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_identifier.rb +4 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_localProjection.rb +31 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +5 -9
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_taxonomy.rb +6 -5
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/sbJson/sbJson_writer.rb +10 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +21 -0
- metadata +17 -10
- 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
|
90
|
-
- {id: 187, message: "the first
|
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
|
114
|
-
- {id: 251, message: "local coordinate system
|
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
|
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
|
26
|
-
unless hGeodetic[:
|
27
|
-
@html.
|
28
|
-
|
29
|
-
|
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
|
33
|
-
unless hGeodetic[:
|
34
|
-
@html.
|
35
|
-
|
36
|
-
|
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[:
|
21
|
-
long = hLinePoint[:
|
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[:
|
26
|
-
lat = hLinePoint[:
|
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 -
|
28
|
-
unless hProjection[:
|
29
|
-
@html.
|
30
|
-
|
31
|
-
|
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
|
35
|
-
unless hProjection[:
|
36
|
-
@html.
|
37
|
-
|
38
|
-
|
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
|
203
|
-
unless hProjection[:
|
204
|
-
|
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
|
-
|
211
|
-
|
212
|
-
@html.
|
213
|
-
@html.
|
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
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
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
|
-
|
227
|
-
|
228
|
-
|
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
|
-
|
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.
|
95
|
-
|
96
|
-
|
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
|
-
|
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.
|
121
|
-
|
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
|
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
|
-
|
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.
|
34
|
-
|
35
|
-
|
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
|
34
|
-
unless hDatum[:
|
35
|
-
@html.
|
36
|
-
|
37
|
-
|
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
|
-
|
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
|
-
|
70
|
-
|
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
|
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, '
|
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, '
|
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, '
|
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]
|