Sha256: 429be6cb632d53b559013821a826575b43c4f2e704e3ef2e109d25bca2f5b5e0

Contents?: true

Size: 1.63 KB

Versions: 48

Compression:

Stored size: 1.63 KB

Contents

# mdJson 2.0 writer - spatial resolution

# History:
#  Stan Smith 2017-10-20 added coordinate resolution
#  Stan Smith 2017-10-20 added bearing distance resolution
#  Stan Smith 2017-10-20 added geographic resolution
#  Stan Smith 2017-03-15 original script

require 'jbuilder'
require_relative 'mdJson_measure'
require_relative 'mdJson_coordinateResolution'
require_relative 'mdJson_bearingDistanceResolution'
require_relative 'mdJson_geographicResolution'

module ADIWG
   module Mdtranslator
      module Writers
         module MdJson

            module SpatialResolution

               def self.build(hResolution)

                  Jbuilder.new do |json|
                     json.scaleFactor hResolution[:scaleFactor]
                     json.measure Measure.build(hResolution[:measure]) unless hResolution[:measure].empty?
                     unless hResolution[:coordinateResolution].empty?
                        json.coordinateResolution CoordinateResolution.build(hResolution[:coordinateResolution])
                     end
                     unless hResolution[:bearingDistanceResolution].empty?
                        json.bearingDistanceResolution BearingDistanceResolution.build(hResolution[:bearingDistanceResolution])
                     end
                     unless hResolution[:geographicResolution].empty?
                        json.geographicResolution GeographicResolution.build(hResolution[:geographicResolution])
                     end
                     json.levelOfDetail hResolution[:levelOfDetail]
                  end

               end # build
            end # SpatialResolution

         end
      end
   end
end

Version data entries

48 entries across 48 versions & 1 rubygems

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