class ADIWG::Mdtranslator::Writers::Html::Html_SpatialResolution

Public Class Methods

new(html) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_spatialResolution.rb, line 23
def initialize(html)
   @html = html
end

Public Instance Methods

writeHtml(hResolution) click to toggle source
# File lib/adiwg/mdtranslator/writers/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.details do
         @html.summary('Resolution Measure', {'class' => 'h5'})
         @html.section(:class => 'block') do
            measureClass.writeHtml(hResolution[:measure])
         end
      end
   end

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

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

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

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

end