class ADIWG::Mdtranslator::Writers::Html::Html_SpatialReference

Public Class Methods

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

Public Instance Methods

writeHtml(hSpaceRef) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_spatialReference.rb, line 23
def writeHtml(hSpaceRef)

   # classes used
   identifierClass = Html_Identifier.new(@html)
   paramSetClass = Html_ReferenceSystemParameters.new(@html)

   # spatial reference - type
   unless hSpaceRef[:systemType].nil?
      @html.em('Reference System Type: ')
      @html.text!(hSpaceRef[:systemType])
      @html.br
   end

   # spatial reference - WKT
   unless hSpaceRef[:systemWKT].nil?
      @html.em('System Well Know Text (WKT)')
      @html.section(:class => 'block') do
         @html.text!(hSpaceRef[:systemWKT])
      end
   end

   # spatial reference - identifier {identifier}
   unless hSpaceRef[:systemIdentifier].empty?
      @html.details do
         @html.summary('System Identifier', {'id' => 'spatialReference-identifier', 'class' => 'h5'})
         @html.section(:class => 'block') do
            identifierClass.writeHtml(hSpaceRef[:systemIdentifier])
         end
      end
   end

   # spatial reference - projection parameters {referenceSystemParameterSet}
   unless hSpaceRef[:systemParameterSet].empty?
      @html.details do
         @html.summary('System Parameters', {'id' => 'spatialReference-parameters', 'class' => 'h5'})
         @html.section(:class => 'block') do
            paramSetClass.writeHtml(hSpaceRef[:systemParameterSet])
         end
      end
   end

end