adiwg-mdtranslator 2.3.5 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +49 -8
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +252 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +56 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +57 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +58 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +47 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +61 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +91 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +60 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +50 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +53 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +54 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +4 -4
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +81 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +167 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapCoordinateInfo.rb +128 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +159 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapLocalSystem.rb +59 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapProjection.rb +195 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialReference.rb +15 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +68 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +68 -0
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalReference.rb +48 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +5 -3
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_bearingDistanceResolution.rb +96 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_citation.rb +126 -126
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coordinateResolution.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_ellipsoid.rb +78 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geographicResolution.rb +66 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +55 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +237 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +69 -0
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialReference.rb +57 -42
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialResolution.rb +101 -51
- data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +89 -0
- data/lib/adiwg/mdtranslator/version.rb +7 -1
- data/lib/adiwg/mdtranslator/writers/html/sections/html_bearingDistanceResolution.rb +68 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_coordinateResolution.rb +47 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicResolution.rb +47 -0
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +48 -7
- data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +2 -2
- data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialResolution.rb +95 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_bearingDistanceResolution.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coordinateResolution.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_ellipsoidParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geographicResolution.rb +29 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb +28 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +57 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReference.rb +2 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReferenceParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialResolution.rb +16 -1
- data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +32 -0
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb +5 -8
- metadata +55 -4
- data/lib/adiwg/mdtranslator/writers/html/sections/html_resolution.rb +0 -54
@@ -0,0 +1,69 @@
|
|
1
|
+
# unpack spatial reference system parameter set
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-23 original script
|
6
|
+
|
7
|
+
require_relative 'module_projectionParameters'
|
8
|
+
require_relative 'module_ellipsoid'
|
9
|
+
require_relative 'module_verticalDatum'
|
10
|
+
|
11
|
+
module ADIWG
|
12
|
+
module Mdtranslator
|
13
|
+
module Readers
|
14
|
+
module MdJson
|
15
|
+
|
16
|
+
module ReferenceSystemParameters
|
17
|
+
|
18
|
+
def self.unpack(hParams, responseObj)
|
19
|
+
|
20
|
+
# return nil object if input is empty
|
21
|
+
if hParams.empty?
|
22
|
+
responseObj[:readerExecutionMessages] << 'Spatial Reference System Parameters object is empty'
|
23
|
+
responseObj[:readerExecutionPass] = false
|
24
|
+
return nil
|
25
|
+
end
|
26
|
+
|
27
|
+
# instance classes needed in script
|
28
|
+
intMetadataClass = InternalMetadata.new
|
29
|
+
intParamSet = intMetadataClass.newReferenceSystemParameterSet
|
30
|
+
|
31
|
+
# reference system parameters - projection parameters
|
32
|
+
if hParams.has_key?('projection')
|
33
|
+
unless hParams['projection'].empty?
|
34
|
+
hReturn = ProjectionParameters.unpack(hParams['projection'], responseObj)
|
35
|
+
unless hReturn.nil?
|
36
|
+
intParamSet[:projection] = hReturn
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
# reference system parameters - ellipsoid parameters
|
42
|
+
if hParams.has_key?('ellipsoid')
|
43
|
+
unless hParams['ellipsoid'].empty?
|
44
|
+
hReturn = Ellipsoid.unpack(hParams['ellipsoid'], responseObj)
|
45
|
+
unless hReturn.nil?
|
46
|
+
intParamSet[:ellipsoid] = hReturn
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
# reference system parameters - vertical datum parameters
|
52
|
+
if hParams.has_key?('verticalDatum')
|
53
|
+
unless hParams['verticalDatum'].empty?
|
54
|
+
hReturn = VerticalDatum.unpack(hParams['verticalDatum'], responseObj)
|
55
|
+
unless hReturn.nil?
|
56
|
+
intParamSet[:verticalDatum] = hReturn
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
return intParamSet
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -2,64 +2,79 @@
|
|
2
2
|
# Reader - ADIwg JSON to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
5
|
+
# Stan Smith 2017-10-23 added reference system parameter set
|
6
|
+
# Stan Smith 2016-10-16 refactored for mdJson 2.0
|
7
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
8
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
9
|
+
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
9
10
|
# Stan Smith 2014-09-03 original script
|
10
11
|
|
11
12
|
require_relative 'module_identifier'
|
13
|
+
require_relative 'module_referenceSystemParameters'
|
12
14
|
|
13
15
|
module ADIWG
|
14
|
-
|
15
|
-
|
16
|
-
|
16
|
+
module Mdtranslator
|
17
|
+
module Readers
|
18
|
+
module MdJson
|
17
19
|
|
18
|
-
|
20
|
+
module SpatialReferenceSystem
|
19
21
|
|
20
|
-
|
22
|
+
def self.unpack(hSpatialRef, responseObj)
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
# return nil object if input is empty
|
25
|
+
if hSpatialRef.empty?
|
26
|
+
responseObj[:readerExecutionMessages] << 'Spatial Reference System object is empty'
|
27
|
+
responseObj[:readerExecutionPass] = false
|
28
|
+
return nil
|
29
|
+
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
31
|
+
# instance classes needed in script
|
32
|
+
intMetadataClass = InternalMetadata.new
|
33
|
+
intSpatialRef = intMetadataClass.newSpatialReferenceSystem
|
32
34
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
35
|
+
# spatial reference system - type
|
36
|
+
if hSpatialRef.has_key?('referenceSystemType')
|
37
|
+
if hSpatialRef['referenceSystemType'] != ''
|
38
|
+
intSpatialRef[:systemType] = hSpatialRef['referenceSystemType']
|
39
|
+
end
|
40
|
+
end
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
end
|
42
|
+
# spatial reference system - reference system {identifier}
|
43
|
+
if hSpatialRef.has_key?('referenceSystemIdentifier')
|
44
|
+
hObject = hSpatialRef['referenceSystemIdentifier']
|
45
|
+
unless hObject.empty?
|
46
|
+
hReturn = Identifier.unpack(hObject, responseObj)
|
47
|
+
unless hReturn.nil?
|
48
|
+
intSpatialRef[:systemIdentifier] = hReturn
|
49
49
|
end
|
50
|
+
end
|
51
|
+
end
|
50
52
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
53
|
+
# spatial reference system - reference system parameters {referenceSystemParameterSet}
|
54
|
+
if hSpatialRef.has_key?('referenceSystemParameterSet')
|
55
|
+
hObject = hSpatialRef['referenceSystemParameterSet']
|
56
|
+
unless hObject.empty?
|
57
|
+
hReturn = ReferenceSystemParameters.unpack(hObject, responseObj)
|
58
|
+
unless hReturn.nil?
|
59
|
+
intSpatialRef[:systemParameterSet] = hReturn
|
55
60
|
end
|
61
|
+
end
|
62
|
+
end
|
56
63
|
|
57
|
-
|
58
|
-
|
64
|
+
if intSpatialRef[:systemType].nil? &&
|
65
|
+
intSpatialRef[:systemIdentifier].empty? &&
|
66
|
+
intSpatialRef[:systemParameterSet].empty?
|
67
|
+
responseObj[:readerExecutionMessages] << 'Spatial Reference System must declare reference system type, identifier, or parameter set'
|
68
|
+
responseObj[:readerExecutionPass] = false
|
69
|
+
return nil
|
70
|
+
end
|
59
71
|
|
60
|
-
|
72
|
+
return intSpatialRef
|
73
|
+
end
|
61
74
|
|
62
75
|
end
|
63
|
-
|
64
|
-
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
65
80
|
end
|
@@ -2,76 +2,126 @@
|
|
2
2
|
# Reader - ADIwg JSON to internal data structure
|
3
3
|
|
4
4
|
# History:
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
5
|
+
# Stan Smith 2017-10-19 add geographic resolution
|
6
|
+
# Stan Smith 2017-10-19 add bearingDistance resolution
|
7
|
+
# Stan Smith 2017-10-19 add coordinate resolution
|
8
|
+
# Stan Smith 2016-10-17 refactored for mdJson 2.0
|
9
|
+
# Stan Smith 2015-07-14 refactored to remove global namespace constants
|
10
|
+
# Stan Smith 2015-06-22 replace global ($response) with passed in object (responseObj)
|
11
|
+
# Stan Smith 2014-12-15 refactored to handle namespacing readers and writers
|
9
12
|
# Stan Smith 2013-11-26 original script
|
10
13
|
|
11
14
|
require_relative 'module_measure'
|
15
|
+
require_relative 'module_coordinateResolution'
|
16
|
+
require_relative 'module_bearingDistanceResolution'
|
17
|
+
require_relative 'module_geographicResolution'
|
12
18
|
|
13
19
|
module ADIWG
|
14
|
-
|
15
|
-
|
16
|
-
|
20
|
+
module Mdtranslator
|
21
|
+
module Readers
|
22
|
+
module MdJson
|
17
23
|
|
18
|
-
|
24
|
+
module SpatialResolution
|
19
25
|
|
20
|
-
|
26
|
+
def self.unpack(hResolution, responseObj)
|
21
27
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
28
|
+
# return nil object if input is empty
|
29
|
+
if hResolution.empty?
|
30
|
+
responseObj[:readerExecutionMessages] << 'Spatial Resolution object is empty'
|
31
|
+
responseObj[:readerExecutionPass] = false
|
32
|
+
return nil
|
33
|
+
end
|
34
|
+
|
35
|
+
# instance classes needed in script
|
36
|
+
intMetadataClass = InternalMetadata.new
|
37
|
+
intResolution = intMetadataClass.newSpatialResolution
|
38
|
+
foundOne = false
|
39
|
+
haveOne = false
|
40
|
+
|
41
|
+
# spatial resolution - scale factor (required if not others)
|
42
|
+
if hResolution.has_key?('scaleFactor')
|
43
|
+
foundOne = true
|
44
|
+
if hResolution['scaleFactor'] != ''
|
45
|
+
intResolution[:scaleFactor] = hResolution['scaleFactor']
|
46
|
+
haveOne = true
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# spatial resolution - measure (required if not others)
|
51
|
+
if hResolution.has_key?('measure')
|
52
|
+
foundOne = true
|
53
|
+
hMeasure = hResolution['measure']
|
54
|
+
unless hMeasure.empty?
|
55
|
+
hObject = Measure.unpack(hMeasure, responseObj)
|
56
|
+
unless hObject.nil?
|
57
|
+
intResolution[:measure] = hObject
|
58
|
+
haveOne = true
|
27
59
|
end
|
60
|
+
end
|
61
|
+
end
|
28
62
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
haveOne = true
|
39
|
-
end
|
63
|
+
# spatial resolution - coordinate resolution (required if not others)
|
64
|
+
if hResolution.has_key?('coordinateResolution')
|
65
|
+
foundOne = true
|
66
|
+
hCoordRes = hResolution['coordinateResolution']
|
67
|
+
unless hCoordRes.empty?
|
68
|
+
hReturn = CoordinateResolution.unpack(hCoordRes, responseObj)
|
69
|
+
unless hReturn.nil?
|
70
|
+
intResolution[:coordinateResolution] = hReturn
|
71
|
+
haveOne = true
|
40
72
|
end
|
73
|
+
end
|
74
|
+
end
|
41
75
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
end
|
76
|
+
# spatial resolution - bearing distance resolution (required if not others)
|
77
|
+
if hResolution.has_key?('bearingDistanceResolution')
|
78
|
+
foundOne = true
|
79
|
+
hBearRes = hResolution['bearingDistanceResolution']
|
80
|
+
unless hBearRes.empty?
|
81
|
+
hReturn = BearingDistanceResolution.unpack(hBearRes, responseObj)
|
82
|
+
unless hReturn.nil?
|
83
|
+
intResolution[:bearingDistanceResolution] = hReturn
|
84
|
+
haveOne = true
|
52
85
|
end
|
86
|
+
end
|
87
|
+
end
|
53
88
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
89
|
+
# spatial resolution - geographic resolution (required if not others)
|
90
|
+
if hResolution.has_key?('geographicResolution')
|
91
|
+
foundOne = true
|
92
|
+
hGeoRes = hResolution['geographicResolution']
|
93
|
+
unless hGeoRes.empty?
|
94
|
+
hReturn = GeographicResolution.unpack(hGeoRes, responseObj)
|
95
|
+
unless hReturn.nil?
|
96
|
+
intResolution[:geographicResolution] = hReturn
|
97
|
+
haveOne = true
|
60
98
|
end
|
99
|
+
end
|
100
|
+
end
|
61
101
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
102
|
+
# spatial resolution - level of detail (required if not others)
|
103
|
+
if hResolution.has_key?('levelOfDetail')
|
104
|
+
foundOne = true
|
105
|
+
if hResolution['levelOfDetail'] != ''
|
106
|
+
intResolution[:levelOfDetail] = hResolution['levelOfDetail']
|
107
|
+
haveOne = true
|
108
|
+
end
|
109
|
+
end
|
67
110
|
|
68
|
-
|
111
|
+
unless foundOne
|
112
|
+
responseObj[:readerExecutionMessages] << 'Spatial Resolution did not have an object of supported type'
|
113
|
+
responseObj[:readerExecutionPass] = false
|
114
|
+
return nil
|
115
|
+
end
|
69
116
|
|
70
|
-
|
117
|
+
return nil unless haveOne
|
118
|
+
return intResolution
|
71
119
|
|
72
|
-
|
120
|
+
end
|
73
121
|
|
74
122
|
end
|
75
|
-
|
76
|
-
|
123
|
+
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
77
127
|
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# unpack spatial reference system vertical datum
|
2
|
+
# Reader - ADIwg JSON to internal data structure
|
3
|
+
|
4
|
+
# History:
|
5
|
+
# Stan Smith 2017-10-23 original script
|
6
|
+
|
7
|
+
require_relative 'module_identifier'
|
8
|
+
|
9
|
+
module ADIWG
|
10
|
+
module Mdtranslator
|
11
|
+
module Readers
|
12
|
+
module MdJson
|
13
|
+
|
14
|
+
module VerticalDatum
|
15
|
+
|
16
|
+
def self.unpack(hDatum, responseObj)
|
17
|
+
|
18
|
+
# return nil object if input is empty
|
19
|
+
if hDatum.empty?
|
20
|
+
responseObj[:readerExecutionMessages] << 'Vertical Datum object is empty'
|
21
|
+
responseObj[:readerExecutionPass] = false
|
22
|
+
return nil
|
23
|
+
end
|
24
|
+
|
25
|
+
# instance classes needed in script
|
26
|
+
intMetadataClass = InternalMetadata.new
|
27
|
+
intDatum = intMetadataClass.newVerticalDatum
|
28
|
+
|
29
|
+
# vertical datum - identifier {identifier} (required)
|
30
|
+
if hDatum.has_key?('datumIdentifier')
|
31
|
+
unless hDatum['datumIdentifier'].empty?
|
32
|
+
hReturn = Identifier.unpack(hDatum['datumIdentifier'], responseObj)
|
33
|
+
unless hReturn.nil?
|
34
|
+
intDatum[:datumIdentifier] = hReturn
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
if intDatum[:datumIdentifier].empty?
|
39
|
+
responseObj[:readerExecutionMessages] << 'Vertical Datum Identifier is missing'
|
40
|
+
responseObj[:readerExecutionPass] = false
|
41
|
+
return nil
|
42
|
+
end
|
43
|
+
|
44
|
+
# vertical datum - encoding method (required)
|
45
|
+
if hDatum.has_key?('encodingMethod')
|
46
|
+
intDatum[:encodingMethod] = hDatum['encodingMethod']
|
47
|
+
end
|
48
|
+
if intDatum[:encodingMethod].nil? || intDatum[:encodingMethod] == ''
|
49
|
+
responseObj[:readerExecutionMessages] << 'Vertical Datum Encoding Method is missing'
|
50
|
+
responseObj[:readerExecutionPass] = false
|
51
|
+
return nil
|
52
|
+
end
|
53
|
+
|
54
|
+
# vertical datum - is depth system {Boolean} (required)
|
55
|
+
if hDatum.has_key?('isDepthSystem')
|
56
|
+
if hDatum['isDepthSystem'] === true
|
57
|
+
intDatum[:isDepthSystem] = true
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# vertical datum - vertical resolution (required)
|
62
|
+
if hDatum.has_key?('verticalResolution')
|
63
|
+
intDatum[:verticalResolution] = hDatum['verticalResolution']
|
64
|
+
end
|
65
|
+
if intDatum[:verticalResolution].nil? || intDatum[:verticalResolution] == ''
|
66
|
+
responseObj[:readerExecutionMessages] << 'Vertical Resolution is missing'
|
67
|
+
responseObj[:readerExecutionPass] = false
|
68
|
+
return nil
|
69
|
+
end
|
70
|
+
|
71
|
+
# vertical datum - unit of measure (required)
|
72
|
+
if hDatum.has_key?('unitOfMeasure')
|
73
|
+
intDatum[:unitOfMeasure] = hDatum['unitOfMeasure']
|
74
|
+
end
|
75
|
+
if intDatum[:unitOfMeasure].nil? || intDatum[:unitOfMeasure] == ''
|
76
|
+
responseObj[:readerExecutionMessages] << 'Unit of Measure is missing'
|
77
|
+
responseObj[:readerExecutionPass] = false
|
78
|
+
return nil
|
79
|
+
end
|
80
|
+
|
81
|
+
return intDatum
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|