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
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/adiwg/mdtranslator/readers/fgdc/modules/gridSystems/grid_equalArcSecond.rb', line 18
def self.unpack(xArc, hProjection, hResponseObj)
hGridSystemId = hProjection[:gridIdentifier]
hProjectionId = hProjection[:projectionIdentifier]
hGridSystemId[:identifier] = 'arcsys'
hGridSystemId[:name] = 'Equal Arc-Second Coordinate System' if hGridSystemId[:name].nil?
zone = xArc.xpath('./arczone').text
unless zone.empty?
hProjection[:gridZone] = zone
end
if zone.empty?
hResponseObj[:readerExecutionMessages] <<
'WARNING: FGDC reader: equal arc-second zone number is missing'
end
xEquiR = xArc.xpath('./equirect')
unless xEquiR.empty?
hProjectionId[:identifier] = 'equirectangular'
hProjectionId[:name] = 'Equirectangular'
return EquirectangularProjection.unpack(xEquiR, hProjection, hResponseObj)
end
xAzimuthE = xArc.xpath('./azimequi')
unless xAzimuthE.empty?
hProjectionId[:identifier] = 'azimuthalEquidistant'
hProjectionId[:name] = 'Azimuthal Equidistant'
return AzimuthEquidistantProjection.unpack(xAzimuthE, hProjection, hResponseObj)
end
hResponseObj[:readerExecutionMessages] <<
'WARNING: FGDC reader: UPS equal arc-second projection definition is missing'
return hProjection
end
|