Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_SpatialResolution

Inherits:
Object
  • Object
show all
Defined in:
lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialResolution.rb

Instance Method Summary collapse

Constructor Details

#initialize(html) ⇒ Html_SpatialResolution

Returns a new instance of Html_SpatialResolution.



23
24
25
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialResolution.rb', line 23

def initialize(html)
   @html = html
end

Instance Method Details

#writeHtml(hResolution) ⇒ Object



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
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_spatialResolution.rb', line 27

def writeHtml(hResolution)

   measureClass = Html_Measure.new(@html)
   coordinateClass = Html_CoordinateResolution.new(@html)
   bearingClass = Html_BearingDistanceResolution.new(@html)
   geoClass = Html_GeographicResolution.new(@html)

   # resolution - scale factor
   unless hResolution[:scaleFactor].nil?
      @html.em('Scale Factor: ')
      @html.text!(hResolution[:scaleFactor].to_s)
      @html.br
   end

   # resolution - measure
   unless hResolution[:measure].empty?
      @html.div do
         @html.div('Resolution Measure', {'class' => 'h5'})
         @html.div(:class => 'block') do
            measureClass.writeHtml(hResolution[:measure])
         end
      end
   end

   # resolution - coordinate resolution
   unless hResolution[:coordinateResolution].empty?
      @html.div do
         @html.div('Coordinate Resolution', {'class' => 'h5'})
         @html.div(:class => 'block') do
            coordinateClass.writeHtml(hResolution[:coordinateResolution])
         end
      end
   end

   # resolution - bearing distance resolution
   unless hResolution[:bearingDistanceResolution].empty?
      @html.div do
         @html.div('Bearing Distance Resolution', {'class' => 'h5'})
         @html.div(:class => 'block') do
            bearingClass.writeHtml(hResolution[:bearingDistanceResolution])
         end
      end
   end

   # resolution - geographic resolution
   unless hResolution[:geographicResolution].empty?
      @html.div do
         @html.div('Geographic Resolution', {'class' => 'h5'})
         @html.div(:class => 'block') do
            geoClass.writeHtml(hResolution[:geographicResolution])
         end
      end
   end

   # resolution - level of detail
   unless hResolution[:levelOfDetail].nil?
      @html.em('Level of Detail: ')
      @html.div(:class => 'block') do
         @html.text!(hResolution[:levelOfDetail])
      end
   end

end