Sha256: bc749b8504623035829f4cc5b2f1d138ff43c87b89d0929b8f604acdf96a3771

Contents?: true

Size: 1.92 KB

Versions: 36

Compression:

Stored size: 1.92 KB

Contents

# ISO <<Class>> MD_VectorSpatialRepresentation
# 19115-2 writer output in XML

# History:
# 	Stan Smith 2016-12-08 original script.

require_relative 'class_codelist'
require_relative 'class_geometricObjects'

module ADIWG
   module Mdtranslator
      module Writers
         module Iso19115_2

            class MD_VectorSpatialRepresentation

               def initialize(xml, hResponseObj)
                  @xml = xml
                  @hResponseObj = hResponseObj
               end

               def writeXML(hVector)

                  # classes used
                  codelistClass = MD_Codelist.new(@xml, @hResponseObj)
                  geoObjClass = MD_GeometricObjects.new(@xml, @hResponseObj)

                  @xml.tag!('gmd:MD_VectorSpatialRepresentation') do

                     # vector representation - topology level
                     s = hVector[:topologyLevel]
                     unless s.nil?
                        @xml.tag!('gmd:topologyLevel') do
                           codelistClass.writeXML('gmd', 'iso_topologyLevel', s)
                        end
                     end
                     if s.nil? && @hResponseObj[:writerShowTags]
                        @xml.tag!('gmd:topologyLevel')
                     end

                     # vector representation - geometric objects [{MD_GeometricObjects}]
                     aGeoObjs = hVector[:vectorObject]
                     aGeoObjs.each do |hGeoObj|
                        @xml.tag!('gmd:geometricObjects') do
                           geoObjClass.writeXML(hGeoObj)
                        end
                     end
                     if aGeoObjs.empty? && @hResponseObj[:writerShowTags]
                        @xml.tag!('gmd:geometricObjects')
                     end

                  end # gmd:MD_VectorSpatialRepresentation tag
               end # writeXML
            end # MD_VectorSpatialRepresentation class

         end
      end
   end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.31 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.30 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.29 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.28 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.27 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.26 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_vectorRepresentation.rb