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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/adiwg/mdtranslator/internal/internal_metadata_obj.rb +49 -8
  3. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_albers.rb +57 -0
  4. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_azimuthEquidistant.rb +53 -0
  5. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_common.rb +252 -0
  6. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equidistantConic.rb +56 -0
  7. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_equirectangular.rb +53 -0
  8. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_generalVertical.rb +57 -0
  9. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_gnomonic.rb +53 -0
  10. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertConic.rb +57 -0
  11. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_lambertEqualArea.rb +53 -0
  12. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_mercator.rb +58 -0
  13. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_millerCylinder.rb +50 -0
  14. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_modifiedAlaska.rb +47 -0
  15. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_obliqueMercator.rb +61 -0
  16. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_orthographic.rb +53 -0
  17. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_parameters.rb +91 -0
  18. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polarStereo.rb +60 -0
  19. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_polyconic.rb +53 -0
  20. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_robinson.rb +50 -0
  21. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_sinusoidal.rb +50 -0
  22. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_spaceOblique.rb +53 -0
  23. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_stereographic.rb +53 -0
  24. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_transverseMercator.rb +54 -0
  25. data/lib/adiwg/mdtranslator/readers/fgdc/modules/mapProjections/projection_vanDerGrinten.rb +48 -0
  26. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_fgdc.rb +4 -4
  27. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalPlanar.rb +81 -0
  28. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_horizontalReference.rb +167 -0
  29. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapCoordinateInfo.rb +128 -0
  30. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapGridSystem.rb +159 -0
  31. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapLocalSystem.rb +59 -0
  32. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_mapProjection.rb +195 -0
  33. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_spatialReference.rb +15 -1
  34. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalAltitude.rb +68 -0
  35. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalDepth.rb +68 -0
  36. data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_verticalReference.rb +48 -0
  37. data/lib/adiwg/mdtranslator/readers/mdJson/mdJson_reader.rb +5 -3
  38. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_bearingDistanceResolution.rb +96 -0
  39. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_citation.rb +126 -126
  40. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_coordinateResolution.rb +66 -0
  41. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_ellipsoid.rb +78 -0
  42. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_geographicResolution.rb +66 -0
  43. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_obliqueLinePoint.rb +55 -0
  44. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_projectionParameters.rb +237 -0
  45. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_referenceSystemParameters.rb +69 -0
  46. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialReference.rb +57 -42
  47. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_spatialResolution.rb +101 -51
  48. data/lib/adiwg/mdtranslator/readers/mdJson/modules/module_verticalDatum.rb +89 -0
  49. data/lib/adiwg/mdtranslator/version.rb +7 -1
  50. data/lib/adiwg/mdtranslator/writers/html/sections/html_bearingDistanceResolution.rb +68 -0
  51. data/lib/adiwg/mdtranslator/writers/html/sections/html_coordinateResolution.rb +47 -0
  52. data/lib/adiwg/mdtranslator/writers/html/sections/html_geographicResolution.rb +47 -0
  53. data/lib/adiwg/mdtranslator/writers/html/sections/html_resourceInfo.rb +48 -7
  54. data/lib/adiwg/mdtranslator/writers/html/sections/html_source.rb +2 -2
  55. data/lib/adiwg/mdtranslator/writers/html/sections/html_spatialResolution.rb +95 -0
  56. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_bearingDistanceResolution.rb +32 -0
  57. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_coordinateResolution.rb +29 -0
  58. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_ellipsoidParameters.rb +32 -0
  59. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_geographicResolution.rb +29 -0
  60. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_obliqueLinePoint.rb +28 -0
  61. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb +57 -0
  62. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReference.rb +2 -0
  63. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialReferenceParameters.rb +32 -0
  64. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialResolution.rb +16 -1
  65. data/lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_verticalDatumParameters.rb +32 -0
  66. data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_parentId.rb +5 -8
  67. metadata +55 -4
  68. data/lib/adiwg/mdtranslator/writers/html/sections/html_resolution.rb +0 -54
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 711b22c64a7c6acc742500ca82ceadfabfc979c3
4
- data.tar.gz: 359f7b98507e8f2420f4c4cce21bff8719a55f28
3
+ metadata.gz: 20d12fe84ddfccbe18ea8ee3a2d4c28aedc471fd
4
+ data.tar.gz: 47d8c57d4668555bcf4b15ca67099675a9a8e9f4
5
5
  SHA512:
