Module: ADIWG::Mdtranslator::Writers::MdJson::SpatialRepresentation

Defined in:
lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialRepresentation.rb

Class Method Summary collapse

Class Method Details

.build(hSystem) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_spatialRepresentation.rb', line 19

def self.build(hSystem)

   Jbuilder.new do |json|
      json.gridRepresentation Grid.build(hSystem[:gridRepresentation]) unless hSystem[:gridRepresentation].empty?
      json.vectorRepresentation Vector.build(hSystem[:vectorRepresentation]) unless hSystem[:vectorRepresentation].empty?
      json.georectifiedRepresentation Georectified.build(hSystem[:georectifiedRepresentation]) unless hSystem[:georectifiedRepresentation].empty?
      json.georeferenceableRepresentation Georeferenceable.build(hSystem[:georeferenceableRepresentation]) unless hSystem[:georeferenceableRepresentation].empty?
   end

end