class ADIWG::Mdtranslator::Writers::Iso19115_2::SpatialRepresentation

Public Class Methods

new(xml, hResponseObj) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_spatialRepresentation.rb, line 19
def initialize(xml, hResponseObj)
   @xml = xml
   @hResponseObj = hResponseObj
end

Public Instance Methods

writeXML(hRepresentation) click to toggle source
# File lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_spatialRepresentation.rb, line 24
def writeXML(hRepresentation)

   # classes used
   gridClass = MD_GridSpatialRepresentation.new(@xml, @hResponseObj)
   vectorClass = MD_VectorSpatialRepresentation.new(@xml, @hResponseObj)
   rectifiedClass = MD_Georectified.new(@xml, @hResponseObj)
   referenceClass = MD_Georeferenceable.new(@xml, @hResponseObj)

   # spatial representation - grid
   unless hRepresentation[:gridRepresentation].empty?
      gridClass.writeXML(hRepresentation[:gridRepresentation])
   end

   # spatial representation - vector
   unless hRepresentation[:vectorRepresentation].empty?
      vectorClass.writeXML(hRepresentation[:vectorRepresentation])
   end

   # spatial representation - georectified
   unless hRepresentation[:georectifiedRepresentation].empty?
      rectifiedClass.writeXML(hRepresentation[:georectifiedRepresentation])
   end

   # spatial representation - georeferenceable
   unless hRepresentation[:georeferenceableRepresentation].empty?
      referenceClass.writeXML(hRepresentation[:georeferenceableRepresentation])
   end

end