Module: ADIWG::Mdtranslator::Writers::MdJson::ProjectionParameters

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

Class Method Summary collapse

Class Method Details

.build(hProjection) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/adiwg/mdtranslator/writers/mdJson/sections/mdJson_projectionParameters.rb', line 21

def self.build(hProjection)

   Jbuilder.new do |json|
      json.projectionIdentifier Identifier.build(hProjection[:projectionIdentifier]) unless hProjection[:projectionIdentifier].empty?
      json.gridIdentifier Identifier.build(hProjection[:gridIdentifier]) unless hProjection[:gridIdentifier].empty?
      json.gridZone hProjection[:gridZone]
      json.standardParallel1 hProjection[:standardParallel1]
      json.standardParallel2 hProjection[:standardParallel2]
      json.longitudeOfCentralMeridian hProjection[:longitudeOfCentralMeridian]
      json.latitudeOfProjectionOrigin hProjection[:latitudeOfProjectionOrigin]
      json.falseEasting hProjection[:falseEasting]
      json.falseNorthing hProjection[:falseNorthing]
      json.falseEastingNorthingUnits hProjection[:falseEastingNorthingUnits]
      json.scaleFactorAtEquator hProjection[:scaleFactorAtEquator]
      json.heightOfProspectivePointAboveSurface hProjection[:heightOfProspectivePointAboveSurface]
      json.longitudeOfProjectionCenter hProjection[:longitudeOfProjectionCenter]
      json.latitudeOfProjectionCenter hProjection[:latitudeOfProjectionCenter]
      json.scaleFactorAtCenterLine hProjection[:scaleFactorAtCenterLine]
      json.scaleFactorAtCentralMeridian hProjection[:scaleFactorAtCentralMeridian]
      json.straightVerticalLongitudeFromPole hProjection[:straightVerticalLongitudeFromPole]
      json.scaleFactorAtProjectionOrigin hProjection[:scaleFactorAtProjectionOrigin]
      json.azimuthAngle hProjection[:azimuthAngle]
      json.azimuthMeasurePointLongitude hProjection[:azimuthMeasurePointLongitude]
      json.obliqueLinePoint @Namespace.json_map(hProjection[:obliqueLinePoints], ObliqueLinePoint)
      json.landsatNumber hProjection[:landsatNumber]
      json.landsatPath hProjection[:landsatPath]
      json.local LocalProjection.build(hProjection[:local]) unless hProjection[:local].empty?
   end

end