6
- metadata.gz: f573f0909635e78ad98b365cdcb35c083ed9733617cc62575d64ed1c3b73413164fd1761bbb15782de42d4563c3f96a3d406e27c9da9655ddf811157de1ce4e8
7
- data.tar.gz: 824d2cfc455565074996d874cff4f9b82f65d9ccb5b743dbb4d7daecfe5618aa88dd8c83a9d2c1ecf5df7e189532c54b94408989b7b5449fd42ba5efc16bbc15
6
+ metadata.gz: a3b11672f637c332273913e9d88005b88427c98cec0dc5d96275ec6f6823f5ceaffd0a1940988a14829ccec53476d19d6936fe68f65fde25af8dbc8e2a9d127f
7
+ data.tar.gz: d00a5b73bd938e76f396e996eca3ddf0a555b3cdb806950f50d8d29e127ce292a40dcb646721643cb1b64019f65603d00724a337780575a5e666c16de6ea0fd4
@@ -780,21 +780,22 @@ class InternalMetadata
780
780
  {
781
781
  systemType: nil,
782
782
  systemIdentifier: {},
783
- systemParameters: {}
783
+ systemParameterSet: {}
784
784
  }
785
785
  end
786
786
 
787
- def newReferenceSystemParameters
787
+ def newReferenceSystemParameterSet
788
788
  {
789
789
  projection: {},
790
790
  ellipsoid: {},
791
- datumIdentifier: {}
791
+ verticalDatum: {}
792
792
  }
793
793
  end
794
794
 
795
795
  def newProjection
796
796
  {
797
797
  projectionIdentifier: {},
798
+ projectionName: nil,
798
799
  zone: nil,
799
800
  standardParallel1: nil,
800
801
  standardParallel2: nil,
@@ -808,11 +809,18 @@ class InternalMetadata
808
809
  longitudeOfProjectionCenter: nil,
809
810
  latitudeOfProjectionCenter: nil,
810
811
  scaleFactorAtCenterLine: nil,
812
+ scaleFactorAtCentralMeridian: nil,
811
813
  straightVerticalLongitudeFromPole: nil,
812
814
  scaleFactorAtProjectionOrigin: nil,
813
815
  azimuthAngle: nil,
814
816
  azimuthMeasurePointLongitude: nil,
815
- obliqueLinePoint: []
817
+ obliqueLinePoints: [],
818
+ landsatNumber: nil,
819
+ landsatPath: nil,
820
+ localPlanarDescription: nil,
821
+ localPlanarGeoreference: nil,
822
+ otherProjectionDescription: nil,
823
+ otherGridDescription: nil
816
824
  }
817
825
  end
818
826
 
@@ -826,6 +834,7 @@ class InternalMetadata
826
834
  def newEllipsoid
827
835
  {
828
836
  ellipsoidIdentifier: {},
837
+ ellipsoidName: nil,
829
838
  semiMajorAxis: nil,
830
839
  axisUnits: nil,
831
840
  denominatorOfFlatteningRatio: nil
@@ -836,7 +845,9 @@ class InternalMetadata
836
845
  {
837
846
  scaleFactor: nil,
838
847
  measure: {},
839
- geographicMeasure: {},
848
+ coordinateResolution: {},
849
+ bearingDistanceResolution: {},
850
+ geographicResolution: {},
840
851
  levelOfDetail: nil
841
852
  }
842
853
  end
@@ -849,14 +860,44 @@ class InternalMetadata
849
860
  }
850
861
  end
851
862
 
852
- def newGeographicMeasure
863
+ def newCoordinateResolution
853
864
  {
854
- latitudeMeasure: nil,
855
- longitudeMeasure: nil,
865
+ abscissaResolutionX: nil,
866
+ ordinateResolutionY: nil,
856
867
  unitOfMeasure: nil
857
868
  }
858
869
  end
859
870
 
871
+ def newBearingDistanceResolution
872
+ {
873
+ distanceResolution: nil,
874
+ distanceUnitOfMeasure: nil,
875
+ bearingResolution: nil,
876
+ bearingUnitOfMeasure: nil,
877
+ bearingReferenceDirection: nil,
878
+ bearingReferenceMeridian: nil
879
+ }
880
+ end
881
+
882
+ def newGeographicResolution
883
+ {
884
+ latitudeResolution: nil,
885
+ longitudeResolution: nil,
886
+ unitOfMeasure: nil
887
+ }
888
+ end
889
+
890
+ def newVerticalDatum
891
+ {
892
+ datumIdentifier: {},
893
+ isDepthSystem: false,
894
+ encodingMethod: nil,
895
+ verticalResolution: nil,
896
+ unitOfMeasure: nil
897
+ }
898
+
899
+ end
900
+
860
901
  def newSpatialRepresentation
