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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# File 'lib/adiwg/mdtranslator/writers/iso19115_3/classes/class_geographicExtent.rb', line 23
def writeXML(hGeoExtent)
bBoxClass = EX_GeographicBoundingBox.new(@xml, @hResponseObj)
idClass = MD_Identifier.new(@xml, @hResponseObj)
geoEleClass = GeographicElement.new(@xml, @hResponseObj)
extType = hGeoExtent[:containsData]
hBbox = hGeoExtent[:boundingBox]
if hBbox.empty?
hBbox = hGeoExtent[:computedBbox]
end
unless hBbox.empty?
@xml.tag!('gex:geographicElement') do
@xml.tag!('gex:EX_GeographicBoundingBox') do
@xml.tag!('gex:extentTypeCode') do
@xml.tag!('gco:Boolean', extType)
end
bBoxClass.writeXML(hBbox)
end
end
end
unless hGeoExtent[:identifier].empty?
@xml.tag!('gex:geographicElement') do
@xml.tag!('gex:EX_GeographicDescription') do
@xml.tag!('gex:extentTypeCode') do
@xml.tag!('gco:Boolean', extType)
end
@xml.tag!('gex:geographicIdentifier') do
idClass.writeXML(hGeoExtent[:identifier], 'geographic extent')
end
end
end
end
unless hGeoExtent[:geographicElements].empty?
@xml.tag!('gex:geographicElement') do
@xml.tag!('gex:EX_BoundingPolygon') do
@xml.tag!('gex:extentTypeCode') do
@xml.tag!('gco:Boolean', extType)
end
geoEleClass.writeXML(hGeoExtent[:geographicElements])
end
end
end
end
|