Sha256: aa3dcab0d9ad2e05ee1da77bbf46ff7d3c47ce189a3d52b2904df5fdb7f5336c

Contents?: true

Size: 1.75 KB

Versions: 32

Compression:

Stored size: 1.75 KB

Contents

# unpack spatial reference system parameter oblique line point
# Reader - ADIwg JSON to internal data structure

# History:
#  Stan Smith 2018-10-08 original script

module ADIWG
   module Mdtranslator
      module Readers
         module MdJson

            module LocalProjection

               def self.unpack(hLocal, responseObj, inContext = nil)

                  @MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson

                  # return nil object if input is empty
                  if hLocal.empty?
                     @MessagePath.issueWarning(950, responseObj, inContext)
                     return nil
                  end

                  # instance classes needed in script
                  intMetadataClass = InternalMetadata.new
                  intLocal = intMetadataClass.newLocal

                  # local projection - fixed to earth (required) {boolean default = true}
                  if hLocal.has_key?('fixedToEarth')
                     if hLocal['fixedToEarth'] === false
                        intLocal[:fixedToEarth] = false
                     end
                  end

                  # local projection - description
                  if hLocal.has_key?('description')
                     unless hLocal['description'] == ''
                        intLocal[:description] = hLocal['description']
                     end
                  end

                  # local projection - georeference
                  if hLocal.has_key?('georeference')
                     unless hLocal['georeference'] == ''
                        intLocal[:georeference] = hLocal['georeference']
                     end
                  end

                  return intLocal
               end

            end

         end
      end
   end
end

Version data entries

32 entries across 32 versions & 1 rubygems

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