861
902
  {
862
903
  gridRepresentation: {},
@@ -0,0 +1,57 @@
1
+ # Reader - fgdc to internal data structure
2
+ # unpack fgdc map projection - albers
3
+
4
+ # History:
5
+ # Stan Smith 2017-10-04 original script
6
+
7
+ require 'nokogiri'
8
+ require 'adiwg/mdtranslator/internal/internal_metadata_obj'
9
+ require_relative 'projection_common'
10
+
11
+ module ADIWG
12
+ module Mdtranslator
13
+ module Readers
14
+ module Fgdc
15
+
16
+ module AlbersProjection
17
+
18
+ def self.unpack(xParams, hProjection, hResponseObj)
19
+
20
+ # map projection 4.1.2.1.2 (albers) - Albers Conical Equal Area
21
+ unless xParams.empty?
22
+ paramCount = 0
23
+ hProjection[:projectionName] = 'albers'
24
+
25
+ # -> ReferenceSystemParameters.projection.standardParallel1
26
+ # -> ReferenceSystemParameters.projection.standardParallel2
27
+ paramCount += ProjectionCommon.unpackStandParallel(xParams, hProjection, hResponseObj)
28
+
29
+ # -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
30
+ paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
31
+
32
+ # -> ReferenceSystemParameters.projection.latitudeOfProjectionOrigin
33
+ paramCount += ProjectionCommon.unpackLatPO(xParams, hProjection, hResponseObj)
34
+
35
+ # -> ReferenceSystemParameters.projection.falseEasting
36
+ # -> ReferenceSystemParameters.projection.falseNorthing
37
+ paramCount += ProjectionCommon.unpackFalseNE(xParams, hProjection, hResponseObj)
38
+
39
+ # verify parameter count
40
+ if paramCount == 6
41
+ return hProjection
42
+ else
43
+ hResponseObj[:readerExecutionMessages] << 'albers projection is missing one or more parameters'
44
+ return nil
45
+ end
46
+ end
47
+
48
+ return nil
49
+
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,53 @@
1
+ # Reader - fgdc to internal data structure
2
+ # unpack fgdc map projection - azimuth equidistant
3
+
4
+ # History:
5
+ # Stan Smith 2017-10-16 original script
6
+
7
+ require 'nokogiri'
8
+ require 'adiwg/mdtranslator/internal/internal_metadata_obj'
9
+ require_relative 'projection_common'
10
+
11
+ module ADIWG
12
+ module Mdtranslator
13
+ module Readers
14
+ module Fgdc
15
+
16
+ module AzimuthEquidistantProjection
17
+
18
+ def self.unpack(xParams, hProjection, hResponseObj)
19
+
20
+ # map projection 4.1.2.1.3 (azimequi) - Azimuthal Equidistant
21
+ unless xParams.empty?
22
+ paramCount = 0
23
+ hProjection[:projectionName] = 'azimuthal equidistant'
24
+
25
+ # -> ReferenceSystemParameters.projection.longitudeOfCentralMeridian
26
+ paramCount += ProjectionCommon.unpackLongCM(xParams, hProjection, hResponseObj)
27
+
28
+ # -> ReferenceSystemParameters.projection.latitudeOfProjectionOrigin
29
+ paramCount += ProjectionCommon.unpackLatPO(xParams, hProjection, hResponseObj)
30
+
31
+ # -> ReferenceSystemParameters.projection.falseEasting
32
+ # -> ReferenceSystemParameters.projection.falseNorthing
33
+ paramCount += ProjectionCommon.unpackFalseNE(xParams, hProjection, hResponseObj)
34
+
35
+ # verify parameter count
36
+ if paramCount == 4
37
+ return hProjection
38
+ else
39
+ hResponseObj[:readerExecutionMessages] << 'azimuth equidistant projection is missing one or more parameters'
40
+ return nil
41
+ end
42
+ end
43
+
44
+ return nil
45
+
46
+ end
47
+
48
+ end
49
+
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,252 @@
1
+ # Reader - fgdc to internal data structure
2
+ # unpack fgdc map projection - map projection parent
3
+
4
+ # History:
5
+ # Stan Smith 2017-10-16 original script
6
+
7
+ require 'nokogiri'
8
+ require 'adiwg/mdtranslator/internal/internal_metadata_obj'
9
+
10
+ module ADIWG
11
+ module Mdtranslator
12
+ module Readers
13
+ module Fgdc
14
+
15
+ module ProjectionCommon
16
+
17
+ # instance classes needed in script
18
+ @intMetadataClass = InternalMetadata.new
19
+
20
+ # standard parallels
21
+ def self.unpackStandParallel(xParams, hProjection, hResponseObj)
22
+ paramCount = 0
23
+ aStandP = xParams.xpath('./stdparll')
24
+ unless aStandP.empty?
25
+ aStandP.each_with_index do |xStandP, index|
26
+ standP = xStandP.text
27
+ unless standP.empty?
28
+ if index == 0
29
+ hProjection[:standardParallel1] = standP.to_f
30
+ paramCount += 1
31
+ else
32
+ hProjection[:standardParallel2] = standP.to_f
33
+ paramCount += 1
34
+ end
35
+ end
36
+ end
37
+ end
38
+ return paramCount
39
+ end
40
+
41
+ # longitude of central meridian
42
+ def self.unpackLongCM(xParams, hProjection, hResponseObj)
43
+ longCM = xParams.xpath('./longcm').text
44
+ unless longCM.empty?
45
+ hProjection[:longitudeOfCentralMeridian] = longCM.to_f
46
+ return 1
47
+ end
48
+ return 0
49
+ end
50
+
51
+ # latitude of projection origin
52
+ def self.unpackLatPO(xParams, hProjection, hResponseObj)
53
+ latPO = xParams.xpath('./latprjo').text
54
+ unless latPO.empty?
55
+ hProjection[:latitudeOfProjectionOrigin] = latPO.to_f
56
+ return 1
57
+ end
58
+ return 0
59
+ end
60
+
61
+ # false northing and easting(xParams, hProjection, hResponseObj)
62
+ def self.unpackFalseNE(xParams, hProjection, hResponseObj)
63
+ paramCount = 0
64
+ falseE = xParams.xpath('./feast').text
65
+ unless falseE.empty?
66
+ hProjection[:falseEasting] = falseE.to_f
67
+ paramCount += 1
68
+ end
69
+ falseN = xParams.xpath('./fnorth').text
70
+ unless falseN.empty?
71
+ hProjection[:falseNorthing] = falseN.to_f
72
+ paramCount += 1
73
+ end
74
+ return paramCount
75
+ end
76
+
77
+ # height of perspective point above surface
78
+ def self.unpackHeightAS(xParams, hProjection, hResponseObj)
79
+ heightAS = xParams.xpath('./heightpt').text
80
+ unless heightAS.empty?
81
+ hProjection[:heightOfProspectivePointAboveSurface] = heightAS.to_f
82
+ return 1
83
+ end
84
+ return 0
85
+ end
86
+
87
+ # longitude of projection center
88
+ def self.unpackLongPC(xParams, hProjection, hResponseObj)
89
+ longPC = xParams.xpath('./longpc').text
90
+ unless longPC.empty?
91
+ hProjection[:longitudeOfProjectionCenter] = longPC.to_f
92
+ return 1
93
+ end
94
+ return 0
95
+ end
96
+
97
+ # latitude of projection center
98
+ def self.unpackLatPC(xParams, hProjection, hResponseObj)
99
+ latPC = xParams.xpath('./latprjc').text
100
+ unless latPC.empty?
101
+ hProjection[:latitudeOfProjectionCenter] = latPC.to_f
102
+ return 1
103
+ end
104
+ return 0
105
+ end
106
+
107
+ # scale factor at equator
108
+ def self.unpackSFEquator(xParams, hProjection, hResponseObj)
109
+ sFEquator = xParams.xpath('./sfequat').text
110
+ unless sFEquator.empty?
111
+ hProjection[:scaleFactorAtEquator] = sFEquator.to_f
112
+ return 1
113
+ end
114
+ return 0
115
+ end
116
+
117
+ # scale factor at center line
118
+ def self.unpackSFCenter(xParams, hProjection, hResponseObj)
119
+ sFCenter = xParams.xpath('./sfctrlin').text
120
+ unless sFCenter.empty?
121
+ hProjection[:scaleFactorAtCenterLine] = sFCenter.to_f
122
+ return 1
123
+ end
124
+ return 0
125
+ end
126
+
127
+ # scale factor at central meridian
128
+ def self.unpackSFCM(xParams, hProjection, hResponseObj)
129
+ sFCM = xParams.xpath('./sfctrmer').text
130
+ unless sFCM.empty?
131
+ hProjection[:scaleFactorAtCentralMeridian] = sFCM.to_f
132
+ return 1
133
+ end
134
+ return 0
135
+ end
136
+
137
+ # scale factor at projection origin
138
+ def self.unpackSFPO(xParams, hProjection, hResponseObj)
139
+ sFProjectO = xParams.xpath('./sfprjorg').text
140
+ unless sFProjectO.empty?
141
+ hProjection[:scaleFactorAtProjectionOrigin] = sFProjectO.to_f
142
+ return 1
143
+ end
144
+ return 0
145
+ end
146
+
147
+ # oblique line azimuth
148
+ def self.unpackObliqueLA(xParams, hProjection, hResponseObj)
149
+ xObliqueLA = xParams.xpath('./obqlazim')
150
+ unless xObliqueLA.empty?
151
+ paramCount = 0
152
+ lineAzimuth = xObliqueLA.xpath('./asimangl').text
153
+ unless lineAzimuth.empty?
154
+ hProjection[:azimuthAngle] = lineAzimuth.to_f
155
+ paramCount += 1
156
+ end
157
+ lineLong = xObliqueLA.xpath('./asimptl').text
158
+ unless lineLong.empty?
159
+ hProjection[:azimuthMeasurePointLongitude] = lineLong.to_f
160
+ paramCount += 1
161
+ end
162
+ return paramCount
163
+ end
164
+ return 0
165
+ end
166
+
167
+ # oblique line point
168
+ def self.unpackObliqueLP(xParams, hProjection, hResponseObj)
169
+ xObliqueLP = xParams.xpath('./obqlpt')
170
+ unless xObliqueLP.empty?
171
+ paramCount = 0
172
+ hPoint1 = @intMetadataClass.newObliqueLinePoint
173
+ hPoint2 = @intMetadataClass.newObliqueLinePoint
174
+
175
+ lat1 = xObliqueLP.xpath('./obqllat[1]').text
176
+ unless lat1.empty?
177
+ hPoint1[:azimuthLineLatitude] = lat1.to_f
178
+ paramCount += 1
179
+ end
180
+ long1 = xObliqueLP.xpath('./obqllong[1]').text
181
+ unless long1.empty?
182
+ hPoint1[:azimuthLineLongitude] = long1.to_f
183
+ paramCount += 1
184
+ end
185
+
186
+ lat2 = xObliqueLP.xpath('./obqllat[2]').text
187
+ unless lat2.empty?
188
+ hPoint2[:azimuthLineLatitude] = lat2.to_f
189
+ paramCount += 1
190
+ end
191
+ long2 = xObliqueLP.xpath('./obqllong[2]').text
192
+ unless long2.empty?
193
+ hPoint2[:azimuthLineLongitude] = long2.to_f
194
+ paramCount += 1
195
+ end
196
+
197
+ if paramCount == 4
198
+ hProjection[:obliqueLinePoints] << hPoint1
199
+ hProjection[:obliqueLinePoints] << hPoint2
200
+ return hProjection[:obliqueLinePoints].length
201
+ end
202
+
203
+ end
204
+ return 0
205
+ end
206
+
207
+ # straight vertical longitude from pole
208
+ def self.unpackVSLong(xParams, hProjection, hResponseObj)
209
+ sVLongP = xParams.xpath('./svlong').text
210
+ unless sVLongP.empty?
211
+ hProjection[:straightVerticalLongitudeFromPole] = sVLongP.to_f
212
+ return 1
213
+ end
214
+ return 0
215
+ end
216
+
217
+ # landsat number
218
+ def self.unpackLandSat(xParams, hProjection, hResponseObj)
219
+ landsatN = xParams.xpath('./landsat').text
220
+ unless landsatN.empty?
221
+ hProjection[:landsatNumber] = landsatN.to_i
222
+ return 1
223
+ end
224
+ return 0
225
+ end
226
+
227
+ # landsat path number
228
+ def self.unpackLandSatPath(xParams, hProjection, hResponseObj)
229
+ landsatP = xParams.xpath('./pathnum').text
230
+ unless landsatP.empty?
231
+ hProjection[:landsatPath] = landsatP.to_i
232
+ return 1
233
+ end
234
+ return 0
235
+ end
236
+
237
+ # other projection
238
+ def self.unpackOtherProjection(xParams, hProjection, hResponseObj)
239
+ other = xParams.xpath('./otherprj').text
240
+ unless other.empty?
241
+ hProjection[:otherProjectionDescription] = other
242
+ return 1
243
+ end
244
+ return 0
245
+ end
246
+
247
+ end
248
+
249
+ end
250
+ end
251
+ end
252
+ end