17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_ups.rb', line 17
def self.unpack(xUPS, hProjection, hResponseObj)
hGridSystemId = hProjection[:gridIdentifier]
hProjectionId = hProjection[:projectionIdentifier]
hGridSystemId[:identifier] = 'ups'
hGridSystemId[:name] = 'Universal Polar Stereographic' if hGridSystemId[:name].nil?
zone = xUPS.xpath('./upszone').text
unless zone.empty?
hProjection[:gridZone] = zone
end
if zone.empty?
hResponseObj[:readerExecutionMessages] << 'WARNING: FGDC reader: UPS zone number is missing'
end
xPolarS = xUPS.xpath('./polarst')
unless xPolarS.empty?
hProjectionId[:identifier] = 'polarStereo'
hProjectionId[:name] = 'Polar Stereographic'
return PolarStereoProjection.unpack(xPolarS, hProjection, hResponseObj)
end
hResponseObj[:readerExecutionMessages] <<
'WARNING: FGDC reader: UPS polar stereographic definition is missing'
return hProjection
end
|