Sha256: 96cf125b5f0fe3fbd8f0539be706d88a41e598bf7fa477e3e224f1e7c269f30c

Contents?: true

Size: 829 Bytes

Versions: 6

Compression:

Stored size: 829 Bytes

Contents

# unpack resolution
# Reader - ADIwg JSON V1 to internal data structure

# History:
# 	Stan Smith 2013-11-26 original script

module Adiwg_Resolution

	def self.unpack(hResolution)

		# instance classes needed in script
		intMetadataClass = InternalMetadata.new
		intResolution = intMetadataClass.newResolution

		# resolution - equivalent scale
		if hResolution.has_key?('equivalentScale')
			s = hResolution['equivalentScale']
			if s != ''
				intResolution[:equivalentScale] = s
			end
		end

		# resolution - distance
		if hResolution.has_key?('distance')
			s = hResolution['distance']
			if s != ''
				intResolution[:distance] = s
			end
		end

		# resolution - uom
		if hResolution.has_key?('uom')
			s = hResolution['uom']
			if s != ''
				intResolution[:distanceUOM] = s
			end
		end

		return intResolution
	end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
adiwg-mdtranslator-0.9.0 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.9.0/module_resolution.rb
adiwg-mdtranslator-0.8.6 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_resolution.rb
adiwg-mdtranslator-0.8.5 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_resolution.rb
adiwg-mdtranslator-0.8.2 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_resolution.rb
adiwg-mdtranslator-0.8.1 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_resolution.rb
adiwg-mdtranslator-0.8.0 lib/adiwg/mdtranslator/readers/adiwgJson/modules_0.8.0/module_resolution.rb