Sha256: e2f56cc55f90efa5e146d8c8f45e5132dc944de124207efb727978e3d06b3be1

Contents?: true

Size: 1.52 KB

Versions: 5

Compression:

Stored size: 1.52 KB

Contents

# FGDC <<Class>> SpatialReference
# FGDC CSDGM writer output in XML

# History:
#  Stan Smith 2018-01-15 original script

module ADIWG
   module Mdtranslator
      module Writers
         module Fgdc

            class LocalSystem

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

               def writeXML(hProjection)

                  # local system (local) - local coordinate system description (required)
                  unless hProjection[:localPlanarDescription].nil?
                     @xml.tag!('localdes', hProjection[:localPlanarDescription])
                  end
                  if hProjection[:localPlanarDescription].nil?
                     @hResponseObj[:writerPass] = false
                     @hResponseObj[:writerMessages] << 'Local Coordinate System is missing description'
                  end

                  # local system (local) - local coordinate system georeference information (required)
                  unless hProjection[:localPlanarGeoreference].nil?
                     @xml.tag!('localgeo', hProjection[:localPlanarGeoreference])
                  end
                  if hProjection[:localPlanarGeoreference].nil?
                     @hResponseObj[:writerPass] = false
                     @hResponseObj[:writerMessages] << 'Local Coordinate System is missing georeference information'
                  end

               end # writeXML
            end # LocalSystem

         end
      end
   end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.10.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb
adiwg-mdtranslator-2.9.2 lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb
adiwg-mdtranslator-2.9.1 lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb
adiwg-mdtranslator-2.9.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb
adiwg-mdtranslator-2.8.0 lib/adiwg/mdtranslator/writers/fgdc/classes/class_localSystem.rb